Timeline for How to read all token balances from wallet?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 7, 2017 at 16:07 | comment | added | Alon | OK then how can I know which tokens implement ERC20, and how can I know all the existing tokens and know what's their interface? There are websites like etherscan.io that are able to read every existing token, even many tokens that are not listed on Coinmarketcap. | |
Dec 7, 2017 at 15:55 | comment | added | pabloruiz55 | Not necessarily, tokens that are ERC20 compliant all follow the specification and have these common functions, for example balanceOf(). What you would need to do in order to read each one is just change the address of the token you want to get the balance of. You could write a function that loops through a list of token addresses and returns each one's balance for a particular user. | |
Dec 7, 2017 at 15:53 | comment | added | Alon | OMG that means I have to write a different code for each token in the entire world? | |
Dec 7, 2017 at 15:50 | history | answered | pabloruiz55 | CC BY-SA 3.0 |