Skip to main content

trace_block

POST

Traces the execution of all transactions included in a specified block. This method provides detailed trace information for all transactions executed in that block and is used to analyze the transaction processing at the block level.
param[0]
blockNumberOrTagstringrequired
Use either block number or block tag to specify a block.
  • Block number: Hexadecimal string (e.g. "0x1")
  • Block tag: Enum string (e.g. "latest", "earliest", "pending")
    • earliest: The oldest available block on the chain.
    • finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.
    • safe: A recent block considered safe by the network (immune to reorgs).
    • latest: The most recent block on the chain (may be subject to reorgs).
    • pending: The next block to be mined, including pending transactions in the mempool.
Responses
Information about the traced action
fromstring
Caller address
callTypestring
Call type (call, delegatecall, staticcall, etc.)
gasstring
Gas limit set for the call (hex)
inputstring
Call input data (hex)
tostring
Callee address
valuestring
Amount of ETH transferred (hex, in wei)
blockHashstring
Hash of the block containing the transaction
blockNumberinteger
Block number containing the transaction
Call result
gasUsedstring
Actual gas used (hex)
outputstring
Call return data (hex)
subtracesinteger
Number of sub-traces
traceAddressarray
Index array representing the trace path
transactionHashstring
Hash of the traced transaction
transactionPositioninteger
Position of the transaction within the block
typestring
Trace type (call, create, reward, etc.)
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://ethereum-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "trace_block",
"params": [
"latest"
]
}'