import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.data.evm.transactions.get({
txHash: "0x8bf584d7b14b92a32a339872a66b134a70ba3ba7c305823f348db6f860253f45",
});
console.log(result);
}
run();{
"networkTokenDetails": {
"networkToken": {
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>",
"description": "<string>"
},
"currentPrice": {
"currencyCode": "usd",
"value": 123
},
"historicalPrice": {
"currencyCode": "usd",
"value": 123
}
},
"nativeTransaction": {
"blockNumber": "<string>",
"blockTimestamp": 123,
"blockHash": "<string>",
"chainId": "<string>",
"blockIndex": 123,
"txHash": "<string>",
"txStatus": "<string>",
"txType": 123,
"gasLimit": "<string>",
"gasUsed": "<string>",
"gasPrice": "<string>",
"nonce": "<string>",
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"value": "<string>",
"input": "<string>",
"baseFeePerGas": "<string>",
"method": {
"callType": "NATIVE_TRANSFER",
"methodHash": "<string>",
"methodName": "<string>"
},
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
},
"erc20Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"value": "<string>",
"erc20Token": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"ercType": "ERC-20",
"logoUri": "<string>",
"price": {
"currencyCode": "usd",
"value": 123
}
}
}
],
"erc721Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"erc721Token": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"ercType": "ERC-721",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"indexStatus": "UNKNOWN",
"metadataLastUpdatedTimestamp": 123,
"name": "<string>",
"symbol": "<string>",
"imageUri": "<string>",
"description": "<string>",
"animationUri": "<string>",
"externalUrl": "<string>",
"background": "<string>",
"attributes": "<string>"
},
"ownerAddress": "<string>"
}
}
],
"erc1155Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"value": "<string>",
"erc1155Token": {
"address": "<string>",
"ercType": "ERC-1155",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"indexStatus": "UNKNOWN",
"metadataLastUpdatedTimestamp": 123,
"name": "<string>",
"symbol": "<string>",
"imageUri": "<string>",
"description": "<string>",
"animationUri": "<string>",
"externalUrl": "<string>",
"background": "<string>",
"decimals": 123,
"properties": "<string>"
}
}
}
],
"internalTransactions": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"internalTxType": "UNKNOWN",
"value": "<string>",
"isReverted": true,
"gasUsed": "<string>",
"gasLimit": "<string>"
}
],
"teleporterMessageInfo": {
"teleporterMessageId": "<string>",
"direction": "SOURCE_TRANSACTION",
"sourceChainId": "<string>",
"destinationChainId": "<string>"
}
}Gets the details of a single transaction.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.data.evm.transactions.get({
txHash: "0x8bf584d7b14b92a32a339872a66b134a70ba3ba7c305823f348db6f860253f45",
});
console.log(result);
}
run();{
"networkTokenDetails": {
"networkToken": {
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>",
"description": "<string>"
},
"currentPrice": {
"currencyCode": "usd",
"value": 123
},
"historicalPrice": {
"currencyCode": "usd",
"value": 123
}
},
"nativeTransaction": {
"blockNumber": "<string>",
"blockTimestamp": 123,
"blockHash": "<string>",
"chainId": "<string>",
"blockIndex": 123,
"txHash": "<string>",
"txStatus": "<string>",
"txType": 123,
"gasLimit": "<string>",
"gasUsed": "<string>",
"gasPrice": "<string>",
"nonce": "<string>",
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"value": "<string>",
"input": "<string>",
"baseFeePerGas": "<string>",
"method": {
"callType": "NATIVE_TRANSFER",
"methodHash": "<string>",
"methodName": "<string>"
},
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>"
},
"erc20Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"value": "<string>",
"erc20Token": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"ercType": "ERC-20",
"logoUri": "<string>",
"price": {
"currencyCode": "usd",
"value": 123
}
}
}
],
"erc721Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"erc721Token": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"ercType": "ERC-721",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"indexStatus": "UNKNOWN",
"metadataLastUpdatedTimestamp": 123,
"name": "<string>",
"symbol": "<string>",
"imageUri": "<string>",
"description": "<string>",
"animationUri": "<string>",
"externalUrl": "<string>",
"background": "<string>",
"attributes": "<string>"
},
"ownerAddress": "<string>"
}
}
],
"erc1155Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"value": "<string>",
"erc1155Token": {
"address": "<string>",
"ercType": "ERC-1155",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"indexStatus": "UNKNOWN",
"metadataLastUpdatedTimestamp": 123,
"name": "<string>",
"symbol": "<string>",
"imageUri": "<string>",
"description": "<string>",
"animationUri": "<string>",
"externalUrl": "<string>",
"background": "<string>",
"decimals": 123,
"properties": "<string>"
}
}
}
],
"internalTransactions": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"internalTxType": "UNKNOWN",
"value": "<string>",
"isReverted": true,
"gasUsed": "<string>",
"gasLimit": "<string>"
}
],
"teleporterMessageInfo": {
"teleporterMessageId": "<string>",
"direction": "SOURCE_TRANSACTION",
"sourceChainId": "<string>",
"destinationChainId": "<string>"
}
}Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
A supported evm chain id or blockchain id. Use the /chains endpoint to get a list of supported chain ids.
A transaction hash.
Successful response
Show child attributes
Show child attributes
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
The current token price, if available.
The historical token price at the time the transaction occured, if available. Note, this is only provided if the transaction occured more than 24 hours ago.
Show child attributes
The block number on the chain.
The block finality timestamp.
The block hash identifier.
The EVM chain ID on which the transaction occured.
The index at which the transaction occured in the block (0-indexed).
The transaction hash identifier.
The transaction status, which is either 0 (failed) or 1 (successful).
The transaction type.
The gas limit set for the transaction.
The amount of gas used.
The gas price denominated by the number of decimals of the native token.
The nonce used by the sender of the transaction.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
The data sent for the transaction.
Show child attributes
The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation.
NATIVE_TRANSFER, CONTRACT_CALL, CONTRACT_CREATION The contract method hash identifier. The method hash is only set if the callType is CONTRACT_CALL.
The contract method name including parameter types. If the callType is NATIVE_TRANSFER this is set to 'Native Transfer'. If the callType is CONTRACT_CREATION this is set to 'Contract Created'.
The list of ERC-20 transfers.
Show child attributes
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
ERC-20 The logo uri for the address.
The token price, if available.
The list of ERC-721 transfers.
Show child attributes
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
ERC-721 Show child attributes
The metadata indexing status of the nft.
UNKNOWN, MISSING_TOKEN, INVALID_TOKEN_URI, INVALID_TOKEN_URI_SCHEME, UNREACHABLE_TOKEN_URI, THROTTLED_TOKEN_URI, METADATA_CONTENT_TOO_LARGE, INVALID_METADATA, INVALID_METADATA_JSON, INDEXED, UNINDEXED A wallet or contract address in mixed-case checksum encoding.
The list of ERC-1155 transfers.
Show child attributes
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
ERC-1155 Show child attributes
The metadata indexing status of the nft.
UNKNOWN, MISSING_TOKEN, INVALID_TOKEN_URI, INVALID_TOKEN_URI_SCHEME, UNREACHABLE_TOKEN_URI, THROTTLED_TOKEN_URI, METADATA_CONTENT_TOO_LARGE, INVALID_METADATA, INVALID_METADATA_JSON, INDEXED, UNINDEXED The list of internal transactions. Note that this list only includes CALL and CALLCODE internal transactions that had a non-zero value and CREATE/CREATE2/CREATE3 calls. Use a client provider to recieve a full debug trace of the transaction.
Show child attributes
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
UNKNOWN, CALL, CREATE, CREATE2, CREATE3, CALLCODE, DELEGATECALL, STATICCALL True if the internal transaction was reverted.
Corresponding teleporter message info if available.
Show child attributes
SOURCE_TRANSACTION, DESTINATION_TRANSACTION chain id of the source chain. valid only for destination transactions
chain id of the destination chain. valid only for source transactions
Was this page helpful?