Docs

trace_replayTransaction - MegaETH RPC Method

Replay a transaction and return traces on MegaETH. Requires archive node for high-frequency trading, real-time gaming, instant payments, and latency-sensitive applications.

Replays a transaction on MegaETH and returns the requested traces.

Archive Node Required

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

When to Use This Method

  • Replay and trace a transaction execution - Get vmTrace, stateDiff, and trace in a single call for comprehensive analysis on MegaETH
  • State diff extraction - See exact account balance, nonce, code, and storage changes caused by a transaction for high-frequency trading, real-time gaming, instant payments, and latency-sensitive applications
  • VM trace debugging - Get opcode-level execution details alongside the structured call trace
  • Comprehensive transaction analysis - Combine all three trace types in one request for complete execution visibility

Best Practices

  • Returns more detailed trace data than debug_traceTransaction
  • Combine vmTrace with trace array for a full picture of opcode and call-level execution
  • Request all three trace types (trace, vmTrace, stateDiff) for maximum detail
  • Requires archive node access; not available on standard full nodes

Response Body

Response

Code Examples