Call Tracer
Capture the nested CALL/CREATE tree with gas usage, return data, and log events.
The call tracer records the nested tree of CALL, STATICCALL, DELEGATECALL, CALLCODE, and CREATE operations. It shows which contracts called which, with gas usage and return data at each level.
Usage
mega-evme run 0x... --trace --tracer callOptions
--trace.call.only-top-call
false
Only trace the top-level call — omit nested internal calls
--trace.call.with-log
false
Include LOG events in the call trace output
Output Format
The call tracer emits a Geth-compatible nested JSON structure.
Schema
Each call node contains:
type
string
Call type: CALL, STATICCALL, DELEGATECALL, CALLCODE, CREATE, CREATE2
from
address
Caller address
to
address
Callee address
gas
hex number
Gas provided to the call
gasUsed
hex number
Gas consumed by the call
input
hex bytes
Calldata
output
hex bytes
Return data (present on success)
value
hex number
ETH value transferred (if any)
error
string
Revert reason (present on failure)
calls
array
Nested child call nodes (recursive)
logs
array
LOG events (only with --trace.call.with-log)
Each log entry (when --trace.call.with-log is set):
address
address
Contract that emitted the log
topics
array
Log topics as hex strings
data
hex bytes
Log data
position
hex number
Position in the transaction
Example Output
Running WETH.name() against MegaETH mainnet with --tracer call shows the nested call tree — WETH delegates to L1Block to resolve the chain name:
With --trace.call.with-log, WETH.deposit() shows the emitted Deposit event:
Examples
Full call tree:
Top-level call only (useful for simple gas analysis):
Include log events:
Last updated