trace_replayTransaction
Replays a transaction, returning the traces.

Parameters

  1. 1.
    Hash - Transaction hash.
  2. 2.
    Array - Type of trace, one or more of: "vmTrace", "trace", "stateDiff".
1
params: [
2
"0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f",
3
["trace"]
4
]
Copied!

Returns

  • Object - Block 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_replayTransaction","params":["0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f",["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_replayTransaction",
7
"params":["0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f",["trace"]],
8
"id":1
9
}
Copied!

Response

1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"output": "0x",
5
"stateDiff": null,
6
"trace": [
7
{
8
"action": {
9
"callType": "call",
10
"from": "0x00a63d34051602b2cb268ea344d4b8bc4767f2d4",
11
"gas": "0x0",
12
"input": "0x",
13
"to": "0x87cc0d78ee64a9f11b5affdd9ea523872eae14e4",
14
"value": "0x810e988a393f2000"
15
},
16
"result": {
17
"gasUsed": "0x0",
18
"output": "0x"
19
},
20
"subtraces": 0,
21
"traceAddress": [],
22
"type": "call"
23
}
24
],
25
"vmTrace": null
26
},
27
"id": 0
28
}
Copied!