Get block trace by number
Supported on: Ethereum Base BNB Chain Sonic Unichain Arbitrum Avalanche ZKsync Gnosis Optimism Polygon Linea
Parameters
chain
* string path blockNumber
* string pathRequest Body
This request doesn’t have any request body.
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const axios = require('axios');
async function httpCall() {
const url =
'https://api.1inch.com/traces/v1.0/chain/{chain}/block-trace/{blockNumber}';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {};
try {
const response = await axios.get(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
400
401
500
anyOf[0]
CoreBuiltinBlockTracesDto object type
* string (Enum)CUSTOM
CUSTOM_WITHOUT_STORE
BUILTIN
CUSTOM_GO
OLD_ARBITRUM_RAW_TRACE
BLOCK_STATE_V3
version
* string number
* number blockHash
* string blockTimestamp
* string traces
* array items
CoreBuiltinTransactionRootSuccessTraceDto object chainId
* number (Enum)1
45
137
10
56
42161
43114
100
250
1313161554
8217
324
8453
59144
501
146
130
type
* string (Enum)SELFDESTRUCT
CREATE
CREATE2
CALL
CALLCODE
DELEGATECALL
STATICCALL
TRANSFER_ETHER
INVALID
STOP
from
* string to
* string value
* string gas
* string gasUsed
* string input
* string output
* string calls
* array items
CoreBuiltinCallTraceDto object isParentHasError
* boolean type
* string (Enum)SELFDESTRUCT
CREATE
CREATE2
CALL
CALLCODE
DELEGATECALL
STATICCALL
TRANSFER_ETHER
INVALID
STOP
from
* string to
* string value
* string gas
* string gasUsed
* string input
* string output
* string error
* string calls
* array items
CoreBuiltinCallTraceDto any txHash
* string nonce
* string error
* string revertReason
* string gasPrice
* string maxFeePerGas
* string maxPriorityFeePerGas
* string gasHex
* string events
* array items
CoreBuiltinTraceLogDto object data
* string topics
* array items
array contract
* string anyOf[1]
CoreCustomBlockTraceDto object type
* string (Enum)CUSTOM
CUSTOM_WITHOUT_STORE
BUILTIN
CUSTOM_GO
OLD_ARBITRUM_RAW_TRACE
BLOCK_STATE_V3
version
* string number
* number blockHash
* string blockTimestamp
* string traces
* array items
any oneOf[0]
CoreCustomErrorTransactionTraceDto object error
* string txHash
* string nonce
* string gasPrice
* string maxFeePerGas
* string maxPriorityFeePerGas
* string gasHex
* string oneOf[1]
CoreCustomRootTxEventCallstackTraceFullDto object type
* string (Enum)SELFDESTRUCT
CREATE
CREATE2
CALL
CALLCODE
DELEGATECALL
STATICCALL
TRANSFER_ETHER
INVALID
STOP
from
* string to
* string value
* string gasLimit
* number gasUsed
* number input
* string output
* string time
* string calls
* array items
CoreCustomTxEventCallstackTraceDto object type
* string from
* string to
* string value
* string gasLimit
* number gasUsed
* number input
* string output
* string time
* string calls
* array items
CoreCustomTxEventCallstackTraceDto any logs
* array items
CoreCustomTraceLogDto object data
* string topics
* array items
array contract
* string status
* string (Enum)REVERTED
INVALID_OPCODE
RETURNED
STOPPED
ERROR
NO_CONTRACT
OUT_OF_GAS
SELFDESTRUCTED
ERROR_UNWIND
success
* number res
* string depth
* number destructAddress
* string errorDetails
* string storage
* array items
CustomStorageDto object type
* string key
* string value
* string prevGasLimit
* number gas
* string gasCost
* number address
* string logs
* array items
CoreCustomTraceLogDto object data
* string topics
* array items
array contract
* string status
* string (Enum)REVERTED
INVALID_OPCODE
RETURNED
STOPPED
ERROR
NO_CONTRACT
OUT_OF_GAS
SELFDESTRUCTED
ERROR_UNWIND
success
* number address
* string res
* string depth
* number destructAddress
* string errorDetails
* string storage
* array items
CustomStorageDto object type
* string key
* string value
* string txHash
* string nonce
* string gasPrice
* string maxFeePerGas
* string maxPriorityFeePerGas
* string intrinsicGas
* number gasRefund
* number gasActual
* number gasHex
* string JSON
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
"type": "BUILTIN",
"version": "v1.2.3",
"number": "16123123",
"blockHash": "0xb80490b1bed7a31536b888de977f92b5c03707bf8c69ab3d066a2eef3dc2e26c",
"blockTimestamp": "0x64bf5cde",
"traces": [
{
"chainId": 1,
"type": "CALL",
"from": "0x71dad91e069861350c2ba882fd86762a5efe8792",
"to": "0x71dad91e069861350c2ba882fd86762a5efe8792",
"value": "0x5f68e8131ecf80000",
"gas": "0x3e48f",
"gasUsed": "0x5da9",
"input": "0xd0e30db0",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"calls": [
{
"isParentHasError": true,
"type": "CALL",
"from": "0x71dad91e069861350c2ba882fd86762a5efe8792",
"to": "0x71dad91e069861350c2ba882fd86762a5efe8792",
"value": "0x5f68e8131ecf80000",
"gas": "0x3e48f",
"gasUsed": "0x5da9",
"input": "0xd0e30db0",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"error": "error",
"calls": [null]
}
],
"txHash": "0xbf424a717932e4868644f69e8f297ce51d5f4596089635312b2ad9c610cc0018",
"nonce": "0x1",
"error": "error",
"revertReason": "error",
"gasPrice": "0x123",
"maxFeePerGas": "0x345",
"maxPriorityFeePerGas": "0x123",
"gasHex": "0x35b60",
"events": [
{
"data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x00000000000000000000000059eb67ecbb7e68ee94114b2f77d91074404504be",
"0x000000000000000000000000a5e0829caced8ffdd4de3c43696c57f7d7a678ff"
],
"contract": "0x0000000000000000000000000000000000001010"
}
]
}
]
}