Skip to main content

debug_traceTransaction

Traces a transaction execution on Avalanche by transaction hash.

Archive Node Required

This method requires an archive node. It is not available on full nodes.

Use Cases#

  • Transaction debugging - Understand exactly what happened
  • Failure analysis - Find where and why a transaction reverted
  • Gas optimization - Analyze gas usage for institutional RWA tokenization ($18B+ transfer volume), gaming subnets, and enterprise blockchains

Parameters#

ParameterTypeRequiredDescription
txHashDATAYes32-byte transaction hash
tracerConfigObjectNoTracer configuration

Tracer Options#

  • {} - Default opcode tracer (verbose)
  • { tracer: "callTracer" } - Call tree tracer
  • { tracer: "prestateTracer" } - Pre-state tracer

Request#

{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": ["0xfe055919188f8e2360bead9ecd97ffa782c610730e9084c6533f799bafafa7e4", {"tracer": "callTracer"}],
"id": 1
}

Code Examples#

curl -X POST https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": ["0xfe055919188f8e2360bead9ecd97ffa782c610730e9084c6533f799bafafa7e4", {"tracer": "callTracer"}],
"id": 1
}'