🛠️ debug_traceBlockByHash
RPC Method (Base Chain)
The debug_traceBlockByHash
method returns a full execution trace of all transactions in a specified block. This tool is commonly used by developers to debug dApp behavior, analyze MEV interactions, or inspect contract internals on Base.
đź’ˇ
You can access debug_traceBlockByHash
with no extra fee 👉 here (opens in a new tab)
Parameters
block hash
(required) — The hash of the block you want to trace.tracer object
(required) — A configuration object:tracer
(string) — The type of tracer. Options:callTracer
: Tracks all nested calls made by transactions.prestateTracer
: Records account and storage state before and after each transaction.
tracerConfig
(object) — Optional configuration:onlyTopCall
(boolean) — If true, only top-level calls will be included.
Returns
If callTracer
is used
Field | Description |
---|---|
type | Type of the call (e.g. CALL, DELEGATECALL) |
from | Sender address |
to | Recipient address |
gas | Gas provided |
transaction value | Value transferred |
gasUsed | Gas consumed |
input | Call data |
output | Return value |
error | Error message (if any) |
calls | Sub-call tree |
revertReason | If reverted, shows the reason |
If prestateTracer
is used
smart contract address
balance
: Contract balance in weicode
: Contract bytecodenonce
: Account noncestorage
: Contract storage key-value pairs
Request
POST https://base-mainnet.chainnodes.org/YOUR-API-KEY
Example
đź’ˇ
Confusing? Ask blockchain developers in Chainnodes Telegram Chat (opens in a new tab)
- HTTPS POST Request with a JSON-RPC call in the body
- Replace
YOUR-API-KEY
with your key from the CHAINNODES Dashboard (opens in a new tab) - You can use a different supported network by replacing
base-mainnet
curl https://base-mainnet.chainnodes.org/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"debug_traceBlockByHash","params":["0x97b49e43632ac70c46b4003434058b18db0ad809617bd29f3448d46ca9085576", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}'
Body
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"result": {
"from": "0x64bbde373e909501de1309231336761adeaa07d5",
"gas": "0x4b26c",
"gasUsed": "0x2a421",
"to": "0xa57bd00134b2850b2a1c55860c9e9ea100fdd6cf",
"input": "0x1cff79cd000000000000000000000000f424018c3d4473e014c1def44171772059f2d720000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001042fdc7315000000000000000000000000f232d640a5700724748464ba8bd8bed21db609a600000000000000000000000000c83aecc790e8a4453e5dd3b0b4b3680501a7a700000000000000000000000056178a0d5f301baf6cf3e1cd53d9863437345bf900000000000000000000000000000000000000000000c4f6b375a9560f1dc9700000000000000000000000000000000000000000003e09de2596099e2b000000000000000000000000000000000000000000000000000000000061c7edb4810f00000000000000000000000000000000000000000000000000000000616a30c2330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"calls": [
{
"from": "0xa57bd00134b2850b2a1c55860c9e9ea100fdd6cf",
"gas": "0x49451"
// ...
}
]
}
}
]
}
Need RPC API keys?
Get 12.5M archival requests for free today.