MetaMask – Can MetaMask Be Used for All ERC20 Tokens?

erc-20erc-20-approveethereum-wallet-dappmetamaskwrapped-tokens

How can I use WETH with Metamask wallet?
I can see ETH in my Metamask (Rinkeby TestNet, it works on Mainnet) but can not use other tokens.
Any Repository or lead will be appreciated.
If yes, What will be token Contract address it asks for?
Also, How can ether.js/web3.js be used to find WETH balance of wallet address?

Best Answer

All ERC20 tokens are fully supported in Metamask, and WETH is an ERC20 token. The tricky thing is that you have to manually add the tokens, since otherwise Metamask doesn't know which tokens you have.

The extra tricky part with WETH is that there are numerous versions of the WETH token contract, in different addresses. I'm not 100% sure, but I think the version Uniswap uses is the most popular. Basically you have to check the projects you are interested in, to see which version they use. Here are the WETH addresses for different networks which Uniswap uses: https://docs.uniswap.org/protocol/reference/deployments (scroll down).

To use ethers.js to get a token balance, check for example here: How to get the ERC-20 token balance of an account using etherjs? or https://stackoverflow.com/questions/71106843/check-balance-of-erc20-token-in-hardhat-using-ethers-js

Related Topic