1

I run a local eth node on my server and would like to collect all addresses which hold a specific token.

In addition I'd like to supply them with another token. One way I researched is to send them the new token via an airdrop contract. This one is taken from OmiseGo.

contract Airdropper is Ownable {

function multisend(address _tokenAddr, address[] dests, uint256[] values)
onlyOwner
returns (uint256) {
    uint256 i = 0;
    while (i < dests.length) {
        ERC20(_tokenAddr).transfer(dests[i], values[i]);
        i += 1;
    }
    return(i);
}

Do you have a suggestion how to get the addresses? (and do you think the OmiseGo Solution is a good one?)

  • EIP 20 complaint tokens generate a Transfer(from,to,value). If you listen to such events you should be able to collect all token holders. – Ismael Nov 8 '17 at 6:23

Your Answer

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

Browse other questions tagged or ask your own question.