I am trying to create a new eosio token and airdrop it at a 1:1 ratio to all eosio accounts. I have a snapshot csv file with all the eosio account names, the public key, and EOS token balances. My idea to airdrop is as follows:
- create an account to issue the new token
- create the new token with the eosio.token contract, using the account created above as the issuer
- create a script that iterates over every account in the snapshot and issues my new token to each account at a 1:1 ratio with the eos tokens each already has.
I'm thinking I could make a short python script that reads the csv file, and then does an os call
'cleos push action eosio.token issue '["<account-from-snapshot","<new-quantity-based-off-snapshot","issuing new token"]' -p <my-issuer-account>'
for every account in the snapshot.
Has anyone done an airdrop before and could weight in on this procedure? Thanks a lot.
add_balance( to, quantity, from );
the the senderfrom
pays for the RAMto_acnts.emplace( ram_payer/*from*/, [&]( auto& a ){ a.balance = value; });
. then once they have tokens the RAM paying account remains the ram payerto_acnts.modify( to, 0, [&]( auto& a ) {
. The issuing account would have to pay for everyone. Going with your idea, I guess you could write a contract where a user would have to send some EOS to in order to get new token. Idk if devs are doing that.