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

Parameters

  1. 1.
    Quantity or Tag - Integer of a block number, or the string 'earliest', 'latest' or 'pending'.
  2. 2.
    Array - Type of trace, one or more of: "vmTrace", "trace", "stateDiff".
1
params: [
2
"0x2ed119",
3
["trace"]
4
]
Copied!

Returns

  • Array - Block transactions traces.

Example

Request

Curl
Postman
1
curl https://eth-mainnet.alchemyapi.io/v2/your-api-key \
2
-X POST \
3
-H "Content-Type: application/json" \
4
-d '{"method":"trace_replayBlockTransactions","params":["0x2ed119",["trace"]],"id":1,"jsonrpc":"2.0"}'
Copied!
1
URL: https://eth-mainnet.alchemyapi.io/v2/your-api-key
2
RequestType: POST
3
Body:
4
{
5
"jsonrpc":"2.0",
6
"method":"trace_replayBlockTransactions",
7
"params":["0x2ed119",["trace"]],
8
"id":1
9
}
Copied!

Response

1
{
2
"jsonrpc": "2.0",
3
"result": [
4
{
5
"output": "0x",
6
"stateDiff": null,
7
"trace": [
8
{
9
"action": {
10
"callType": "call",
11
"from": "0xaa7b131dc60b80d3cf5e59b5a21a666aa039c951",
12
"gas": "0x0",
13
"input": "0x",
14
"to": "0xd40aba8166a212d6892125f079c33e6f5ca19814",
15
"value": "0x4768d7effc3fbe"
16
},
17
"result": {
18
"gasUsed": "0x0",
19
"output": "0x"
20
},
21
"subtraces": 0,
22
"traceAddress": [],
23
"type": "call"
24
}
25
],
26
"transactionHash": "0x07da28d752aba3b9dd7060005e554719c6205c8a3aea358599fc9b245c52f1f6",
27
"vmTrace": null
28
},
29
{
30
"output": "0x",
31
"stateDiff": null,
32
"trace": [
33
{
34
"action": {
35
"callType": "call",
36
"from": "0x4f11ba23bb526c0486d83c6a8f18f632f3fc172a",
37
"gas": "0x0",
38
"input": "0x",
39
"to": "0x7ed1e469fcb3ee19c0366d829e291451be638e59",
40
"value": "0x446cde325fbfbe"
41
},
42
"result": {
43
"gasUsed": "0x0",
44
"output": "0x"
45
},
46
"subtraces": 0,
47
"traceAddress": [],
48
"type": "call"
49
}
50
],
51
"transactionHash": "0x056f11efb5da4ff7cf8523cfcef08393e5dd2ff3ab3223e4324426d285d7ae92",
52
"vmTrace": null
53
},
54
{
55
...
56
}
57
],
58
"id": 0
59
}
Copied!