Robinhood Chain — eth, debug (2/2)
API reference for Robinhood Chain. All methods ->
Part 2 of 2: 1 · 2
debug_traceBlock
Traces the execution of all transactions within a block.
Parameters
-
id(integer; required): a request ID (example: 1). -
jsonrpc(string; required): a JSON RPC spec used (example: 2.0). -
method(string; required): a method used for the request. -
params(array; required):<blockRlp>(string; hex; required): the RLP-encoded data of the block you want to trace.tracer(string; optional): the tracer to use for the operation. Tracers can customize the output, for example, by including only certain types of operations. Common tracers are the following:callTracer: generates a detailed trace of all calls, including internal contract calls.callTracerhas the following parameters:onlyTopCall(boolean): iftrue, only the top-level call is traced.tracerConfig(object): additional options to customize the output, such as including or excluding specific call types.
prestateTracer: traces the state of accounts before the execution of transactions.noopTracer: a no-operation tracer that returns minimal information.fourByteTracer: identifies the function signature of calls by analyzing the first four bytes of the calldata.memoryTracer: traces memory changes during the execution of transactions.memoryTracerhas the following parameters:disableMemory(boolean): if true, memory output is omitted.
opTracer: traces all the EVM opcodes executed during a transaction.opTracerhas the following parameters:includeMemory(boolean): if true, includes memory output.includeStack(boolean): if true, includes stack output.includeStorage(boolean): if true, includes storage output.
gasTracer: traces the gas usage of the transaction and breaks it down by operation.
timeout(optional, string): sets a timeout for the tracing operation, expressed in milliseconds (e.g., "5s" for 5 seconds). If the operation exceeds this time, it will be terminated.tracingOptions(optional, object): an object to specify additional options for the trace, such as:disableMemory(boolean): if true, memory output is omitted.disableStack(boolean): if true, stack output is omitted.disableStorage(boolean): if true, storage output is omitted.
You can create custom tracers by combining existing tracer parameters or defining new ones. The flexibility of tracers allows you to tailor the debugging output to your specific needs, focusing on different aspects of transaction execution.
If you're working on specific use cases, it may be helpful to look into the Robinhood Chain documentation to get detailed information on additional or custom tracers that may be supported.
Request example
curl -X POST https://rpc.ankr.com/robinhood_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceBlock",
"params": [
"0xf90513f90224a046e20740258b57f130e6d996b219f9aae10bc5bd55c4f164728a583f76e5f552a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794a4b000000000000000000073657175656e636572a05fb87dae5b6f970d811ad081fd233f3bd1f9faf0e4db49122ecf08db1dd7e371a0a94e6a7675c250a9edbd3d748394d0050d35d6e0fb3a304ae2aa1227d7d26127a0963cf8650e441f25d2e88b516f047a5c290210aeeffb4ce9bc8febab81ad9fb4b901000000000000000000000000000000000040000000000808000000000000080000000000000000000000000000000000000000000000002000000000000000000000000000200000080000000c0020000000000080000800000000000000000000000000000200000000000000000008000000000000004000000000500008000000000000000000000000000000000000000000000100000000000000000000000100000000000000000000000000000000004800000000000000000000000000000000020000000000000000100000000000000000000001000000000000200000000000000000400000000000000000000000000000000000000000000000000184048e84e587040000000000008302d517846abce648a0aebfda96cea8727ad4dc37b7733848160ef13c6ca421ff052e5726d94b876cbda00000000000000b4000000000018e190a000000000000003d00000000000000008800000000000521cb8401540eb0f902e8b88c6af889821237b8846bf6a42d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018e190a00000000000000000000000000000000000000000000000000000000048e84e50000000000000000000000000000000000000000000000000000000000000000b9025702f902538212375884016895c484016895c48307a12094ad4ccae1988f422758002d7d6769acdbcac6254f80b901e43593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000006abce65b000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000042bd5754ca361a4943e3faa11d9bb2c29429b87100000000000000000000000000000000000000000000000001d993a4cc8f400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000002b0bd7d308f8e1639fab988df18a8011f41eacad73000064ec7140e14ab2790e7ac0546a2aef23d59045762b000000000000000000000000000000000000000000c080a023f53cecf21e5887480e3a44bffcd8d3bd142b0b877045de9213f65d8c0648e4a064457dde13715660f7d3567e5df8ea6cc0099f48f0b20684bfdec894900d213fc0",
{
"tracer": "callTracer",
"timeout": "5s",
"tracerConfig": {
"onlyTopCall": true
}
}
],
"id": 1
}'
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"txHash": "0x62e62e5e9deda9e60c0aee5ad7eebf164f342e1e0e8f595ba947fe20d1bf6122",
"result": {
"beforeEVMTransfers": [],
"afterEVMTransfers": [],
"from": "0x00000000000000000000000000000000000a4b05",
"gas": "0x0",
"gasUsed": "0x0",
"to": "0x00000000000000000000000000000000000a4b05",
"input": "0x6bf6a42d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018e190a00000000000000000000000000000000000000000000000000000000048e84e50000000000000000000000000000000000000000000000000000000000000000",
"value": "0x0",
"type": "CALL"
}
},
{
"txHash": "0xec55959960e3215abf0b7fa561da789898256e4528a046a0f7f2401d855688f3",
"result": {
"beforeEVMTransfers": [
{
"purpose": "feePayment",
"from": "0x42bd5754CA361a4943e3fAA11D9Bb2c29429B871",
"to": null,
"value": "0xa226e8e8600"
}
],
"afterEVMTransfers": [
{
"purpose": "gasRefund",
"from": null,
"to": "0x42bd5754CA361a4943e3fAA11D9Bb2c29429B871",
"value": "0x65f4268c430"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0x5a2B80a9b7effc06129bD5462D77BC20A8A59BE7",
"value": "0x3605fdc0b00"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0xbC5C3a7Adecf54D34169fd90dbD1B7d3142DF067",
"value": "0x62cc49b6d0"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0xa4B00000000000000000000000000000000000F6",
"value": "0x0"
}
],
"from": "0x42bd5754ca361a4943e3faa11d9bb2c29429b871",
"gas": "0x7a120",
"gasUsed": "0x2d517",
"to": "0xad4ccae1988f422758002d7d6769acdbcac6254f",
"input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000006abce65b000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000042bd5754ca361a4943e3faa11d9bb2c29429b87100000000000000000000000000000000000000000000000001d993a4cc8f400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000002b0bd7d308f8e1639fab988df18a8011f41eacad73000064ec7140e14ab2790e7ac0546a2aef23d59045762b000000000000000000000000000000000000000000",
"value": "0x0",
"type": "CALL"
}
}
]
}
debug_traceTransaction
Traces the execution of a transaction specified by hash.
Parameters
-
id(integer; required): a request ID (example: 1). -
jsonrpc(string; required): a JSON RPC spec used (example: 2.0). -
method(string; required): a method used for the request. -
params(array; required):<transactionHash>(string; required): the hash of the transaction to trace.<object>(optional): the tracing options:tracer(string): the tracer to use, for examplecallTracerorprestateTracer.tracerConfig(object): tracer options, for example{"onlyTopCall": true}forcallTracerto skip internal calls.timeout(string): the tracing timeout, for example"5s".
Returns
<object>: the trace produced by the tracer selected.
Request example
curl -X POST https://rpc.ankr.com/robinhood_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": [
"0xe0d525cae1561add26d33ae80e0777e0a820415c27886cae59dfd01aef28e5bb",
{
"tracer": "callTracer",
"timeout": "5s",
"tracerConfig": {
"onlyTopCall": true
}
}
],
"id": 1
}'
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"beforeEVMTransfers": [
{
"purpose": "feePayment",
"from": "0x8CFB9f52Db45D6c86Bf7bedF21a73E4e3dB23acF",
"to": null,
"value": "0x200fef3b500"
}
],
"afterEVMTransfers": [
{
"purpose": "gasRefund",
"from": null,
"to": "0x8CFB9f52Db45D6c86Bf7bedF21a73E4e3dB23acF",
"value": "0x50ade6700"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0x5a2B80a9b7effc06129bD5462D77BC20A8A59BE7",
"value": "0x1c77b5fde00"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0xbC5C3a7Adecf54D34169fd90dbD1B7d3142DF067",
"value": "0x3478b57000"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0xa4B00000000000000000000000000000000000F6",
"value": "0x0"
}
],
"from": "0x8cfb9f52db45d6c86bf7bedf21a73e4e3db23acf",
"gas": "0x181e1",
"gasUsed": "0x17e16",
"to": "0x8876789976decbfcbbbe364623c63652db8c0904",
"input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000006abce89d000000000000000000000000000000000000000000000000000000000000000210040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003e00000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003060c0e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004472a4507b8156cc89af0abe1072dd381df32dc900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000989218a4e733d2d34ab3f5031acfd8b8a28650000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000005c95a09273841e0000000000000000000000000000000000000000000007a08024d300b33a97bb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c95a09273841e00000000000000000000000000000000000000000000000000000000000000600000000000000000000000004472a4507b8156cc89af0abe1072dd381df32dc90000000000000000000000000eb949bf9c09e0e9e511b2be86cf3bb071322b1f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eb949bf9c09e0e9e511b2be86cf3bb071322b1f0000000000000000000000000000000000000000000000000000000000000000",
"value": "0x5c95a09273841e",
"type": "CALL"
}
}
debug_traceCall
Traces a call executed on top of the state of a block specified, without creating a transaction.
Parameters
-
id(integer; required): a request ID (example: 1). -
jsonrpc(string; required): a JSON RPC spec used (example: 2.0). -
method(string; required): a method used for the request. -
params(array; required):<object>(required): the call object, the same as foreth_call:from,to,gas,gasPrice,value,data.<string>(required): a block number in hex, or one of the tagslatest,earliest,pending.<object>(optional): the tracing options, the same as fordebug_traceTransaction.
Returns
<object>: the trace produced by the tracer selected.
Request example
curl -X POST https://rpc.ankr.com/robinhood_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceCall",
"params": [
{
"to": "0x4472a4507b8156cc89af0abe1072dd381df32dc9",
"data": "0x70a082310000000000000000000000000eb949bf9c09e0e9e511b2be86cf3bb071322b1f"
},
"0x48e84c9",
{
"tracer": "callTracer",
"timeout": "5s",
"tracerConfig": {
"onlyTopCall": true
}
}
],
"id": 1
}'
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"beforeEVMTransfers": [
{
"purpose": "feePayment",
"from": "0x0000000000000000000000000000000000000000",
"to": null,
"value": "0x0"
}
],
"afterEVMTransfers": [
{
"purpose": "gasRefund",
"from": null,
"to": "0x0000000000000000000000000000000000000000",
"value": "0x0"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0x5a2B80a9b7effc06129bD5462D77BC20A8A59BE7",
"value": "0x6fd2eb3600"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0xbC5C3a7Adecf54D34169fd90dbD1B7d3142DF067",
"value": "0xce1d23000"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0xa4B00000000000000000000000000000000000F6",
"value": "0x0"
}
],
"from": "0x0000000000000000000000000000000000000000",
"gas": "0x3b9aca00",
"gasUsed": "0x5dce",
"to": "0x4472a4507b8156cc89af0abe1072dd381df32dc9",
"input": "0x70a082310000000000000000000000000eb949bf9c09e0e9e511b2be86cf3bb071322b1f",
"output": "0x000000000000000000000000000000000000000000009c687a181daac37e5b5a",
"value": "0x0",
"type": "CALL"
}
}