I have tokens on bsc chain, and i am using ethers.js provider.
provider = new ethers.providers.JsonRpcProvider(‘https://bsc-dataseed.binance.org/’);
balances aren’t showing up, but they show up for ethereum.
I have tokens on bsc chain, and i am using ethers.js provider.
provider = new ethers.providers.JsonRpcProvider(‘https://bsc-dataseed.binance.org/’);
balances aren’t showing up, but they show up for ethereum.
Try using below and see if it works:
bscProvider = new ethers.providers.JsonRpcProvider(‘https://bsc-dataseed.binance.org/’, { name: ‘bsc’, chainId: 56 })
Tokenview BSC APIs can easily get the balance of the BSC address.
How to get the balance? For example:
It will return:
{
“code”: 1,
“msg”: “成功”,
“data”: “0.0014226745”
}
Hello BNB Smart Chain