1

How is the Etherscan TokenTracker able to show holder addresses? The balances mapping of your average ERC20 token cannot be iterated over by index, nor can the length of the mapping be obtained. So how might holder address information be available to Etherscan?

For example, you can view the Gnosis TokenTracker here and confirm a list of holders.

https://etherscan.io/token/Gnosis#balances

Next, if you view the contract source, you'll see that there's no code that explicitly returns the holder address by way of reference to mapping (address => uint256) balances or anything else. (At least not that I can see.

https://etherscan.io/address/0x6810e776880c02933d47db1b9fc05908e5386b96#code

Many thanks in advance for your help.

3

I don't think they've released the details of their implementation, but presumably they track Transfer events and update the known balances for each account as those events come in.

  • that's exactly what they do, and that's actually the only way to do it (cheaply). Another way would be scanning the entire Ethereum address base against the contract. And another would be to disassemble the contract and read the storage of the contract and extract its holders. – Nulik Jul 6 '18 at 19:10
  • "that's exactly what they do" <-- could you provide a citation? – smarx Jul 6 '18 at 19:12
  • smarx , no I am speculating, with a high probability statement – Nulik Jul 6 '18 at 19:13
  • Then I'm not sure why you commented. – smarx Jul 6 '18 at 19:15
  • to confirm your own speculation. I am also extracting tokens, and I use events. – Nulik Jul 6 '18 at 19:23
0

I just make a test on my own token and Mint event are not tracked whereas Transfer are. It checks the balance of the sender/recipient after transactions.

0

Thanks all for your input. They do indeed track Transfer events. Additionally, if you use their token tracker to check a balance, and a balance returns, then they'll add that holder to the list.

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.