Skip to content

debug_traceBlockByNumber

Returns the EVM execution traces for all transactions in a block identified by its number.

Debug methods replay every transaction in the block and are computationally expensive. Availability varies by node provider.

NameTypeRequiredDescription
blockstringYesA block number in hex, or one of "latest", "earliest", "safe", "finalized".
tracerConfigobjectNoOptional tracer configuration. See debug_traceTransaction for available options.
FieldTypeDescription
resultarrayArray of trace objects, one per transaction in the block.
{
"jsonrpc": "2.0",
"method": "debug_traceBlockByNumber",
"params": ["latest", {"tracer": "callTracer"}],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"result": {
"type": "CALL",
"gasUsed": "0xab3f"
}
}
]
}