Overview
Record step-by-step EVM execution with opcode, call, and pre-state tracers.
mega-evme can record detailed execution traces during EVM runs. Traces are useful for debugging reverts, analyzing gas consumption, and understanding call flow.
Enabling Tracing
Add --trace to run, tx, or a single-transaction replay to enable tracing:
mega-evme run 0x60016000526001601ff3 --traceBy default, this uses the opcode tracer. Use --tracer to pick a different tracer.
Tracers
Common Options
These flags apply to all tracers:
--trace
false
Enable tracing
--trace.output <PATH>
stdout
Write trace output to a file instead of the console
--tracer <TRACER>
opcode
Select which tracer to use
Output
Trace output is JSON. When --trace.output is not set, the trace is printed to stdout after the execution result. When --trace.output is set, the trace is written to the specified file and only the execution result appears on stdout.
Last updated