How to find token’s address in different networks with Covalent API

Viktor Dorob
3 min readApr 23, 2021

Many people came to crypto recently. They want to participate in sales, DeFi, NFT. I observe many crypto channels and from day to day, I see that people do not know basic things in crypto. One of them is adding token to Metamask. When people send money to Binance Smart Chain sometimes they are surprised that they can’t find tokens there.

The first thing they do — check token in Coinmarketcap and get smart contract address from there. Let’s take USDC as example and see their route.

If I copy this address and paste it in Metamask (I already connected BSC to this wallet), I see this.

Everything looks ok but after click on Next button, nothing changes.

This happens because USDC as well as many other coins have different smart contract address in BSC network. Other blockchains can have same behavior. Sometimes you kill time in order to find proper information. But Covalent API can save your time and nervous). You can get all contract metadata for different blockchains (recommend you firstly register and get free API key here). Lets choose BSC Mainnet. Put 56 into chain_id field, put all into id and go to query after click on TRY button.

Here what we get in response:

In the line 14 we can we the address of USDC in Ethereum blockchain and it matches the address we pasted previously into Metamask. But In the line 9 we see another address. Its contact address in BSC network. Lets use it!

And after confirming we can finally see this coin among balances!

Thanks to Covalent for this quick solution!

Twitter: @Covalent_HQ
Telegram: https://t.me/CovalentHQ
Discord: https://discord.gg/M4aRubV
Web: https://www.covalenthq.com/

--

--