How to Airdrop ERC721 NFTs to a List of Wallet Addresses
In this guide, we will show you how to airdrop NFTs to a list of recipients using the new Airdrop ERC721 smart contract!
If you don't already have an NFT collection, you can deploy one using our guide on how to create an NFT collection before getting started.
Let's dive into it!
Deploy the Airdrop Contract
To begin, let's deploy our Airdrop contract. Head to the Explore page and click on the Airdrop ERC-721 contract. Click Deploy Now to start the deployment flow:
Enter the wallet address you want to be the owner of the contract, select the same network that your NFT collection contract is deployed to, and click
Approve the transaction to deploy your smart contract. After a successful deployment, you will be taken to the generated dashboard for your airdrop contract!
Set Approval For Tokens
In order for the smart contract to be able to airdrop NFTs to users, it requires approval to transfer those NFTs from your wallet (from this collection).
To do that, you need to run the
setApprovalForAll function on your NFT collection smart contract; with the
operator set to your airdrop smart contract address.
Back in the Airdrop contract, head to the Explorer tab and use the
airdrop function with the following parameters:
_tokenAddress: The address of the NFT collection smart contract.
_tokenOwner: The wallet address that contains the NFTs to be transferred (the wallet we just ran
approvefrom in the step above).
_recipients: The list of recipients of the airdrop.
Token Ids: The token IDs of the NFTs you want to airdrop.
For example, in the screenshot below, wallet
0xa9D will receive token ID
4 and wallet
0x528 will receive token ID
After executing the function, approve a transaction and the airdrop will be successfully completed! 🛩️
In this guide, we learned how we can airdrop our NFTs 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!