# Ethereum trace_transaction RPC method

Ethereum API method that returns all traces of given transaction.

Information

This method is available on Erigon when the trace namespace is enabled.

Learn how to deploy a node with the debug and trace API methods enabled.

Parameters:

  • hash — the hash of a transaction.

Returns:

  • array — the block traces that have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):
  • action — the ParityTrace object with:
    • traceaddress — array.
    • calltype — string.
    • includeintrace — boolean.
    • isprecomplied — boolean.
    • type — string.
    • creationmethod — string.
    • from — address.
    • to — address.
    • gas — quantity.
    • value — quantity.
    • input — data.
    • result — the ParityTraceResult object with:
      • gasused — quantity
      • output — data
      • address — address
      • code — data
    • subtraces — array.
    • author — address.
    • rewardtype — string.
    • error — string.
  • blockhash — the string of the block hash.
  • blocknumber — quantity.
  • result — the ParityTraceResult object with:
    • gasused — quantity
    • output — data.
    • address — address.
    • code — data.
  • subtraces — quantity.
  • traceaddress — array.
  • transactionhash — hash.
  • transactionposition — quantity.
  • type — string.
  • error — string.

Example:

  • web3.py
  • cURL
from web3 import Web3
node_url = "CHAINSTACK_NODE_URL"
web3 = Web3.HTTPProvider(node_url)

trace = web3.make_request("trace_transaction", ["0x96161bdfd8e2cfc5ce67d420cfbd2bbaf0cf47ae0655dae94d77d4dd4630bd95"])
print(trace)