debug_traceBlockByNumber

Retrieves detailed execution information about transactions within a given block number. This is similar to trace_block.

Parameters

  1. A hexadecimal block number.

  2. Tracer - choose from one of these options:

    • 4byteTracer - Solidity contract functions are addressed using the first four byte of the Keccak-256 hash of their signature. This tracer monitors and analyzes the usage of specific function signatures within smart contracts by capturing their unique first four bytes.

    • callTracer - collects data about all call frames executed within a transaction, creating a hierarchical list of call frames structured mirroring the EVM's operations. This is useful for debugging and analytical purposes.

    • prestateTracer - captures and analyzes the state of the blockchain before the execution of a specific transaction. It helps in understanding the state changes and effects that a transaction will have on the blockchain's data and accounts before the transaction is actually executed.

    • noopTracer - returns empty results. This is used for testing purpose.

    • opcountTracer - count and track the number of operations (or opcodes) executed during a specific transaction.

    • unigramTracer - counts the frequency of occurrence of each opcode.

    • bigramTracer - a bigram refers to a sequence of two bytes or characters. This tracer is designed to observe and provide insights into the patterns and occurrences of these two-byte sequences as they appear within the data of executed transactions.

    • trigramTracer - a trigram refers to a sequence of three bytes or characters. This tracer is designed to observe and provide insights into the patterns and occurrences of these three-byte sequences as they appear within the data of executed transactions.

    • evmdisTracer - generates the bytecode disassembly of executed transactions, providing developers with insights into how smart contracts operate at a low-level bytecode level for debugging, security audits, and performance optimization purposes.

Sample Request

curl https://lb.nodies.app/v1/<INSERT URL> \
   -H "x-api-key: <API-KEY>" \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{ 
  "method": "debug_traceBlockByNumber",
  "params": [
    "0x90c344",
    {
      "tracer": "callTracer"
    }
  ],
  "id": 1,
  "jsonrpc": "2.0"
}'

Sample Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "result": {
        "type": "CALL",
        "from": "0x4156edbafc5091507de2dd2a53ded551a346f83b",
        "to": "0x8ee180756e6bf12cb6e6d9786fa0dce9808771aa",
        "value": "0x0",
        "gas": "0x43e5d",
        "gasUsed": "0x42dfb",
        "input": "0x48933b30000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002600390def68fc33e5bd102304434ef9ed98fcff3af06a6ada4d3bb9097aceb9900209df8a888046b624739884e5705c580bcbc8e5df3a962effd4183a15b181e8d165b028186813418af69c804aa2942f1375fb358196b4643f32da65c036a3cfd27a67194d3e9ddd12debf4640f216447d35b6bf1fcef6747014733bb8153e176040bcc4d4018d920e4b34e84500c5dc633dda04ba97f58f538d56d438af896852a1acf6569c75a67e4963b255c4d30f2358154ad00f5ab223f6064d2228744360d5f07a6656ffdec652393ba2b6ee454fc38a659698538366533b307ea29a20415f636d9cfaed2c3365488719363f68bff9c09f4829880723e33f0920082ff8100000000000000000000000000000000000000000000000000000000008d36000000000000000000000000000000000035e915f1b53186f0a3d3229b312b1c4e000000000000000000000000000000000b3255038b5c1f134b6f9fb9ba3998cd00000000000000000000000000000000dd1525ef7c1b9ee75b5a014e893d6873000000000000000000000000000000004b88969a17e43a988aee59a7aab7b36a00000000000000000000000000000000a8f1804b456fd6a8a6e6bcb0f0706f5d00000000000000000000000000000000463132231caf3a5b92f87264cb39b96700000000000000000000000000000000a8f1804b456fd6a8a6e6bcb0f0706f5d00000000000000000000000000000000463132231caf3a5b92f87264cb39b9670000000000000000000000000000000000000000000000000000000000000015000000000000000000000000000000000000000000000000000000000000000f",
        "output": "0x",
        "time": "44.753399ms",
        "calls": [
          {
            "type": "DELEGATECALL",
            "from": "0x8ee180756e6bf12cb6e6d9786fa0dce9808771aa",
            "to": "0x90ccbb1b5b37c37d6d0f4ce3e5b4c7cfe3bc656b",
            "gas": "0x411a6",
            "gasUsed": "0x411a6",
            "input": "0x48933b30000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002600390def68fc33e5bd102304434ef9ed98fcff3af06a6ada4d3bb9097aceb9900209df8a888046b624739884e5705c580bcbc8e5df3a962effd4183a15b181e8d165b028186813418af69c804aa2942f1375fb358196b4643f32da65c036a3cfd27a67194d3e9ddd12debf4640f216447d35b6bf1fcef6747014733bb8153e176040bcc4d4018d920e4b34e84500c5dc633dda04ba97f58f538d56d438af896852a1acf6569c75a67e4963b255c4d30f2358154ad00f5ab223f6064d2228744360d5f07a6656ffdec652393ba2b6ee454fc38a659698538366533b307ea29a20415f636d9cfaed2c3365488719363f68bff9c09f4829880723e33f0920082ff8100000000000000000000000000000000000000000000000000000000008d36000000000000000000000000000000000035e915f1b53186f0a3d3229b312b1c4e000000000000000000000000000000000b3255038b5c1f134b6f9fb9ba3998cd00000000000000000000000000000000dd1525ef7c1b9ee75b5a014e893d6873000000000000000000000000000000004b88969a17e43a988aee59a7aab7b36a00000000000000000000000000000000a8f1804b456fd6a8a6e6bcb0f0706f5d00000000000000000000000000000000463132231caf3a5b92f87264cb39b96700000000000000000000000000000000a8f1804b456fd6a8a6e6bcb0f0706f5d00000000000000000000000000000000463132231caf3a5b92f87264cb39b9670000000000000000000000000000000000000000000000000000000000000015000000000000000000000000000000000000000000000000000000000000000f",
            "output": "0x"
          }
        ]
      }
    }
  ]
}

Last updated