The trace_replayTransaction
method allows you to replay a transaction and retrieve a variety of trace information including execution trace, VM trace, and state changes. This method provides more detailed information than trace_transaction
by showing how the transaction changed the state.
This method replays a transaction and returns detailed trace information including VM trace and state differences.
The hash of the transaction to replay
Array of trace types to include in the response
Result object with trace information
Output data from the transaction
State differences caused by the transaction (if requested)
State changes for an address
Array of trace objects for all operations in the transaction
Details about the call action
Type of call (call, delegatecall, etc.)
Sender address
Gas provided for the call (hex)
Input data for the call (hex)
Recipient address
Value transferred in wei (hex)
Result of the call
Amount of gas used (hex)
Output data from the call (hex)
Number of subtraces
Address path of trace location in the call tree
Type of operation (call, create, suicide)
Virtual machine execution trace (if requested)
EVM bytecode being executed
Array of executed operations
Gas cost of the operation
Execution result of the operation
Program counter
Information about call sub-execution
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"stateDiff": {
"0x1234567890123456789012345678901234567890": {
"balance": {
"*": {
"from": "0x100",
"to": "0x110"
}
},
"code": "=",
"nonce": {
"*": {
"from": "0x10",
"to": "0x11"
}
},
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000001": {
"*": {
"from": "0x0000000000000000000000000000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
}
}
}
},
"trace": [
{
"action": {
"callType": "call",
"from": "0x83806d539d4ea1c140489a06660319c9a303f874",
"gas": "0x1a1f8",
"input": "0x",
"to": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
"value": "0x7a16c911b4d00000"
},
"result": {
"gasUsed": "0x2982",
"output": "0x"
},
"subtraces": 2,
"traceAddress": [],
"type": "call"
}
],
"vmTrace": {
"code": "0x606060...",
"ops": [
{
"cost": 3,
"ex": {
"mem": null,
"push": ["0x60"],
"store": null,
"used": 16723979
},
"pc": 0,
"sub": null
}
]
}
}
}
The traceTypes
parameter accepts an array of the following values:
You can request any combination of these trace types.
The state diff format uses the following symbols:
trace_transaction
insteadtrace_transaction
may be sufficient