Skip to content
Visit Covalent docs on GitHub
Set theme to dark (⇧+D)
Covalent docs

Recipe logo

Avalanche Network

Introduction

Avalanche is an open-source platform for launching decentralized applications and enterprise blockchain deployments in one interoperable, highly scalable ecosystem. Avalanche is the first smart contracts platform that processes 4,500+ transactions/second and instantly confirms transactions. Ethereum developers can quickly build on Avalanche as Solidity works out-of-the-box.

A key difference between Avalanche and other decentralized networks is the consensus protocol. Over time, people have come to a false understanding that blockchains have to be slow and not scalable. The Avalanche protocol employs a novel approach to consensus to achieve its strong safety guarantees, quick finality, and high-throughput, without compromising decentralization.

Quick facts

PropertyValue
Avalanche Mainnet C-Chain chainId43114
Fuji Testnet C-Chain chainId43113
Avalanche C-Chain Blockchain Explorerhttps://cchain.explorer.avax.network/
Block time~3 seconds

Supported endpoints

  • api.covalenthq.com/v1/{chainId}/address/{address}/balances_v2/

    • Get token balances for address. Return a list of all ERC20 and NFT token balances including ERC721 and ERC1155 along with their current spot prices.
  • api.covalenthq.com/v1/{chainId}/address/{address}/transactions_v2/

    • Retrieve all transactions for address including their decoded log events. This endpoint does a deep-crawl of the blockchain to retrieve all kinds of transactions that references the address.
  • api.covalenthq.com/v1/{chainId}/address/{address}/transfers_v2/

    • Get ERC20 token transfers for address along with historical token prices.
  • api.covalenthq.com/v1/{chainId}/tokens/{contract_address}/token_holders/

    • Return a paginated list of token holders contract_address as of any historical block height.
  • api.covalenthq.com/v1/{chainId}/events/address/{contract_address}/

    • Return a paginated list of decoded log events emitted by a particular smart contract.
  • api.covalenthq.com/v1/{chainId}/events/topics/{topic}/

    • Return a paginated list of decoded log events with one or more topic hashes separated by a comma.
Go to Covalent's API Reference

Appendix

AVAX Gas token

The AVAX token is the native token of Avalanche. This is similar to Ether in Ethereum. To interact with Avalanche, AVAX tokens are required to pay gas fees. The Covalent API response returns gas_* fields in fiat units.

Token mapping

Covalent maintains an on-chain real-time mapping of token addresses between Ethereum mainnet and the Avalanche C-chain. These addresses are used to reverse-lookup prices on Avalanche and also to return the right token logo urls.

Some example of mapped tokens:

TokenEthereum mainnetAvalanche mainnet
Uniswap UNI0x1f9840a85d5aF5bf1D1762F925BDADdC4201F9840xdF3aCC3460965996FF496Cb9D0CF9E6859545a86
AAVE0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE90x217446Ce09AA183a9034f4FF20d31b9268427187

For the current token mapping list, see: https://github.com/ava-labs/bridge-tokens/blob/main/data/eth_token_mapping.csv

Token prices

For tokens that have a mapping back to Ethereum mainnet, Covalent is able to return the mapped prices.