Parameters
- blockHashstringREQUIRED
The hash of the block to be traced
- 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
Returns
- arrayarray
The array of transaction trace results
- resultobject
The trace result object containing the execution details of the transaction
- callsarray
The list of internal call frames triggered during execution (may be nested)
- typestring
The type of the call such as CALL, STATICCALL, or DELEGATECALL
- fromstring
The address the call was made from
- gasstring
The amount of gas provided for the call encoded as a hexadecimal string
- gasUsedstring
The amount of gas consumed during the call encoded as a hexadecimal string
- inputstring
Hex-encoded calldata sent with the call
- outputstring
Hex-encoded data returned from the call (empty 0x if none)
- tostring
The address the call was made to
- valuestring
The amount of value transferred in wei encoded as a hexadecimal string
- callsarray
(Optional) Nested internal sub-calls triggered by this call frame
- errorstring
(Optional) Error message if the call failed (e.g., execution reverted)
- fromstring
The address that initiated the top-level call
- gasstring
Total gas provided for the top-level call encoded as a hexadecimal string
- gasUsedstring
Total gas consumed by the top-level call encoded as a hexadecimal string
- inputstring
Hex-encoded calldata for the top-level call
- outputstring
Hex-encoded return data from the top-level call (0x if none)
- tostring
The address targeted by the top-level call
- typestring
The type of the top-level call such as CALL or STATICCALL
- valuestring
The value (wei) sent with the top-level call encoded as a hexadecimal string
1{2"jsonrpc": "2.0",3"id": 1,4"result": [5{6"type": "CALL",7"from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3",8"to": "0x6b175474e89094c44da98b954eedeac495271d0f",9"value": "0x0",10"gas": "0x30d40",11"gasUsed": "0x7148",12"input": "0xa9059cbb0000000000000000000000002c46b28e4bac6b0188baf722f17f5f36e217033000000000000000000000000000000000000000000000000058d15e176280000",13"output": "0x0000000000000000000000000000000000000000000000000000000000000001",14"calls": [15{16"type": "STATICCALL",17"from": "0x6b175474e89094c44da98b954eedeac495271d0f",18"to": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3",19"gas": "0x2e010",20"gasUsed": "0x1388",21"input": "0x70a08231000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",22"output": "0x0000000000000000000000000000000000000000000b56ea85ae38dd000000",23"calls": []24}25]26},27{28"type": "CALL",29"from": "0x81b7e08f65bdf5648606c89998a9cc8164397647",30"to": "0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f",31"value": "0x0",32"gas": "0x2a3a0",33"gasUsed": "0x123b4",34"input": "0xe8e33700000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",35"output": "0x000000000000000000000000f7ae43fabe91b091e3bae07d91b5c8758e97c12b",36"calls": []37}38]39}
1{2"jsonrpc": "2.0",3"id": 1,4"result": [5{6"type": "CALL",7"from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3",8"to": "0x6b175474e89094c44da98b954eedeac495271d0f",9"value": "0x0",10"gas": "0x30d40",11"gasUsed": "0x7148",12"input": "0xa9059cbb0000000000000000000000002c46b28e4bac6b0188baf722f17f5f36e217033000000000000000000000000000000000000000000000000058d15e176280000",13"output": "0x0000000000000000000000000000000000000000000000000000000000000001",14"calls": [15{16"type": "STATICCALL",17"from": "0x6b175474e89094c44da98b954eedeac495271d0f",18"to": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3",19"gas": "0x2e010",20"gasUsed": "0x1388",21"input": "0x70a08231000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",22"output": "0x0000000000000000000000000000000000000000000b56ea85ae38dd000000",23"calls": []24}25]26},27{28"type": "CALL",29"from": "0x81b7e08f65bdf5648606c89998a9cc8164397647",30"to": "0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f",31"value": "0x0",32"gas": "0x2a3a0",33"gasUsed": "0x123b4",34"input": "0xe8e33700000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",35"output": "0x000000000000000000000000f7ae43fabe91b091e3bae07d91b5c8758e97c12b",36"calls": []37}38]39}