0

Is it possible to get the initial balances for all those accounts who bought ERC20 tokens? If that’s possible, how that can be achieved?

I’m wondering if there is any way of getting that information for each ERC20 token contract via for example the neon rpc from my get client. I know there is the method eth_call that I can use against each token contract’s balance_of function. But for that I needed to know before all accounts who invested in the specific token as well as the block when the token contract was created, assuming that was the initial time.

Am I missing any piece of information that I should consider in order to get initial balances for all tokens investors/accounts for a given erc20 token? Should I consider get that information from the token ico contract? It comes to that, I’m assuming there is no pattern on how to get that information as ico contracts doesn’t follow any spec.

2

Simply put, the answer is no - there is no standard way to do this, as how tokens are created isn't defined in ERC20.

Additionally, you can't easily find out the holders of tokens directly from the blockchain, as the way storage data is encoded means that, even if you're looking at the raw data, you'll only be seeing the hashes of the token holder's addresses.

However... In many cases you should be able to find out - on a case by case basis. One convention that has been used frequently is, when "minting" tokens, to emit Transfer() events from the 0x0 address to the new holders. These you can search for, if you know how to query the chain for event data.

Also - you could just look on Etherscan - they've created a huge database of pretty much everything they can see happening on the blockchain - if you know the date of the token issuance, you could look at the transactions against the token contract around that date and see what you can find.

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.