API Reference

trace_replayBlockTransactions - Trace API

Replays all transactions in a block, returning the requested traces for each transaction.

Parameters

  • Quantity or Tag - Integer of a block number, or the string 'earliest', 'latest' or 'pending'.
  • Array - Type of trace, one or more of: "vmTrace", "trace", "stateDiff".

Returns

Array - Block transactions traces.


Example

Request

curl --location --request POST 'https://eth-mainnet.unifra.io/v1/{your-api-key} \ --header 'Content-Type: application/json' \ --data-raw '{"method":"trace_replayBlockTransactions","params":["latest",["trace"]],"id":1,"jsonrpc":"2.0"}'

Result

{ "jsonrpc": "2.0", "id": 1, "result": [ { "output": "0x", "stateDiff": null, "trace": [ { "action": { "from": "0xb84058c2c724ae058da7f8d4c793582b47a5230b", "callType": "call", "gas": "0x1f418", "input": "0x23b872dd000000000000000000000000d4c5df598c880af78cc3f5d2ca193f59dfb5fe6a000000000000000000000000f9ff7ca02cc8eb8825a0c806befd13284bfb7f9b00000000000000000000000000000000000000000000000000000000205c7439", "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", "value": "0x0" }, "result": { "gasUsed": "0xaa6e", "output": "0x" }, "subtraces": 0, "traceAddress": [], "type": "call" } ], "vmTrace": null, "transactionHash": "0x7d25e41d6efb6e4e4c58381db21076480977fb977eee560269f28c9ee6a549e3" }, { "output": "0x", "stateDiff": null, "trace": [ { "action": { "from": "0xbd57427ab2a0d3ab21f658b47ce224a2bb7ecec3", "callType": "call", "gas": "0x0", "input": "0x", "to": "0xddf437d81201473d701fb175fd1a951414d6c428", "value": "0x229a35878cad17d0" }, "result": { "gasUsed": "0x0", "output": "0x" }, "subtraces": 0, "traceAddress": [], "type": "call" } ], "vmTrace": null, "transactionHash": "0x27427522f971ed7938fbbeae8b56fad6cb8dcdc08a630a7817bd3007057b60bd" }, ..... }

🚧

The below parameter inputs do not work, please reference the section above instead.

📘

If there is no response when you click the "try it" button frist time,click it again.

Path Params
string
required
Body Params
string
Defaults to 2.0
string
Defaults to trace_replayBlockTransactions
array of strings
params
int32
Defaults to 1
Responses

Language
Click Try It! to start a request and see the response here! Or choose an example:
application/json