Open irfandi-fm opened 7 months ago
Hi, all you need is to have the contract address. You get balance of the contract address.
Hi, all you need is to have the contract address. You get balance of the contract address.
Can you give me an example code? Because the parameter to get the balance is only the wallet address. Where to supply the contract address?
@irfandi-fm I did these to get token balance :
balanceOf
func of that instance and get the balance
final ercToken =
contracts.ErcToken(client: _web3Client, address: data);
final tokenBalanceResponse = await ercToken.balanceOf(address);
Hi! I'm new to the blockchain technology, and I'm currently building a simple wallet using flutter. I can get the balance of my wallet with below code.
Next, I want to implement the add token just like in metamask. How do do that? I see that we need to supply the contract address. Then how do we get the balance of that token?