gochain / web3

A CLI tool to interact with web3 blockchains - Ethereum, GoChain, etc
https://gochain.io
Apache License 2.0
402 stars 88 forks source link

How can I check the balance of a specific token at a specific address? #264

Closed bitcoinmeetups closed 2 years ago

bitcoinmeetups commented 2 years ago

How can I check the balance of a specific token at a specific address?

E. g. how many Dai tokens are there at address 0x82340 (Polygon chain)?

treeder commented 2 years ago

I think something like web3 contract call --address 0x82340 --abi erc20 --function balanceOf 0xYOURADDRESS should work.