API Reference

debug_traceTransaction

Traces a transaction.

PARAMETERS

Transaction Hash - (required) A transaction hash to trace, with a 0x prefix.

Tracer - (optional) A tracer object. See tracer.

REQUEST

{
  "jsonrpc": "2.0",
  "method": "debug_traceTransaction",
  "params": [
    "0x493650c1985b3bd12dccb9a70edaa6cd70366d0acdb13af5343c1a31f1272aa9",
    {
      "tracer": "callTracer",
      "tracerConfig": {
        "onlyTopCall": false,
        "withLog": true
      }
    }
  ],
  "id": 1
}

RESPONSE

Result - A trace object with the following fields:

  • type - The type of the call.
  • from - The address the transaction is sent from.
  • to - The address the transaction is directed to.
  • value - The integer of the value sent with this transaction.
  • gas - The integer of the gas provided for the transaction execution.
  • gasUsed - The integer of the gas used.
  • input - The data given at the time of input.
  • output - The data which is returned as an output.
  • error - The type of error, if any.
  • revertReason - The type solidity revert reason, if any.
  • calls - A list of sub-calls.
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "type": "CALL",
    "from": "0x871f1181aa63c988325539cf4b502e092595b50e",
    "to": "0x5300000000000000000000000000000000000002",
    "value": "0x0",
    "gas": "0x4e7f",
    "gasUsed": "0x4e7f",
    "input": "0x39455d3a000000000000000000000000000000000000000000000000000000000016e3600000000000000000000000000000000000000000000000000000000004679ef9",
    "output": "0x",
    "calls": [
      {
        "type": "STATICCALL",
        "from": "0x5300000000000000000000000000000000000002",
        "to": "0x5300000000000000000000000000000000000003",
        "gas": "0x396b",
        "gasUsed": "0xa1e",
        "input": "0xefc78401000000000000000000000000871f1181aa63c988325539cf4b502e092595b50e",
        "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
      }
    ]
  }
}
Language
Click Try It! to start a request and see the response here!