trace_call
Executes a new message call immediately without creating a transaction on the blockchain, and returns detailed trace information about the execution
Request
Examples
curl https://rpc.xone.org \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"trace_call",
"params":[{
"from": "0x6f1FB6EFDf50F34bFA3F2bC0E5576EdD71631638",
"to": "0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e",
"value": "0x0",
"data": "0xa67a6a45000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000"},
["trace"]],
"id":1,
"jsonrpc":"2.0"}'
Response
200 OK
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"output": "0x",
"stateDiff": null,
"trace": [
{
"action": {
"callType": "call",
"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"gas": "0x76c0",
"input": "0x",
"to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"value": "0x186a0"
},
"blockHash": "0x...",
"blockNumber": 1234567,
"result": {
"gasUsed": "0x5208",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"transactionHash": "0x...",
"transactionPosition": 0,
"type": "call"
}
// Additional trace objects can be included here
],
"vmTrace": null
},
{
"output": "0x",
"stateDiff": null,
"trace": [
{
"action": {
"callType": "call",
"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
"gas": "0x76c0",
"input": "0x",
"to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"value": "0x186a0"
},
"blockHash": "0x...",
"blockNumber": 1234567,
"result": {
"gasUsed": "0x5208",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"transactionHash": "0x...",
"transactionPosition": 0,
"type": "call"
}
// Additional trace objects can be included here
],
"vmTrace": null
}
]
}{
"jsonrpc": "2.0",
"result": {
"output": "0x",
"stateDiff": null,
"trace": [
{
"action": {
"callType": "call",
"from": "0x6f1fb6efdf50f34bfa3f2bc0e5576edd71631638",
"gas": "0x1dcd11f8",
"input": "0xa67a6a45000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000",
"to": "0x1e0447b19bb6ecfdae1e4ae1694b0c3659614e4e",
"value": "0x0"
},
"error": "Reverted",
"subtraces": 0,
"traceAddress": [],
"type": "call"
}
],
"vmTrace": null
},
"id": 0
}
Request params
Name | Type | Description |
---|---|---|
id | integer | Request identifier |
jsonrpc | string | JSON-RPC version |
method | string | API method name |
Parameters | array | |
transaction | object | The transaction call object which contains the following fields. |
blockNumber | string | (optional) Block number as an integer, or string |
traceType | string | Specifies the trace options, such as "vmTrace", "trace", and "stateDiff". |
Response
200
The trace resultsName | Type | Description |
---|---|---|
Parameters | object | |
id | integer | |
jsonrpc | string | |
result | object |