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 list of ERC-20 transfers.
Show child attributes
The list of ERC-721 transfers.
Show child attributes
The list of ERC-1155 transfers.
Show child attributes
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
Corresponding teleporter message info if available.
Show child attributes
Was this page helpful?