Get transaction trace by block number and offset of transaction in block
Supported on: Ethereum Base BNB Chain Optimism Polygon Linea Sonic Unichain Arbitrum Avalanche ZKsync Gnosis
Parameters
chain
* string path blockNumber
* string path offset
* number 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}/offset/{offset}';
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
transactionTrace
* array items
any oneOf[0]
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 oneOf[1]
CoreCustomErrorTransactionTraceDto object error
* string txHash
* string nonce
* string gasPrice
* string maxFeePerGas
* string maxPriorityFeePerGas
* string gasHex
* string oneOf[2]
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 type
* string (Enum)CUSTOM
CUSTOM_WITHOUT_STORE
BUILTIN
CUSTOM_GO
OLD_ARBITRUM_RAW_TRACE
BLOCK_STATE_V3
JSON
Copy
1
2
3
4
5
{
"transactionTrace": [null],
"type": "CUSTOM"
}