Skip to content

trace_transaction ​

served · same as reth

Returns all calls, contract creations and self-destructs of a transaction as a flat list of traces.

When to use ​

Use it to find the internal ether transfers and the contract calls of a transaction.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "trace_transaction", "params": ["0xa457d1d714f7c63b99f3846b390c13ae45d5f41952cc657d369b439b8fc8fa16"]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "trace_transaction",
  "params": [
    "0xa457d1d714f7c63b99f3846b390c13ae45d5f41952cc657d369b439b8fc8fa16"
  ]
}

Response ​

Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "action": {
        "from": "0xc917c3fa468f2c4b9c84c72caa46420eb9825249",
        "callType": "call",
        "gas": "0x6a1c8",
        "input": "0x09c5eabe000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002bd0000cca0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000082bedcbe00000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000aa059a20000000000000000000003bd97020d200000000000000000... 1146 more characters",
        "to": "0x0000000aa232009084bd71a5797d089aa4edfad4",
        "value": "0x0"
      },
      "blockHash": "0x88392e71b7c4893c80cadfdeadcbaa91add6a41a1a9e2bda3aef6774053617a5",
      "blockNumber": 26193069,
      "result": {
        "gasUsed": "0x37b7b",
        "output": "0x"
      },
      "subtraces": 1,
      "traceAddress": [],
      "transactionHash": "0xa457d1d714f7c63b99f3846b390c13ae45d5f41952cc657d369b439b8fc8fa16",
      "transactionPosition": 0,
      "type": "call"
    },
    "... 27 more items"
  ]
}

Full response

Parameters ​

NameTypeRequiredMeaning
transactionHash32-byte hashyesThe transaction.

Returns ​

A list of traces in call order. null when the node does not know the transaction. See Trace (trace_*).

Notes and limits ​

  • The node runs the block again on the state of its parent. So it works for the head and the 127 blocks before it.

Errors ​

CodeMessageWhen
-32603failed to apply blockhash contract call: database error: Database error: insufficient changesets to revert to block #N. Available changeset range: A..=BThe state of the parent block is gone: it is more than 128 blocks below the head. Below the first block of the node, the error is 4444.

Compared with reth ​

The live example above gives the same answer on Cinder and on reth 2.7.

trace_block, trace_replayTransaction, debug_traceTransaction.

Schema (OpenRPC) ​

More: trace_transaction.

Parameter hash: Hash32
json
{
  "title": "32 byte hex value",
  "type": "string",
  "pattern": "^0x[0-9a-f]{64}$"
}
Result: LocalizedParityTrace[] or null
json
{
  "oneOf": [
    {
      "type": "array",
      "items": {
        "title": "Parity call trace with its position",
        "allOf": [
          {
            "title": "Parity call trace",
            "type": "object",
            "properties": {
              "action": {
                "title": "Parity trace action",
                "type": "object",
                "description": "A call, create or self-destruct action. The fields depend on the type.",
                "properties": {
                  "callType": {
                    "type": "string"
                  },
                  "from": {
                    "title": "hex encoded address",
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "to": {
                    "title": "hex encoded address",
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "gas": {
                    "title": "hex encoded unsigned integer",
                    "type": "string",
                    "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
                  },
                  "input": {
                    "title": "hex encoded bytes",
                    "type": "string",
                    "pattern": "^0x[0-9a-f]*$"
                  },
                  "value": {
                    "title": "hex encoded unsigned integer",
                    "type": "string",
                    "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
                  },
                  "init": {
                    "title": "hex encoded bytes",
                    "type": "string",
                    "pattern": "^0x[0-9a-f]*$"
                  },
                  "address": {
                    "title": "hex encoded address",
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "balance": {
                    "title": "hex encoded unsigned integer",
                    "type": "string",
                    "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
                  },
                  "refundAddress": {
                    "title": "hex encoded address",
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  }
                }
              },
              "result": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "gasUsed": {
                        "title": "hex encoded unsigned integer",
                        "type": "string",
                        "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
                      },
                      "output": {
                        "title": "hex encoded bytes",
                        "type": "string",
                        "pattern": "^0x[0-9a-f]*$"
                      },
                      "address": {
                        "title": "hex encoded address",
                        "type": "string",
                        "pattern": "^0x[0-9a-fA-F]{40}$"
                      },
                      "code": {
                        "title": "hex encoded bytes",
                        "type": "string",
                        "pattern": "^0x[0-9a-f]*$"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "error": {
                "type": "string"
              },
              "subtraces": {
                "type": "integer"
              },
              "traceAddress": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "type": {
                "type": "string",
                "enum": [
                  "call",
                  "create",
                  "suicide",
                  "reward"
                ]
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "blockHash": {
                "title": "32 byte hex value",
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "blockNumber": {
                "type": "integer"
              },
              "transactionHash": {
                "title": "32 byte hex value",
                "type": "string",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "transactionPosition": {
                "type": "integer"
              }
            }
          }
        ]
      }
    },
    {
      "type": "null"
    }
  ]
}