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.
Best Answer
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.