Opcode Tracer
Log every instruction with gas, stack, memory, and storage at each step.
Last updated
{
"failed": false,
"gas": 60018,
"returnValue": "0x01",
"structLogs": [
{
"pc": 0,
"op": "PUSH1",
"gas": 9940000,
"gasCost": 3,
"depth": 1,
"stack": [],
"memory": []
},
{
"pc": 2,
"op": "PUSH1",
"gas": 9939997,
"gasCost": 3,
"depth": 1,
"stack": ["0x1"],
"memory": []
},
{
"pc": 4,
"op": "MSTORE",
"gas": 9939994,
"gasCost": 6,
"depth": 1,
"stack": ["0x1", "0x0"],
"memory": []
},
{
"pc": 5,
"op": "PUSH1",
"gas": 9939988,
"gasCost": 3,
"depth": 1,
"stack": [],
"memory": [
"0000000000000000000000000000000000000000000000000000000000000001"
]
},
{
"pc": 7,
"op": "PUSH1",
"gas": 9939985,
"gasCost": 3,
"depth": 1,
"stack": ["0x1"],
"memory": [
"0000000000000000000000000000000000000000000000000000000000000001"
]
},
{
"pc": 9,
"op": "RETURN",
"gas": 9939982,
"gasCost": 0,
"depth": 1,
"stack": ["0x1", "0x1f"],
"memory": [
"0000000000000000000000000000000000000000000000000000000000000001"
]
}
]
}mega-evme run 0x60016000526001601ff3 \
--trace --tracer opcode \
--trace.opcode.disable-memory \
--trace.opcode.disable-stackmega-evme run 0x60016000526001601ff3 \
--trace --tracer opcode \
--trace.opcode.enable-return-data \
--trace.output trace.json