thirdweb

⌘K

DocsSupport

Airdrop

Airdrop ERC20 / ERC721 / ERC1155 tokens via push-based or claimable methods.


thirdweb's Airdrop contract

note: token-owner must approve their tokens to this airdrop contract, by calling approval related function on the token contract.

Airdrop ERC20 / ERC721 / ERC1155 tokens to a list of recipients.

The Airdrop contract is suitable to use when you want to transfer ERC20 / ERC721 / ERC1155 tokens to a list of recipient addresses, and supports push based, claim based (allowlist), and signature based airdrops.

When push and signature based airdrops, you specify:

  • The address of the token contract from which tokens are being transferred.

  • The owner address from where the tokens will be transferred to a list of the recipients.

  • An array of objects containing recipient-address and token-ids/amounts, for e.g.

[
   {
       recipient: "0x123...",
       tokenId: 1 
   },
   {
       recipient: "0xabc...",
       tokenId: 2
   }
]

For claim based airdrops, contract admin can set an allowlist of recipients by calling setMerkleRoot function. Addresses in the allowlist can claim the allowlisted quantity/token-id by calling the claim functions.

The allowlist data should contain the following items in the given order:

  • For ERC721: receiver, tokenId

  • For ERC20: receiver, quantity

  • For ERC1155: receiver, tokenId, quantity

On claiming an airdrop, a recipient specifies:

  • The address to transfer the claimed airdrop to.

  • The total quantity and/or tokenId to claim.

  • The proof of inclusion in the merkle root allowlist, if it exists.


AirdropERC1155

(airdropERC1155)

nonpayable

Lets contract owner send ERC1155 tokens to a list of addresses.


Inputs

_tokenAddress

address

_contents

tuple[]

Published by

thirdweb.eth

View all contracts

Details

  • Publish Date

    Apr 25, 2024

  • Audit Report

    View Audit Report

  • Licenses

    Apache-2.0, MIT


  • Extensions

  • Extension detected

    ContractMetadata


  • Share


    Learn about Publish

    Feedback

    Privacy Policy

    Terms of Service

    Gas Estimator

    Chainlist

    Copyright © 2024 thirdweb