Skip to main content
GET
/
v1
/
chains
/
{chainId}
/
contracts
/
{address}
/
transactions:getDeployment
JavaScript
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": {
      "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>"
  }
}

Authorizations

x-glacier-api-key
string
header
required

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.

Path Parameters

chainId
string
required

A supported evm chain id or blockchain id. Use the /chains endpoint to get a list of supported chain ids.

address
string
required

Contract address on the relevant chain.

Query Parameters

currency
enum<string>

The currency that return values should use. Defaults to USD. ISO 4217 currency code.

Available options:
usd,
eur,
aud,
cad,
chf,
clp,
cny,
czk,
dkk,
gbp,
hkd,
huf,
jpy,
nzd

Response

Successful response

networkTokenDetails
object
required
nativeTransaction
object
required
erc20Transfers
object[]

The list of ERC-20 transfers.

erc721Transfers
object[]

The list of ERC-721 transfers.

erc1155Transfers
object[]

The list of ERC-1155 transfers.

internalTransactions
object[]

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.

teleporterMessageInfo
object

Corresponding teleporter message info if available.