post https://ethereum-mainnet-archive.allthatnode.com/
Similar to debug_traceBlock, traceBlockByHash accepts a block hash and will replay the block that is already present in the database. For the second parameter see TraceConfig reference.
Parameters
blockHash
:string
- The hash of the blockobject
- The tracer object with the following fields:tracer
:string
- The type of tracer. It could be callTracer or prestateTracercallTracer
- The calltracer keeps track of all call frames, including depth 0 calls, that are made during a transactionprestateTracer
- 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 traceronlyTopCall
: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
curl https://ethereum-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "debug_traceBlockByHash",
"params": [
"0xe2aedbb775e5d09871b4e8d07ef00dc6797ce7d4e66c640c2cb1a399f7622e50",
{
"tracer": "callTracer",
"tracderConfig": {
"onlyTopCall": true
}
}
]
}'
Returns
An array
ofobject
with the following fields:
txHash
:string
- transaction hashresult
:object
from
- The address the transaction is sent fromgas
- The integer of the gas provided for the transaction executiongasUsed
- The integer of the gas usedto
- The address the transaction is directed toinput
- The data given at the time of inputoutput
- The data which is returned as an outputcalls
: array - A array of sub-call objectsvalue
- The integer of the value sent with this transactiontype
- The type of the call
{
"jsonrpc": "2.0",
"id": "1",
"result": [
{
"txHash": "0x637eabe31da13cbc095b62668fcfabdf10277bde60ce879e0e3bd06c4db120cc",
"result": {
"from": "0x4e14529d962cba526a70435132cee96599675d45",
"gas": "0xbf4a",
"gasUsed": "0xbded",
"to": "0x6a9014fb802dcc5efe3b97fd40aaa632585636d0",
"input": "0x095ea7b3000000000000000000000000f403c135812408bfbe8713b5a23a04b3d48aae31000000000000000000000000000000000000000000000046681f67c89dd49af3",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"calls": [
{
"from": "0x6a9014fb802dcc5efe3b97fd40aaa632585636d0",
"gas": "0x5ed3",
"gasUsed": "0x5ed3",
"to": "0xc629a01ec23ab04e1050500a3717a2a5c0701497",
"input": "0x095ea7b3000000000000000000000000f403c135812408bfbe8713b5a23a04b3d48aae31000000000000000000000000000000000000000000000046681f67c89dd49af3",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"value": "0x0",
"type": "DELEGATECALL"
}
],
"value": "0x0",
"type": "CALL"
}
},
// another objects
]
}