POSTdebug_traceBlockByHash

A debugging tool that allows you to trace chain state changes caused by transactions and the history of actual calls for a specific block, by configuring a tracer and using the information it provides.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

Enter the following parameters as an array with the appropriate types.

  1. block hash: Enter the block hash to query in 64-digit hexadecimal string format.
  2. traceOption: Object for trace option configuration.
params[0]string

Block hash is the unique identifier of a block. The block hash is represented as a 64-character hexadecimal string.

params[1]object
tracerstring (enum)

A field that specifies the tracer type, set to either "callTracer" or "prestateTracer".

  1. callTracer: Used to inspect the execution path and results of executed transactions. Provides information such as the call stack, return values, gas consumption, and revert reasons, and can trace the process of function calls and interactions with smart contracts. Depending on the execution option (onlyTopCall), you can trace all nested calls of a specific call.
  2. prestateTracer: A tool that traces the pre-state before a specific transaction or block is executed. Records account state and contract code before transaction execution, allowing you to analyze state changes before and after execution. prestateTracer is used to trace smart contract state changes and interactions between accounts.
tracerConfigobject

Object for tracer configuration. Uses the boolean "onlyTopCall" option; when set to true, traces only the main call. When set to false, traces down to the sub-call level.

onlyTopCallboolean
Responses
fromstring

Caller address

gasstring

Gas limit set for the call (hex)

gasUsedstring

Actual gas used (hex)

tostring

Callee address

inputstring

Call input data (hex)

outputstring

Call return data (hex)

valuestring

Amount of ETH transferred (hex, in wei)

typestring

Call type (CALL, CREATE, STATICCALL, etc.)

callsobject[]

List of internal sub-calls

errorstring

Error message if execution failed

revertReasonstring

Revert reason if the transaction was reverted

X-API-KEY
RequestCU530
cURL
curl -X POST "https://arbitrum-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByHash",
  "params": [
    "0x8e38b4dbf6b11fcc3b9dee84fb7986e29ca0a02cecd8977c161ff7333329681e",
    {
      "tracer": "callTracer",
      "tracerConfig": {
        "onlyTopCall": true
      }
    }
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": [
    {
      "result": {
        "from": "0x39fa8c5f2793459d6622857e7d9fbb4bd91766d3",
        "gas": "0x1a6d4",
        "gasUsed": "0x723c",
        "to": "0xc083e9947cf02b8ffc7d3090ae9aea72df98fd47",
        "input": "0x",
        "output": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "calls": [
          {
            "from": "0xc083e9947cf02b8ffc7d3090ae9aea72df98fd47",
            "gas": "0x18c56",
            "gasUsed": "0x5a4",
            "to": "0x273930d21e01ee25e4c219b63259d214872220a2",
            "input": "0x",
            "value": "0x56bc75e2d63100000",
            "type": "CALLCODE"
          }
        ],
        "value": "0x56bc75e2d63100000",
        "type": "CALL"
      }
    },
    {
      "result": {
        "from": "0x32be343b94f860124dc4fee278fdcbd38c102d88",
        "gas": "0x7148",
        "gasUsed": "0x5208",
        "to": "0xdf190dc7190dfba737d7777a163445b7fff16133",
        "input": "0x",
        "value": "0x6113a84987be800",
        "type": "CALL"
      }
    }
  ]
}