2

I have implemented an ERC20 token using the official standard and am trying to check the token holders on Ropsten Etherscan. It shows the total supply but not the holders. The source can be found here.

What am I missing to make this token a full fledged ERC20?

  • 1
    ERC20 does not provide a method to know all the token holders. What can be done is to catch all the Transfer events and record their arguments. – Ismael Jul 21 '17 at 14:27
  • But token holders show up for lots or ERC20s i.e. ICONOMI – Steve Jul 23 '17 at 19:26
  • I'd guess etherscan is tracking every Transfer event and recording it in a database. They already do that for every "Internal Transaction", if you look at any address they record every transaction and "internal transaction" (including token transfers). – Ismael Jul 23 '17 at 21:23
  • Did you find an answer your your question? I'm looking for the same thing. Thanks. – Ronen Sep 10 '17 at 13:24
4

EtherScan only shows holders and transfers based on the event Transfer(address indexed from, address indexed to, uint256 value);. Your asyncSend() method doesn't call it.

This is due to the fact that ERC20 is not clear about this. Open Zeppelin, on which you based your contract, doesn't call the event, and the fix will be released in the next version. See issue 345.

You need to update the code so that when you mint tokens, you call the event with the from value as 0x0, like this:

Transfer(0x0, _to, _amount);
  • If tokens are minted without a Transfer event and then sent to another address using transfer(...) that does emit the Transfer event, should they be showing up in Etherscan under the final recipient's address? – Pavel Sep 29 '17 at 16:46
  • 1
    @Pavel yes they would. And they would show up in the pie chart of token holders as a fraction of the total supply of tokens, the rest would show up as "others." That drove me crazy, since I couldn't understand why etherscan displayed some token holders and not others, until I understood the issue. – Ronen Oct 2 '17 at 8:00

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.