arbtrace_call
The arbtrace_call
command allows users to execute a given transaction call while returning a number of likely traces for the call.
Parameters
Object
- Call options, same aseth_call
.from
:Address
- (optional) 20 Bytes - The address the transaction is send from.to
:Address
- (optional when creating new contract) 20 Bytes - The address the transaction is directed to.gas
:Quantity
- (optional) Integer formatted as a hex string of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.gasPrice
:Quantity
- (optional) Integer formatted as a hex string of the gas price used for each paid gas.value
:Quantity
- (optional) Integer formatted as a hex string of the value sent with this transaction.data
:Data
- (optional) 4 byte hash of the method signature followed by encoded parameters. For details see Ethereum Contract ABI.
Array
- Type of trace, one or more of:"vmTrace"
,"trace"
,"stateDiff"
.Quantity
orTag
- (optional) Integer of a block number, or the string'earliest'
or'latest'
.
Returns
Array
- Block traces
Example Request and Result for arbtrace_call
Request
curl https://arbitrum-one.blastapi.io/<project-id>
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"arbtrace_call",
"params":[{
"from": null,
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"
},["trace"], "latest"],
"id":1,
"jsonrpc":"2.0"}'
Result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"output": "0x",
"stateDiff": null,
"trace": [{
"action": {
"callType": "call",
"from": "0x0000000000000000000000000000000000000000",
"gas": "0x7fffffff",
"input": "0x70a082310000000000000000000000006e0d01a76c3cf4288372a29124a26d4353ee51be",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"value": "0x0"
},
"result": {
"gasUsed": "0x0",
"output": "0x"
},
"subtraces": 0,
"traceAddress": [],
"type": "call"
}],
"vmTrace": null,
"destroyedContracts": null
}
}