Docs

debug_traceTransaction - Ethereum RPC Method

Trace a transaction execution on Ethereum. Requires archive node for debugging DeFi protocols (60% market share), NFT marketplaces, DAOs, and enterprise dApps.

Traces a transaction execution on Ethereum 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 DeFi protocols (60% market share), NFT marketplaces, DAOs, and enterprise dApps

Tracer Options

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

Code Examples