debug_traceBlockByHash
Returns the possible tracing result number by executing all transactions in the block specified by the block hash with a tracer.
This method will use 80
Compute Units.
Parameters
blockHash
- String - Required - The block hash.
object
- Object - Required - The tracer object with the following fields:
tracer
- String - The type of tracer, options are:callTracer
orprestateTracer
.callTracer
- String - The callTracer keeps track of all call frames, including depth - calls, that are made during a transaction.prestateTracer
- String - The prestateTracer replays the transaction and tracks every part of state that occurred during the transaction.
tracerConfig
- Object (Optional) - 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.
Returns
result
- An array of transaction objects for that block, each containing:
txHash
- The transaction hash of the transactionresult
- An object containing detailed information about the traced transactionbeforeEVMTransfers
- An array representing EVM transfers that occurred before the execution of the transactionpurpose
- (Optional) The purpose of the EVM transferfrom
- (Optional) The Ethereum address initiating the transferto
- (Optional) The Ethereum address receiving the transfervalue
- (Optional) The value of the transfer, specified in hexadecimal format (Wei)
afterEVMTransfers
- An array representing EVM transfers that occurred after the execution of the transactionOptional fields are the same as
beforeEVMTransfers
above
from
- The address the transaction is sent from.gas
- The integer of the gas provided for the transaction execution.gasUsed
- The integer of the gas used.to
- The address the transaction is directed to.input
- The data given at the time of input.value
- The integer of the value sent with this transaction.type
- The type of call.
calls
- A list of sub-calls.
// Result
{
"jsonrpc": "2.0",
"result": [
{
"txHash": "0x727340a318d712e723fa01c9a239572f2dfd83084e15dc2b882ba6e8e42ed35f",
"result": {
"beforeEVMTransfers": [],
"afterEVMTransfers": [],
"from": "0x00000000000000000000000000000000000a4b05",
"gas": "0x0",
"gasUsed": "0x0",
"to": "0x00000000000000000000000000000000000a4b05",
"input": "0x6bf6a42d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013d0d4b000000000000000000000000000000000000000000000000000000000f3082ac0000000000000000000000000000000000000000000000000000000000000000",
"value": "0x0",
"type": "CALL"
}
},
{
"txHash": "0xf257edd971c8aea7b9a59e03f6f15696f02cdb2908d4e5b6c3fa82ab3bc2966f",
"result": {
"beforeEVMTransfers": [
{
"purpose": "feePayment",
"from": "0x46DB4cC823d1a4ad2E07727b42a64Dd6d2F64B9D",
"to": null,
"value": "0x6b5cab97900"
}
],
"afterEVMTransfers": [
{
"purpose": "gasRefund",
"from": null,
"to": "0x46DB4cC823d1a4ad2E07727b42a64Dd6d2F64B9D",
"value": "0x512a1141c80"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0xbF5041Fc07E1c866D15c749156657B8eEd0fb649",
"value": "0xae3d22cb80"
},
{
"purpose": "feeCollection",
"from": null,
"to": "0xa4B00000000000000000000000000000000000F6",
"value": "0xf4ec829100"
}
],
"from": "0x46db4cc823d1a4ad2e07727b42a64dd6d2f64b9d",
"gas": "0xb41fa",
"gasUsed": "0x2bf3d",
"to": "0x1f0ea3b63f3fca05719e54e7469ef897754ef666",
"input": "0x1589b24f000000000000000000000000000000000000000000000000000000000000000200000000000000000000000089060b31db21c6cb4e946eacb28efeff085c275a2847e7f2823a5048f4ae2cd808a5e978aa6ce41fcbb6e7e7bbbb1b64446b0639000000000000000000000000000000000000000000000000de0b6b3a76400000",
"calls": [
{
"from": "0x1f0ea3b63f3fca05719e54e7469ef897754ef666",
"gas": "0x7530",
"gasUsed": "0x0",
"to": "0x0000000000000000000000000000000000000000",
"input": "0x01ffc9a701ffc9a700000000000000000000000000000000000000000000000000000000",
"type": "STATICCALL"
},
{
"from": "0x1f0ea3b63f3fca05719e54e7469ef897754ef666",
"gas": "0x8a1c7",
"gasUsed": "0x4b83",
"to": "0xc352c711943941d608d0545ef2e6fe57d9e70155",
"input": "0xc94e66ef000000000000000000000000000000000000000000000000000000000000000200000000000000000000000089060b31db21c6cb4e946eacb28efeff085c275a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000645217c5302847e7f2823a5048f4ae2cd808a5e978aa6ce41fcbb6e7e7bbbb1b64446b063900000000000000000000000046db4cc823d1a4ad2e07727b42a64dd6d2f64b9d000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000",
"output": "0x000000000000000000000000000000000000000000000000000000000001acb4",
"value": "0x0",
"type": "CALL"
}
],
"value": "0x0",
"type": "CALL"
}
},
...
}
curl https://mainnet.arbitrum.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"debug_traceBlockByHash","params":["0x89f968e73472c656cbed1e084980e09b3ec06fbaa4b174b51f1cb60ac457ae99", {"tracer": "callTracer"}],"id":1}'
Last updated
Was this helpful?