paint-brush
How to Airdrop NFTsby@cryptomultisender
3,430 reads
3,430 reads

How to Airdrop NFTs

by Crypto MultisenderJuly 7th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

NFTs have been gaining popularity at a rate that has taken many of us by surprise. Browlser is a new type of web browser that puts NFT tokens to use. Users can unlock features such as web scam protection, default search engines, and unlimited VPN, among many others. NftMultisender is proud to have helped the team automate the distribution of their Nfts for their referral system. Here’s a brief explanation of the code and how to get everything working.

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How to Airdrop NFTs
Crypto Multisender HackerNoon profile picture


In recent years NFTs have been gaining popularity at a rate that has taken many of us by surprise. The idea of a non-fungible token used to be a rather abstract concept. So much so that most could not comprehend them and therefore could not see their potential. This is still the case for a lot of people. However, projects are finding new and innovative use cases for NFTs that go beyond a Crypto Kitty or a pixelated image of a Crypto Punk. One such project is Browlser, a new type of web browser that puts NFTs to use. With Browlser, users can unlock features by purchasing NFTs, such as web scam protection, default search engines, and unlimited VPN, among many others. Innovative projects such as Browlser make NFTs feel more tangible to the masses, thus helping boost their adoption. Therefore, we at Crypto Multisender are proud to have helped the Browlser team automate the distribution of their NFTs for their referral system.


So, you have the next great idea for an NFT and you're ready to launch. The only thing left to do is to distribute your NFT to all those hundreds/thousands of wallet addresses. There are two ways to do this. The first option is not so convenient, but we will highlight it here so that you can understand how NFT airdrops work under the hood.


The first option - Code an NFT airdrop smart contract

Just kidding. No need to write any code. You can copy the code from the example below and deploy it on whatever blockchain network you’re using, so long as the blockchain supports Solidity smart contracts.

However, before you use it, here’s a brief explanation of how to use the airdrop NFT smart contract. At the beginning of the code, there are two abstract contracts. These will be used as an interface for interacting with any NFT that is either an ERC721 or ERC1155 token. Each interface only requires the contract address of the NFT that they will be interfacing with. This can be seen in the functions within the NftMultisender contract. In each function, the corresponding interfaces are initialised with the NFT contract address provided in the arguments of the erc721Airdrop and erc1155Airdrop functions.


Moving on, you will also notice that the interfaces we have defined in the example above only contain one function each, the safeTransferFrom function. That is because that is the only function that we need to interact with on any NFT to distribute it. The airdrop functions simply invoke the safeTransferFrom function of the NFT many times within a single transaction. Therefore, in order to get this to work, you first have to inform the NFT smart contract that you will be authorising the above contract to automate the distribution of your NFT by invoking the setApprovalForAll function on your NFT contract. If you do not do this, the airdrop functions will fail to execute. After you have approved the multisender contract to automate the distribution of your NFT, the next step is to prepare your data as shown below.


Using the ‘erc721Airdrop’ function

This function takes 3 arguments. For the first argument, you must provide the contract address of the NFT you intend to airdrop. For the second argument, you need to pass the wallet addresses you will be airdropping your NFT to. Lastly, for the third argument, you need to provide the token IDs that you want the wallet addresses to receive, in the same order that the addresses are in the second argument. For example, imagine these are your lists of wallet addresses and token IDs, [“0x1”,“0x2”,“0x3”], [1,2,3]. In this example, address 0x1 will get the token with ID 1, 0x2 will get the token with ID 2, and so on.

erc721Airdrop(addressOfNFT,[0x1,0x2,0x3],[1,2,3]);


Using the ‘erc1155Airdrop‘ function

This function takes 4 arguments. The first 3 arguments are the same as the arguments for the erc721Airdrop function. So that is the contract address of the NFT, the wallet addresses to send tokens to, and the corresponding IDs of the tokens that each address shall receive. However, for the 4th argument, you must provide the amounts of each NFT to send, because erc1155 tokens can be either semi-fungible or non-fungible. This is what the invocation of the function would look like.

erc1155Airdrop(addressOfNFT,[0x1,0x2,0x3],[1,2,3],[200,50,1]);


Pros

  • Using this method would save you from having to pay any service fees.
  • The airdrop functions in the code example are as simple as they can be. In other words, they are not computationally expensive to execute which means that they would require less gas (but not that much less) to execute compared to multisender platforms.


