Skip to main content
POST
/
2fc1de7f08c0465f6a28e3c355e0cb14
trace_block
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"
  ]
}
'
import requests

url = "https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14"

payload = {
"jsonrpc": "2.0",
"method": "trace_block",
"id": 1,
"params": ["0xbb5583"]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({jsonrpc: '2.0', method: 'trace_block', id: 1, params: ['0xbb5583']})
};

fetch('https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'method' => 'trace_block',
'id' => 1,
'params' => [
'0xbb5583'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14"

payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"trace_block\",\n \"id\": 1,\n \"params\": [\n \"0xbb5583\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"trace_block\",\n \"id\": 1,\n \"params\": [\n \"0xbb5583\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"trace_block\",\n \"id\": 1,\n \"params\": [\n \"0xbb5583\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "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
jsonrpc
string
default:2.0
required
method
string
default:trace_block
required
id
integer
default:1
required
params
string[]
required

Response

200 - application/json

Detailed execution traces for all transactions in the specified block

jsonrpc
string
id
integer
result
object[]

An array of execution traces for each transaction in the block.

Last modified on July 7, 2026