🔵 Base
debug_traceTransaction

🛠️ debug_traceTransaction RPC Method (Base Chain)

The debug_traceTransaction method lets you trace what happened inside a confirmed transaction on-chain — including internal calls, gas usage, storage access, and more.

It’s one of the most powerful tools for debugging failed or complex transactions.


Parameters

1. Transaction Hash [required]

The hash of the transaction you want to trace.


2. Tracer Object [optional]

Customize how deep and detailed the trace should be:

  • tracer: Pick a mode:

    • callTracer: Shows internal call stack, reverts, inputs/outputs.
    • prestateTracer: Shows all contract storage + balances touched.
  • tracerConfig (object):

    • onlyTopCall: If true, skips nested calls and focuses only on the main top-level transaction.

⚙️ Advanced Tracer Options

These can help reduce the load for heavy traces:

OptionDescription
disableStorageSkip storage access logs
disableStackSkip EVM stack logging
disableMemorySkip memory logging
disableReturnDataSkip return value capture
timeoutMax allowed trace time (default: 5s)
đź’ˇ

If you're using a tracer like callTracer or prestateTracer, the disable* options won’t apply.

If you don’t pick a tracer, the method defaults to Geth’s built-in opcode logger (opens in a new tab).

Need RPC API keys?

Get 12.5M archival requests for free today.


Returns

If using callTracer

FieldDescription
typeType of call (CALL, DELEGATECALL, etc.)
fromSender
toRecipient
gasGas sent
gasUsedGas used
valueETH/tokens sent
inputFunction calldata
outputReturn value
errorError message (if any)
callsSub-call stack
revertReasonRevert message if any

If using prestateTracer

Shows state-level data touched by the tx:

  • balance: Current ETH balance
  • code: Contract bytecode
  • nonce: Account nonce
  • storage: Key-value map of storage slots

If using default Struct/opcode tracer

You get a low-level log of every EVM step:

  • failed: Boolean – did it succeed?
  • gas: Total gas used
  • returnValue: Final output
  • structLogs: Step-by-step trace:
    • pc, op, gas, gasCost, depth
    • stack, storage, memory
    • refund, error

Request

POST https://base-mainnet.chainnodes.org/YOUR-API-KEY

Example

curl https://base-mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"method":"debug_traceTransaction","params":["0xd19320daa641b029c043a8eeab7cc3f5a19c3c213119c72cf97b9a32428f0278", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}'

Sample Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "from": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5",
    "gas": "0x2328",
    "gasUsed": "0x5208",
    "to": "0x6d2e03b7effeae98bd302a9f836d0d6ab0002766",
    "input": "0x",
    "value": "0x2b983193126b4ff",
    "type": "CALL"
  }
}