Cons

  • Using a smart contract without a user interface can be quite hard. Especially when having to pass such large arguments. Even when using Remix.
  • You would have to manually find out yourself how many addresses you can airdrop your NFT to in a single batch. In an ideal world, you would be able to send your NFT to all wallet addresses in a single transaction. However, this is not possible because EVM blockchains have an upper gas limit allowed per transaction. So, if you have a list of 10,000 wallet addresses, you might have to split that list up into batches of 100 addresses, so 10 batches. The batch size depends on how much gas is required to transfer your NFT.
  • No added error prevention that is usually provided by multisender DApps.


The second option - Using Crypto Multisender

Crypto Multisender streamlines the process of airdropping NFTs and you will not have to deal with any code. Our platform supports the following networks Ethereum, Binance Smart Chain, Fantom Opera, Avalanche C-Chain, Polygon Matic Chain and the Velas network, with more to come. So if your NFT is on one of these networks, simply visit the Crypto Multisender website, connect your wallet and select the network you want. The only thing you have to make sure of is that your wallet contains the NFT that you intend to airdrop and that you also have some funds in your wallet to cover the gas fees.


How to airdrop ERC721 NFTs

In order to airdrop your ERC721 NFT, you will need to prepare a list of wallet addresses and tokens identified by their IDs to send to each address. You can provide this list as a CSV or Excel file. Alternatively, you can manually input the list by copy-pasting the values in the Manual Entry section of the multisender. If you submit a spreadsheet file, then the format must be as shown below.

Once you have provided your list, you will then need to select your NFT in the dropdown menu. If the dropdown menu is not present, then this means you will have to manually input the contract address of your NFT.


Now you’re ready to proceed to the next steps which includes approving the Crypto Multisender smart contract to automate the distribution of your ERC721 NFT, and then submitting the airdrop.


How to airdrop ERC1155 NFTs

To get started airdropping your ERC1155 NFT, you need to prepare a list with all recipient addresses, the tokens each address will receive identified by their token IDs, and the amount of each token that each address will receive. Once again, you can provide your list as a CSV or Excel file. Alternatively, you can also copy-paste your list into the Manual Entry section of the multisender.


Once you have provided your list, you can follow the same steps detailed for airdropping ER721 tokens. That is to authorise the Crypto Multisender smart contract to multisend your ERC1155 NFT and then submit your airdrop.

Let’s summarise the process of how to airdrop NFTs

  1. Visit cryptomultisender.com.
  2. Select NFT to airdrop.
  3. Upload a spreadsheet in accordance with the file submission guidelines.
  4. Approve Crypto Multisender to automate the distribution of your NFT.
  5. Submit airdrop.

Pros

  • No need to handle any code.
  • Our platform automatically splits your list into the largest possible batch sizes and prepares the transactions for you.
  • Advanced error prevention and automated error correction.
  • Simple and intuitive user interface.
  • Automatic NFT detection for Ethereum, BSC, Fantom, Polygon, and Avalanche.
  • Live chat support.
  • Available with a free trial.
  • Distributing NFTs is just a 3-step process. (1) Prepare data & select token. (2) Authorise distribution. (3) Multisend!

Cons

  • Automatic token detection is not yet available for the Velas network, but we are working on it. For now, you can simply provide the contract address of your NFT and the rest of the process will be the same.
  • No support for Solana, Cardano or TRON as of yet. Though it is planned to add support for these networks in the near future.


Reasons you should use Crypto Multisender

It’s simple really, we offer the best deals of any multisender on the market today. With Crypto Multisender, you can save up to 10x in service fees due to our fair and honest pricing model. Other multisenders tend to charge a set fee per batch transfer, no matter how many addresses are contained within a batch. In many cases, the fee can be hundreds of dollars, even if a batch has just 10 addresses. However, with our pricing model, we charge a very small fee per wallet address in an airdrop. As a result, our multisender is the most cost-effective option for the launch of your NFT.


Another reason you should use Crypto Multisender is our exceptional customer service, which we pride ourselves in. Should you choose to use our platform to distribute your NFT, you can rest assured that you will receive live support from our team. We can help you with everything related to your airdrop, including technical assistance from our founder and developer, Zenos Pavlakou.


Finally, the last reason is that we have over 4 years of experience in facilitating crypto airdrops. In fact, we were one of the very first multisenders to exist in 2018. We used to go by the name Dapple Airdrops, and since then we have helped hundreds of projects airdrop their token to over 2,300,000 happy airdrop recipients.


Interested? Head over to our NFT multisender tool to give it a try, and don’t shy away from asking our team as many questions as you want. We are here to help and we do so gladly.