import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.data.evm.contracts.getDeploymentTransaction({
address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
currency: "usd",
});
console.log(result);
}
run();{
"networkTokenDetails": {
"networkToken": {
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>",
"description": "<string>"
},
"currentPrice": {
"value": 123
},
"historicalPrice": {
"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": {
"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,
"logoUri": "<string>",
"price": {
"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>",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"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>",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"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>"
},
"value": "<string>",
"isReverted": true,
"gasUsed": "<string>",
"gasLimit": "<string>"
}
],
"teleporterMessageInfo": {
"teleporterMessageId": "<string>",
"sourceChainId": "<string>",
"destinationChainId": "<string>"
}
}Get deployment transaction
If the address is a smart contract, returns the transaction in which it was deployed.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.data.evm.contracts.getDeploymentTransaction({
address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
currency: "usd",
});
console.log(result);
}
run();{
"networkTokenDetails": {
"networkToken": {
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>",
"description": "<string>"
},
"currentPrice": {
"value": 123
},
"historicalPrice": {
"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": {
"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,
"logoUri": "<string>",
"price": {
"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>",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"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>",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"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>"
},
"value": "<string>",
"isReverted": true,
"gasUsed": "<string>",
"gasLimit": "<string>"
}
],
"teleporterMessageInfo": {
"teleporterMessageId": "<string>",
"sourceChainId": "<string>",
"destinationChainId": "<string>"
}
}Authorizations
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
Path Parameters
A supported evm chain id or blockchain id. Use the /chains endpoint to get a list of supported chain ids.
Contract address on the relevant chain.
Query Parameters
The currency that return values should use. Defaults to USD. ISO 4217 currency code.
usd, eur, aud, cad, chf, clp, cny, czk, dkk, gbp, hkd, huf, jpy, nzd Response
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The list of ERC-20 transfers.
Show child attributes
Show child attributes
The list of ERC-721 transfers.
Show child attributes
Show child attributes
The list of ERC-1155 transfers.
Show child attributes
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
Show child attributes
Corresponding teleporter message info if available.
Show child attributes
Show child attributes
Was this page helpful?