trace_get
Returns trace at given position.

Parameters

  1. 1.
    Hash - Transaction hash.
  2. 2.
    Array - Index positions of the traces.
1
params: [
2
"0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
3
["0x0"]
4
]
Copied!

Returns

  • Object - Trace object

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_get","params":["0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",["0x0"]],"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_get",
7
"params":["0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",["0x0"]],
8
"id":1
9
}
Copied!

Response

1
{
2
"id": 1,
3
"jsonrpc": "2.0",
4
"result": {
5
"action": {
6
"callType": "call",
7
"from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
8
"gas": "0x13e99",
9
"input": "0x16c72721",
10
"to": "0x2bd2326c993dfaef84f696526064ff22eba5b362",
11
"value": "0x0"
12
},
13
"blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
14
"blockNumber": 3068185,
15
"result": {
16
"gasUsed": "0x183",
17
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
18
},
19
"subtraces": 0,
20
"traceAddress": [
21
0
22
],
23
"transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
24
"transactionPosition": 2,
25
"type": "call"
26
}
27
}
Copied!