trace_replayBlockTransactionsvmTrace
Replays all transactions in a specified block and provides detailed trace information for each transaction, includes an in-depth trace of the virtual machine's state throughout the execution of each transaction, capturing every opcode executed and the resulting state changes
Request
Examples
curl https://rpc.xone.org \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"trace_replayBlockTransactions","params":["0x2ed119",["trace"]],"id":1,"jsonrpc":"2.0"}'
Response
200 OK
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"output": "0x",
"stateDiff": null,
"trace": [
{
"action": {
"callType": "call",
"from": "0x5cb2045c43d14a5f5e5f1ea60c5b02e0a93032cf",
"gas": "0x76c0",
"input": "0x",
"to": "0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e",
"value": "0x186a0"
},
"blockHash": "0x5bad55fbd7e0f20eac95f45f55f997216de10aaf176314c236b0c3c93c5d1f17",
"blockNumber": 1234567,
"result": {
"gasUsed": "0x5208",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"transactionHash": "0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f",
"transactionPosition": 0,
"type": "call"
}
// Additional trace objects can be included here
],
"vmTrace": {
"code": "0x...",
"ops": [
{
"cost": 3,
"ex": {
"mem": null,
"push": ["0x60"],
"store": null,
"used": 3
},
"pc": 0,
"sub": null
}
]
}
}
]
}
Request params
Name | Type | Description |
---|---|---|
id | integer | Request identifier |
jsonrpc | string | JSON-RPC version |
method | string | API method name |
Parameters | array | |
toBlock | string | The block number or block hash to search up to |
traceType | string | vmTrace |
vmTrace | string | To get a full trace of the virtual machine's state during the execution of the given of given transaction, including for any subcalls. |
Response
200
An array of trace objects for each transaction, including vmTrace data that details the virtual machine's state during the transaction executionName | Type | Description |
---|---|---|
Parameters | object | |
id | integer | |
jsonrpc | string | |
result | object |