Hey guys what is the best method to airdrop an erc20 token? I mean, i have list of addresses and the related amount of token I wanna send to them
ADDR1 -> 1000
ADDR2 -> 80000
etc.
Should I create an aidrop function inside the token contract or I have to create another airdrop contract that owns token and send to addresses? Or I should use other methods, like hardhat scripts?
Jul 27, 2022, 2:08 PM
Sent you dm
Jul 27, 2022, 2:10 PM
Making an airdrop function inside the erc20 is the cheapest option, as it avoids external contracts calls but if the amount it saves you in fees is not that big I'd use an external contract, to keep the erc20 minimal
This assuming you are opting for an airdrop over a small quantity on a not so expensive network, otherwise other approaches (merkle trees) would probably be more suited
Jul 27, 2022, 2:19 PM
i made something similar an airdrop contract for erc20 some time ago, do you want the code? i can share the .sol file
Jul 27, 2022, 2:26 PM
I deployed a couple of shitcoins the last few days and didn’t have an issue
Jul 27, 2022, 2:51 PM
Weird
Jul 27, 2022, 3:12 PM
so i create an external contract, i give it a supply of tokens and in that case how can I transfer that specific erc20 token?
Jul 27, 2022, 6:22 PM
Normal erc20 transfer, inside a loop
Or erc20 transferFrom
Jul 27, 2022, 6:41 PM
Yes thanks ^^ you can dm me
thanks
Jul 27, 2022, 7:59 PM
oh sorry didnt see the dm me part
Jul 27, 2022, 7:59 PM
no problem
Jul 27, 2022, 7:59 PM
is not the best code but i hope you can get some ideas
Jul 27, 2022, 7:59 PM