Airdrop ERC20 Tokens to a List of Wallet Addresses

Airdrop ERC20 Tokens to a List of Wallet Addresses

In this guide, we will learn how to airdrop ERC20 tokens to a list of recipients using the new Airdrop ERC20 contract from the dashboard!

This guide will allow you to send any ERC20 token to a list of wallet addresses. If you don't already have a token, you can deploy one from the Token - ERC20 page.

Deploy the Airdrop Smart Contract


First and foremost we will head over to the Explore Page; where you can see all the different prebuilt contracts available for you to deploy.

Scroll down to the Airdrops section, and click on the Airdrop ERC-20 contract. Deploy the contract by clicking the Deploy Now button, and entering the wallet address you want to be the owner of the contract (the default value is the connected wallet address).

Once you click Deploy Now, you'll be taken to your contract's dashboard page! 🎉

Set Approval For Tokens

The way the ERC20 airdrop contract works is by transferring funds from the owner's wallet to the list of recipient wallets. In order for a smart contract to transfer funds from your wallet, you need to explicitly approve it to do so.

To do that, we need to run the approve function on the ERC20 smart contract. Head to the Explorer tab of your Token smart contract, and enter the following parameters on the approve function:

  • spender: Paste in the address of the Airdrop contract.
  • amount: Total amount of tokens you're going to be airdropping.

Below, we're granting the airdrop smart contract to have permission to spend 50 of our custom ERC20 tokens.

Click Execute to give your airdrop smart contract permission to transfer your tokens!

Airdropping ERC20 Tokens

Back in the Airdrop contract, head to the Explorer tab and use the airdrop function with the following parameters:

  • _tokenAddress: The address of the ERC20 token being transferred. (For native tokens such as Ether, this is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE).
  • _tokenOwner: The wallet address that contains the funds to be transferred (the wallet we just ran approve from in the step above).
  • _recipients: The list of recipients of the airdrop.
  • _amounts: The corresponding list for the amount of tokens to airdrop per recipient in the recipient list.

Here's a good example:

After executing the function you will approve a transaction and the airdrop will be successfully completed! 🛩ī¸

Conclusion

In this guide, we learned how we can airdrop ERC-20 tokens to different wallets using the dashboard. If you run into any issues while following this guide, feel free to reach out to us on our Discord server to speak to our team directly!