Skip to main content

debug_traceBlockByNumber RPC Method

Returns the tracing result by executing all transactions in the block specified by number with a tracer.

Updated on
May 21, 2026
This RPC method is included in the Free Trial with limited usage. Upgrade your plan to get full access and higher limits. Learn more on our pricing page.

Parameters

blockNumber
string
REQUIRED

The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain

object
object
REQUIRED

The tracer object with the following fields:

tracer
string

The type of tracer. It could be callTracer or prestateTracer

callTracer
string

The calltracer keeps track of all call frames, including depth 0 calls, that are made during a transaction

prestateTracer
string

The prestateTracer replays the transaction and tracks every part of state that occured during the transaction

tracerConfig
object

The object to specify the configurations of the tracer

onlyTopCall
boolean

When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame

withLog
boolean

When set to true with callTracer, includes emitted logs in each call frame.

diffMode
boolean

When set to true, diff mode returns the differences between the transaction's pre and post-state. The result object will contain a pre and a post object.

Returns

txHash
string

The transaction hash associated with this trace result

result
object

The call frame returned by the selected tracer

type
string

The call type, such as CALL, STATICCALL, or DELEGATECALL

from
string

The address the call was sent from

to
string

The address the call was directed to

value
string

The value sent with the call, encoded as a hexadecimal quantity

gas
string

The gas provided for the call, encoded as a hexadecimal quantity

gasUsed
string

The gas used by the call, encoded as a hexadecimal quantity

input
string

The call input data

output
string

The call output data, when present

calls
array

Nested call frames. Each entry uses the same call-frame structure as the parent result.

logs
array

Logs emitted by this call frame when tracerConfig.withLog is true

address
string

The address that emitted the log

topics
array

The log topics

data
string

The non-indexed log data

index
string

The log position within the transaction, encoded as a hexadecimal quantity

position
string

The log position within the current call frame, encoded as a hexadecimal quantity

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": [
5
{
6
"txHash": "0xa093ce8ff98ae1656d33f0172e4bfc74d7a1601e04ed0f635e0acfc8ebb24d86",
7
"result": {
8
"from": "0x04d6f7027ae7ce52654aa21bfb67802f0c9ea303",
9
"gas": "0x493e0",
10
"gasUsed": "0x88ff",
11
"to": "0xc1d13492285eb664951e201bf7c80c7c6318a1b5",
12
"input": "0x4782f77900000000000000000000000052e35fc6fd123b05c28f28e3604f6c6f759767e90000000000000000000000000000000000000000000000000058d246ec079000",
13
"calls": [
14
{
15
"from": "0xc1d13492285eb664951e201bf7c80c7c6318a1b5",
16
"gas": "0x3ff6c",
17
"gasUsed": "0x0",
18
"to": "0x52e35fc6fd123b05c28f28e3604f6c6f759767e9",
19
"input": "0x",
20
"value": "0x58d246ec079000",
21
"type": "CALL"
22
}
23
],
24
"logs": [
25
{
26
"address": "0xc1d13492285eb664951e201bf7c80c7c6318a1b5",
27
"topics": [
28
"0x94effa14ea3a1ef396fa2fd829336d1597f1d76b548c26bfa2332869706638af"
29
],
30
"data": "0x0000000000000000000000000000000000000000000000000058d246ec079000",
31
"index": "0x0",
32
"position": "0x1"
33
}
34
],
35
"value": "0x0",
36
"type": "CALL"
37
}
38
}
39
]
40
}
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": [
5
{
6
"txHash": "0xa093ce8ff98ae1656d33f0172e4bfc74d7a1601e04ed0f635e0acfc8ebb24d86",
7
"result": {
8
"from": "0x04d6f7027ae7ce52654aa21bfb67802f0c9ea303",
9
"gas": "0x493e0",
10
"gasUsed": "0x88ff",
11
"to": "0xc1d13492285eb664951e201bf7c80c7c6318a1b5",
12
"input": "0x4782f77900000000000000000000000052e35fc6fd123b05c28f28e3604f6c6f759767e90000000000000000000000000000000000000000000000000058d246ec079000",
13
"calls": [
14
{
15
"from": "0xc1d13492285eb664951e201bf7c80c7c6318a1b5",
16
"gas": "0x3ff6c",
17
"gasUsed": "0x0",
18
"to": "0x52e35fc6fd123b05c28f28e3604f6c6f759767e9",
19
"input": "0x",
20
"value": "0x58d246ec079000",
21
"type": "CALL"
22
}
23
],
24
"logs": [
25
{
26
"address": "0xc1d13492285eb664951e201bf7c80c7c6318a1b5",
27
"topics": [
28
"0x94effa14ea3a1ef396fa2fd829336d1597f1d76b548c26bfa2332869706638af"
29
],
30
"data": "0x0000000000000000000000000000000000000000000000000058d246ec079000",
31
"index": "0x0",
32
"position": "0x1"
33
}
34
],
35
"value": "0x0",
36
"type": "CALL"
37
}
38
}
39
]
40
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free