World Chain: eth, debug (3/4)
API reference for World Chain. All methods ->
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 World Chain documentation to get detailed information on additional or custom tracers that may be supported.
Request example
Ankr's World Chain nodes keep receipts, logs, and state for the most recent ~100,000 blocks, about 55 hours. The block and transaction in this example were recent when this page was written; to run it, replace them with ones from that window.
curl -X POST https://rpc.ankr.com/worldchain/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceBlock",
"params": [
"0xf91395f90279a08266059b1daff9bbcb830e3483cabc92692d31d7a9470a825f8598aedf89d71ca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347944200000000000000000000000000000000000011a0d9b786e144f9e9d039fbbac7ca56db2d10ad7aac4cf5fb15c358a95625084335a06c914e5f8d238bafedca50f581b9d31d3c4c0c203f2783b45d16a39d57d8e21ea0bcc898a07b75baf88c4471670f2d177924c94cc956ae3e58036b887439f30526b9010000200000000010000000280080004000200000222100000000001000000000404028100000000000000042010000000000000100040400008000820400200040a0000000000000000000004800200c200040000010000000000000000008a000000000000228000820000040008218400000000000000000000000100000000000000000200000000000100000000000020000500040000800000040042201000200000000080008004000000002100002000000000000080000020000000200000200420000004000010000010030000800010000200012000000000100200200180000000000000000040000000602000000004000000208000000000400008084023787fe8410b07600830c9acd846aea0ad391010000006400000016000000000007a120a0ea832e8047497298439250aed6d451467ec17f049cc02f6c20b7048140a283598800000000000000008307a120a05de5145db738135af9eecde374afd733e7e2709b54e8ba863a1a0a207f6676e9830809d080a0b56feb82a95b8f4b9c18914ce7c3146c9c6f723daa3da75a8cdd81bbbb21e582a0e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855f91114b9010a7ef90106a098386037c5f4651fe970492d04113f8cb4f86dc32926906de8d66a1b35f8bc2494deaddeaddeaddeaddeaddeaddeaddeaddead00019442000000000000000000000000000000000000158080830f424080b8b23db6be2b000021f9000dd3ef0000000000000004000000006aea0a87000000000191d8d90000000000000000000000000000000000000000000000000000000010308acc0000000000000000000000000000000000000000000000000000000000eed1b3b16b7a6f8ed919f8deb940beffd7e1a3535b20654e3b725a0e2f4b6b91f6569a000000000000000000000000dbbe3d8c2d2b22a2611c5a94a9a12c2fcd49eb290000000000000000000000000190b8b602f8b38201e081d18408f0d180840b368f4883030d40942cfc85d8e48f8eab294be644d9e25c303086300380b844a9059cbb00000000000000000000000090ed778edda7ea75f9b331a138a546b1c6e3b6fe0000000000000000000000000000000000000000000000dfe3437e527b480000c001a0d4d9b8fca8a8bc4a0bf14f4265bc76eeffa5c55353f67ee4940bd935def8a895a0050bb8623302a8926a332c288b32a1bca72566bffcd1f71e8bbe87b29e022558b905b802f905b48201e08308e63f830f42408318f2b8830799bb940000000071727de22e5e9d8baf0edac6f37da03280b90544765e827f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000567e2ea2968cc37799bee18cc059297b9e0e2e97000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000006d50899119cd9d98647b4e24ee45bf0b644b2bb30018c89455a9f5f220586cc64d46c57f49d63fc29936ed640000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000001364b00000000000000000000000000050b090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004200000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a47bb3742800000000000000000000000038869bf66a61cf6bdb996a6ae40d5853fd43b52600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001e48d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001990040d46171ec1cf4d26917678ef62c5e027e813c250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014460632e2400000000000000000000000000000000000000000000000000000000000215ce000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000001a1a23a2f8b000000000000000000000000000000000000000000000000000000006aea11d400000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004187bb50940d8aa45e26c8a58b5557f5182de04ad956be4fe9b4db3a5cb324340c731796a131388e8851e96164379edea1e4acdd7527a0ee9955ed0150c79928921b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d00006aea087800006aea11d88573064661195c1383426ca98d3e0459111d797e34d5c085e867583ab829f5640b7cb05c8216ee1f9df9f346edad672ee05fac7433159d24877b6cab19c364211b00000000000000000000000000000000000000c080a0fb54effa7de8f38b9e98361322f8b50516c5fd61ce8413eb64b3f6931379aafca00d30ab3caf107155ea4bc0f72b45cae2b8f454081c41d1bdd5cd0a2af1f9526eb9087802f908748201e0830b3c18830f42408318f2b883095dc3940000000071727de22e5e9d8baf0edac6f37da03280b90804765e827f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000073f11807dd0cac4de2edc3e69e7e2f541077890000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000093430f5f6f651e6de272515d141cac1bf6d517f800682689fd9cf5609a2494a82633fecd41bad55709c05cc800000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000013cde000000000000000000000000000699260000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006e00000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005647bb3742800000000000000000000000038869bf66a61cf6bdb996a6ae40d5853fd43b52600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000004a48d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000045900318cd2fbe4c1252179493e040c227d6292b701e600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000404e06949b0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000093430f5f6f651e6de272515d141cac1bf6d517f8000000000000000000000000249820c0479d0a7fee6a2a3a14583267550f3caf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000002cfc85d8e48f8eab294be644d9e25c3030863003000000000000000000000000541ab7c31a119441ef3575f6973277de0ef460bd00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000001407a92b66a00000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000001045c11d7950000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000bad77608d96600000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000318cd2fbe4c1252179493e040c227d6292b701e6000000000000000000000000000000000000000000000000000000006aea11d60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000249820c0479d0a7fee6a2a3a14583267550f3caf0000000000000000000000002cfc85d8e48f8eab294be644d9e25c303086300300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a1a23a34e3000000000000000000000000000000000000000000000000000000006aea11d600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000041e24dcb572ded4e81f719ea0eba34b839bd91cb4479c93a2fdc5d70660f8f49411038b4e9424f2192101e7203dafa0cd62e7e57851898052885e945907b9cbfc91b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d00006aea087700006aea11d70e3207c3ed39bda2ee5299d7bde48ba3b07affd1c550e42bd5cfcd2ae09d31d668e764f5d5a82d56281972be43851f7751155a3dda7adf2ef4a25c7aef272e2e1c00000000000000000000000000000000000000c001a0e0e60d505210fe8df62df34604b284b4acd2bd13ae194a330c6cfdb4791abc92a047adc57657f63481e0ca6aead61dd4c7fdc0205cb8faa6b486061dbd6d188ba0b9011602f901128201e08347fc198303daee8331a1ae833d0900943802ae234cd4a81ca8b539073594deba3841d13380b8a3b9b20ba1c44eee4b037cdc8d18c32e4064f870a34976ac735488dbb371e0b8965a358d432ce37a39276d7b0ae9964d5a8b7831b91cdd302e3d4a7549f3b7d6db5b1b000000006aea0aef8bfb28226ab6a725001a022b93c01f1032dc4638a44fb2fdb4068f061c6511ac9b6eed162ef06cf5f1b96af957856bacade72b91c01f1032e0df81cc6e685e9d2a0ed0e3640aac0bb805d428d4249b346d0d2e2be838bb7f9ac080a01329103c1440c245683a670609026a83eaf7a84a03ce3022fc0871fbb5ef4092a066541efd3f6bf700b03006389dd54596472b7f1eaf135b5b5efc4d125c4e5251c0c0",
{
"tracer": "callTracer",
"timeout": "5s",
"tracerConfig": {
"onlyTopCall": true
}
}
],
"id": 1
}'
Response example
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"result": {
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"gas": "0xf4240",
"gasUsed": "0xb496",
"to": "0x4200000000000000000000000000000000000015",
"input": "0x3db6be2b000021f9000dd3ef0000000000000004000000006aea0a87000000000191d8d90000000000000000000000000000000000000000000000000000000010308acc0000000000000000000000000000000000000000000000000000000000eed1b3b16b7a6f8ed919f8deb940beffd7e1a3535b20654e3b725a0e2f4b6b91f6569a000000000000000000000000dbbe3d8c2d2b22a2611c5a94a9a12c2fcd49eb290000000000000000000000000190",
"value": "0x0",
"type": "CALL"
},
"txHash": "0x101ad33fcf7f4743c856b6f061e09912772406bd06102a588b197c0c654f8d43"
},
{
"result": {
"from": "0x0774f5544f32a7a5e33803f2ebd8264765f4ccbc",
"gas": "0x30d40",
"gasUsed": "0x73b4",
"to": "0x2cfc85d8e48f8eab294be644d9e25c3030863003",
"input": "0xa9059cbb00000000000000000000000090ed778edda7ea75f9b331a138a546b1c6e3b6fe0000000000000000000000000000000000000000000000dfe3437e527b480000",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"value": "0x0",
"type": "CALL"
},
"txHash": "0xe607038ada0169406eb384806f47215946431f550279e83489f10dd7ca192618"
},
{
"result": {
"from": "0x567e2ea2968cc37799bee18cc059297b9e0e2e97",
"gas": "0x799bb",
"gasUsed": "0x51b2b",
"to": "0x0000000071727de22e5e9d8baf0edac6f37da032",
"input": "0x765e827f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000567e2ea2968cc37799bee18cc059297b9e0e2e97000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000006d50899119cd9d98647b4e24ee45bf0b644b2bb30018c89455a9f5f220586cc64d46c57f49d63fc29936ed640000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000001364b00000000000000000000000000050b090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004200000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a47bb3742800000000000000000000000038869bf66a61cf6bdb996a6ae40d5853fd43b52600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001e48d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001990040d46171ec1cf4d26917678ef62c5e027e813c250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014460632e2400000000000000000000000000000000000000000000000000000000000215ce000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000001a1a23a2f8b000000000000000000000000000000000000000000000000000000006aea11d400000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004187bb50940d8aa45e26c8a58b5557f5182de04ad956be4fe9b4db3a5cb324340c731796a131388e8851e96164379edea1e4acdd7527a0ee9955ed0150c79928921b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d00006aea087800006aea11d88573064661195c1383426ca98d3e0459111d797e34d5c085e867583ab829f5640b7cb05c8216ee1f9df9f346edad672ee05fac7433159d24877b6cab19c364211b00000000000000000000000000000000000000",
"value": "0x0",
"type": "CALL"
},
"txHash": "0xe0c0aa049ee01fc4c267b752bde44772efe9413be13b72662c9bacd125e716a1"
},
{
"result": {
"from": "0x0073f11807dd0cac4de2edc3e69e7e2f54107789",
"gas": "0x95dc3",
"gasUsed": "0x5a1fa",
"to": "0x0000000071727de22e5e9d8baf0edac6f37da032",
"input": "0x765e827f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000073f11807dd0cac4de2edc3e69e7e2f541077890000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000093430f5f6f651e6de272515d141cac1bf6d517f800682689fd9cf5609a2494a82633fecd41bad55709c05cc800000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000013cde000000000000000000000000000699260000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006e00000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005647bb3742800000000000000000000000038869bf66a61cf6bdb996a6ae40d5853fd43b52600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000004a48d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000045900318cd2fbe4c1252179493e040c227d6292b701e600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000404e06949b0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000093430f5f6f651e6de272515d141cac1bf6d517f8000000000000000000000000249820c0479d0a7fee6a2a3a14583267550f3caf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000002cfc85d8e48f8eab294be644d9e25c3030863003000000000000000000000000541ab7c31a119441ef3575f6973277de0ef460bd00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000001407a92b66a00000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000001045c11d7950000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000bad77608d96600000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000318cd2fbe4c1252179493e040c227d6292b701e6000000000000000000000000000000000000000000000000000000006aea11d60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000249820c0479d0a7fee6a2a3a14583267550f3caf0000000000000000000000002cfc85d8e48f8eab294be644d9e25c303086300300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a1a23a34e3000000000000000000000000000000000000000000000000000000006aea11d600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000041e24dcb572ded4e81f719ea0eba34b839bd91cb4479c93a2fdc5d70660f8f49411038b4e9424f2192101e7203dafa0cd62e7e57851898052885e945907b9cbfc91b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d00006aea087700006aea11d70e3207c3ed39bda2ee5299d7bde48ba3b07affd1c550e42bd5cfcd2ae09d31d668e764f5d5a82d56281972be43851f7751155a3dda7adf2ef4a25c7aef272e2e1c00000000000000000000000000000000000000",
"value": "0x0",
"type": "CALL"
},
"txHash": "0x40b1227b30259e2ca93bec796ae0b817f9943f09f70befe084d77d51699a2ce3"
},
{
"result": {
"from": "0x2efc4931f2e64b38d6ae3d714466840fbc951f56",
"gas": "0x3d0900",
"gasUsed": "0xb55e",
"to": "0x3802ae234cd4a81ca8b539073594deba3841d133",
"input": "0xb9b20ba1c44eee4b037cdc8d18c32e4064f870a34976ac735488dbb371e0b8965a358d432ce37a39276d7b0ae9964d5a8b7831b91cdd302e3d4a7549f3b7d6db5b1b000000006aea0aef8bfb28226ab6a725001a022b93c01f1032dc4638a44fb2fdb4068f061c6511ac9b6eed162ef06cf5f1b96af957856bacade72b91c01f1032e0df81cc6e685e9d2a0ed0e3640aac0bb805d428d4249b346d0d2e2be838bb7f9a",
"value": "0x0",
"type": "CALL"
},
"txHash": "0x610675cecf5a017d1efc4ed5f19d508479e3423a55205860e3ed9a8b9493e7bc"
}
]
}