POST
/
2fc1de7f08c0465f6a28e3c355e0cb14
curl --request POST \
  --url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "trace_block",
  "id": 1,
  "params": [
    "0xbb5583"
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": [
    {}
  ]
}

Base API method trace_block provides a comprehensive trace of all transactions included in a specific block. This method is crucial for developers, auditors, and blockchain analysts who need to understand the detailed execution flow of every transaction within a block, including contract calls, state changes, and event emissions. It offers a holistic view of the block’s impact on the Ethereum Virtual Machine (EVM) and the blockchain state.

Parameters

  • blockNumber or blockHash — The number or hash of the block you wish to trace, specified as a hexadecimal string or a decimal number. This identifies the specific block whose transactions you want to analyze in detail.

Response

  • result — An array containing the trace data for each transaction in the specified block. Each element in the array represents the trace of a single transaction, detailing every operation executed, such as calls to other contracts, value transfers, and the execution outcomes.

Use case

The trace_block method is invaluable for conducting in-depth block analyses. Developers can use it to debug and optimize the interactions of multiple transactions within a block, auditors can employ it to ensure the security and integrity of all transactions in a block, and analysts might use it to investigate block-wide patterns or detect anomalies. This method provides a comprehensive overview of how a block’s transactions interact with the blockchain, which is crucial for understanding its overall effects and ensuring its correctness.

Body

application/json

Response

200 - application/json
Detailed execution traces for all transactions in the specified block

The response is of type object.