1

I have a question regarding etherscan and transferring erc20 tokens. First, how does etherscan get all the wallets with a specific token and how accurate is that list? For example XRP...

Second, if I wanted to create a transfer agent myself (list of wallets), for my own token, how would I do this. Actually, I know how to do it, my question is how are ERC20 tokens transfered outside of my own token contract? Can user X send my created token (ABC) to user Y, without using my deployed ABC token contract?

1

What you need to understand is that tokens on Ethereum only exist inside the token contract of that token. They are not “sent out” to wallets as Ether is. All sending and receiving of Token X is done by manipulating Token Contract X internal state.

So to your question, how Etherscan knows about the states. If they read Token Contract X, they will know how much each address is credited. The information Etherscan reads is the current state of the token contract, and Etherscan somehow selects what tokens they show to their users and what tokens they don’t.

If you create Token Y with Token Contracy Y and allocated each Ethereum address 100 Y Tokens, it will not show up in Etherscan unless they chose to show it (by including Token Contracy Y in their visualization).

So back to how you distribute Token Y. You either create the token with an internal state from the start where each address xyz have n amount of tokens, and then you don’t need to spend the gas to modify the token contract after the initialization. But no transfer can be done after creation without invoking the Token Y Contract, since the state is stored there.

  • Do you know how to read a token contract for all balances instead of just balanceOf(address)? Or maybe a link to the solc function? Thanks for the clarification though. – Dorian Lee Jan 17 '18 at 9:58
  • 1
    Nevermind, I'll just use Events... lol – Dorian Lee Jan 17 '18 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.