🛠️ 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
: Iftrue
, skips nested calls and focuses only on the main top-level transaction.
⚙️ Advanced Tracer Options
These can help reduce the load for heavy traces:
Option | Description |
---|---|
disableStorage | Skip storage access logs |
disableStack | Skip EVM stack logging |
disableMemory | Skip memory logging |
disableReturnData | Skip return value capture |
timeout | Max 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
Field | Description |
---|---|
type | Type of call (CALL, DELEGATECALL, etc.) |
from | Sender |
to | Recipient |
gas | Gas sent |
gasUsed | Gas used |
value | ETH/tokens sent |
input | Function calldata |
output | Return value |
error | Error message (if any) |
calls | Sub-call stack |
revertReason | Revert message if any |
If using prestateTracer
Shows state-level data touched by the tx:
balance
: Current ETH balancecode
: Contract bytecodenonce
: Account noncestorage
: 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 usedreturnValue
: Final outputstructLogs
: 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
- HTTPS POST Request with a JSON RPC call in the body
- Replace
YOUR-API-KEY
with the key from your CHAINNODES Dashboard (opens in a new tab) - Replace
mainnet
with your desired supported network
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"
}
}