Parameters
- blockNumberstringREQUIRED
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
- objectobjectREQUIRED
The tracer object with the following fields:
- tracerstring
The type of tracer. It could be callTracer or prestateTracer
- callTracerstring
The calltracer keeps track of all call frames, including depth 0 calls, that are made during a transaction
- prestateTracerstring
The prestateTracer replays the transaction and tracks every part of state that occured during the transaction
- tracerConfigobject
The object to specify the configurations of the tracer
- onlyTopCallboolean
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
- withLogboolean
When set to true with callTracer, includes emitted logs in each call frame.
- diffModeboolean
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
- txHashstring
The transaction hash associated with this trace result
- resultobject
The call frame returned by the selected tracer
- typestring
The call type, such as CALL, STATICCALL, or DELEGATECALL
- fromstring
The address the call was sent from
- tostring
The address the call was directed to
- valuestring
The value sent with the call, encoded as a hexadecimal quantity
- gasstring
The gas provided for the call, encoded as a hexadecimal quantity
- gasUsedstring
The gas used by the call, encoded as a hexadecimal quantity
- inputstring
The call input data
- outputstring
The call output data, when present
- callsarray
Nested call frames. Each entry uses the same call-frame structure as the parent result.
- logsarray
Logs emitted by this call frame when tracerConfig.withLog is true
- addressstring
The address that emitted the log
- topicsarray
The log topics
- datastring
The non-indexed log data
- indexstring
The log position within the transaction, encoded as a hexadecimal quantity
- positionstring
The log position within the current call frame, encoded as a hexadecimal quantity
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}