debug_traceBlockByHash
curl --request POST \
--url https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "debug_traceBlockByHash",
"params": [
"0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc",
{
"tracer": "callTracer"
}
]
}
'import requests
url = "https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "debug_traceBlockByHash",
"params": ["0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc", { "tracer": "callTracer" }]
}
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({
id: 1,
jsonrpc: '2.0',
method: 'debug_traceBlockByHash',
params: [
'0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc',
{tracer: 'callTracer'}
]
})
};
fetch('https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/', 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://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/",
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([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'debug_traceBlockByHash',
'params' => [
'0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc',
[
'tracer' => 'callTracer'
]
]
]),
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://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceBlockByHash\",\n \"params\": [\n \"0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc\",\n {\n \"tracer\": \"callTracer\"\n }\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://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceBlockByHash\",\n \"params\": [\n \"0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc\",\n {\n \"tracer\": \"callTracer\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/")
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 \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceBlockByHash\",\n \"params\": [\n \"0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc\",\n {\n \"tracer\": \"callTracer\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"result": {
"from": "0x19d7cf8ea0ce468417d1eda365a222a9dcbc7d27",
"gas": "0x927c0",
"gasUsed": "0xc550",
"to": "0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f",
"input": "0xb61d27f60000000000000000000000001ff9c167b50d05910ffdadb82d3d2da4508330ca0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000040a617bee00000000000000000000000000000000000000000000000000000000",
"output": "0x4e487b710000000000000000000000000000000000000000000000000000000000000012",
"error": "execution reverted",
"revertReason": "division or modulo by zero",
"calls": [
{
"from": "0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f",
"gas": "0x89bee",
"gasUsed": "0x5c52",
"to": "0xd206ac7fef53d83ed4563e770b28dba90d0d9ec8",
"input": "0xb61d27f60000000000000000000000001ff9c167b50d05910ffdadb82d3d2da4508330ca0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000040a617bee00000000000000000000000000000000000000000000000000000000",
"output": "0x4e487b710000000000000000000000000000000000000000000000000000000000000012",
"error": "execution reverted",
"revertReason": "division or modulo by zero",
"calls": [
{
"from": "0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f",
"gas": "0x7530",
"gasUsed": "0xf1",
"to": "0x1ff9c167b50d05910ffdadb82d3d2da4508330ca",
"input": "0x01ffc9a701ffc9a700000000000000000000000000000000000000000000000000000000",
"type": "STATICCALL"
},
{
"from": "0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f",
"gas": "0x82a56",
"gasUsed": "0xb84",
"to": "0x1ff9c167b50d05910ffdadb82d3d2da4508330ca",
"input": "0x0a617bee",
"output": "0x4e487b710000000000000000000000000000000000000000000000000000000000000012",
"error": "execution reverted",
"revertReason": "division or modulo by zero",
"value": "0x0",
"type": "CALL"
}
],
"value": "0x0",
"type": "DELEGATECALL"
}
],
"value": "0x0",
"type": "CALL"
},
"txHash": "0xfc48f7c70e8ffaa46b1110dc43f32e90f65434a0949edab384d066c820c57ee2"
}
]
}Arc node API
debug_traceBlockByHash | Arc
Arc API method that returns detailed traces for all transactions in a block specified by block hash. Chainstack Arc reference.
POST
/
debug_traceBlockByHash
curl --request POST \
--url https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "debug_traceBlockByHash",
"params": [
"0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc",
{
"tracer": "callTracer"
}
]
}
'import requests
url = "https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "debug_traceBlockByHash",
"params": ["0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc", { "tracer": "callTracer" }]
}
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({
id: 1,
jsonrpc: '2.0',
method: 'debug_traceBlockByHash',
params: [
'0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc',
{tracer: 'callTracer'}
]
})
};
fetch('https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/', 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://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/",
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([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'debug_traceBlockByHash',
'params' => [
'0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc',
[
'tracer' => 'callTracer'
]
]
]),
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://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceBlockByHash\",\n \"params\": [\n \"0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc\",\n {\n \"tracer\": \"callTracer\"\n }\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://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceBlockByHash\",\n \"params\": [\n \"0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc\",\n {\n \"tracer\": \"callTracer\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/")
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 \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceBlockByHash\",\n \"params\": [\n \"0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc\",\n {\n \"tracer\": \"callTracer\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"result": {
"from": "0x19d7cf8ea0ce468417d1eda365a222a9dcbc7d27",
"gas": "0x927c0",
"gasUsed": "0xc550",
"to": "0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f",
"input": "0xb61d27f60000000000000000000000001ff9c167b50d05910ffdadb82d3d2da4508330ca0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000040a617bee00000000000000000000000000000000000000000000000000000000",
"output": "0x4e487b710000000000000000000000000000000000000000000000000000000000000012",
"error": "execution reverted",
"revertReason": "division or modulo by zero",
"calls": [
{
"from": "0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f",
"gas": "0x89bee",
"gasUsed": "0x5c52",
"to": "0xd206ac7fef53d83ed4563e770b28dba90d0d9ec8",
"input": "0xb61d27f60000000000000000000000001ff9c167b50d05910ffdadb82d3d2da4508330ca0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000040a617bee00000000000000000000000000000000000000000000000000000000",
"output": "0x4e487b710000000000000000000000000000000000000000000000000000000000000012",
"error": "execution reverted",
"revertReason": "division or modulo by zero",
"calls": [
{
"from": "0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f",
"gas": "0x7530",
"gasUsed": "0xf1",
"to": "0x1ff9c167b50d05910ffdadb82d3d2da4508330ca",
"input": "0x01ffc9a701ffc9a700000000000000000000000000000000000000000000000000000000",
"type": "STATICCALL"
},
{
"from": "0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f",
"gas": "0x82a56",
"gasUsed": "0xb84",
"to": "0x1ff9c167b50d05910ffdadb82d3d2da4508330ca",
"input": "0x0a617bee",
"output": "0x4e487b710000000000000000000000000000000000000000000000000000000000000012",
"error": "execution reverted",
"revertReason": "division or modulo by zero",
"value": "0x0",
"type": "CALL"
}
],
"value": "0x0",
"type": "DELEGATECALL"
}
],
"value": "0x0",
"type": "CALL"
},
"txHash": "0xfc48f7c70e8ffaa46b1110dc43f32e90f65434a0949edab384d066c820c57ee2"
}
]
}Arc API method that returns detailed traces for all transactions in a block specified by block hash. This is useful for analyzing all contract interactions within a specific block.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
blockHash— the hash of the block to tracetracerConfig— (optional) tracer configuration object:tracer— tracer type (e.g.,callTracer,prestateTracer)timeout— (optional) timeout for the tracetracerConfig— (optional) tracer-specific configuration
Response
result— array of trace objects, one for each transaction in the block. The format depends on the tracer used.
callTracer, each trace contains:
from— sender addressto— recipient addressgas— gas providedgasUsed— gas consumedinput— call dataoutput— return datacalls— nested array of internal callstype— call type (CALL, DELEGATECALL, etc.)
debug_traceBlockByHash code examples
const ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);
const traceBlockByHash = async (blockHash) => {
const traces = await provider.send("debug_traceBlockByHash", [
blockHash,
{ tracer: "callTracer" }
]);
console.log(`Block contains ${traces.length} transaction traces`);
for (let i = 0; i < traces.length; i++) {
const trace = traces[i].result;
console.log(`\nTx ${i}: ${trace.from} -> ${trace.to}`);
console.log(` Type: ${trace.type}, Gas Used: ${trace.gasUsed}`);
}
};
traceBlockByHash("0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc");
from web3 import Web3
node_url = "CHAINSTACK_NODE_URL"
web3 = Web3(Web3.HTTPProvider(node_url))
result = web3.provider.make_request("debug_traceBlockByHash", [
"0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc",
{"tracer": "callTracer"}
])
traces = result['result']
print(f"Block contains {len(traces)} transaction traces")
for i, tx_trace in enumerate(traces):
trace = tx_trace['result']
print(f"\nTx {i}: {trace['from']} -> {trace.get('to', 'Contract Creation')}")
print(f" Type: {trace['type']}, Gas Used: {trace['gasUsed']}")
curl -X POST "CHAINSTACK_NODE_URL" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceBlockByHash",
"params": ["0xa86891cc8ae2e3efe67b21e24f8f852e76a0875892e9e8c9a4c77aab8e2761cc", {"tracer": "callTracer"}],
"id": 1
}'
Last modified on August 3, 2026
Was this page helpful?
⌘I