Docs

debug_traceTransaction - Polygon RPC Method

Trace a transaction execution on Polygon. Requires archive node for debugging enterprise solutions (Starbucks, Disney, Reddit), gaming, DeFi, and stablecoin payments.

Traces a transaction execution on Polygon 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 enterprise solutions (Starbucks, Disney, Reddit), gaming, DeFi, and stablecoin payments

Tracer Options

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

Code Examples