LogoLogo
  • 📱---DexAppBuilder---
    • Overview
    • Available networks
    • ▶️Creating my first DApp
    • Starting with templates
    • Managing this tool
      • Importing tokens
      • Custom domains
      • Configuring teams
      • Configuring navbar
      • Default sections
      • Building custom sections
      • Gated content
      • DApp ownership
    • Embedding external sites
    • Embedding internal apps
    • App version control
    • Leaderboards
    • AI Completion 🔥
    • Referral system
    • e-Commerce (Beta) 🔥
  • ⚖️---DexSwap---
    • Overview
    • Creating my first swap
    • Managing this tool
  • 📜---DexContracts---
    • Overview
    • Requirements
    • Web3 forms generator
    • Thirdweb contracts 🔥
      • Edition
      • Edition Drop
      • Marketplace (unlisted)
      • NFT Collection
      • NFT Drop
      • Split
      • StakeERC721
      • Token
      • Token Drop
      • Vote
      • StakeERC20
      • Multiwrap
      • AirdropERC20
      • Airdrop ERC20 Claimable
      • AirdropERC721
      • AirdropERC1155
    • Creating my first NFT collection
    • Managing deployed contracts
    • Future updates
  • 🔄---DexExchangePro---
    • Overview
    • Deploying this product
  • 🖼️---DexNFTStore---
    • Overview
    • Creating my first store
    • Managing this tool
  • 👛---DexWallet---
    • Overview
    • Creating my first wallet
    • Managing this tool
  • 📙Docs
  • ⭐WordPress products
  • 🎮Blockchain gaming
  • DexKit's blog
Powered by GitBook
On this page
  • Key Features
  • Use Cases & Examples
  • Deploying this contract
  • Using this contract
  • Airdrop Tab
  • Metadata Tab
  • Admin Tab
  • Performing an Airdrop Using a CSV File
  • Step-by-Step Guide
  • Notes on Testnet Usage
  1. ---DexContracts---
  2. Thirdweb contracts 🔥

AirdropERC20

Airdrop ERC20 tokens on the chain's native token to a list of recipients.

Last updated 19 hours ago

The by ThirdWeb streamlines the distribution of ERC20 tokens or native tokens (e.g., Ether on the Ethereum mainnet) to a predefined list of recipients. This contract is particularly useful when recipients are not required to individually claim their airdrop; instead, they automatically receive the tokens through a transfer.

Key Features

  1. Token Airdrop: Facilitates the hassle-free airdrop of ERC20 tokens or native tokens to a specified list of recipient addresses.

  2. Recipient List: Utilizes an array of objects containing recipient addresses and token amounts, simplifying the configuration of the airdrop parameters.

Use Cases & Examples

  1. Token Airdrop Campaigns:

    • Use Case: Distribute promotional tokens to a targeted audience automatically.

    • Example: Rewarding loyal users or community members with tokens without requiring manual claims.

  2. Community Rewards:

    • Use Case: Allocate tokens to community members based on their contributions.

    • Example: Recognizing and incentivizing community engagement with token rewards.

  3. Token Incentives for Users:

    • Use Case: Encourage platform usage by airdropping tokens to users.

    • Example: Boosting user adoption by providing incentives through token distributions.

  4. Event Giveaways:

    • Use Case: Conduct giveaways during events by airdropping tokens to participants.

    • Example: Engaging event attendees and creating excitement through token giveaways.

  5. Automated Staking Rewards:

    • Use Case: Distribute staking rewards automatically to token holders.

    • Example: Implementing a hands-free staking reward system for token holders.

  6. Token Grants for Development:

    • Use Case: Provide development grants by airdropping tokens to selected addresses.

    • Example: Supporting developers and projects through token grants for further ecosystem growth.

  7. Token Allocation for Liquidity Providers:

    • Use Case: Reward liquidity providers by airdropping tokens based on their contribution.

    • Example: Incentivizing liquidity provision on decentralized exchanges with token rewards.

  8. Employee Token Distributions:

    • Use Case: Facilitate token distributions to employees as part of compensation.

    • Example: Integrating token rewards into employee compensation structures.

  9. Tokenized Voting Incentives:

    • Use Case: Encourage participation in tokenized voting events through airdrop incentives.

    • Example: Increasing voter turnout by rewarding participants with tokens.

  10. Gasless Transactions with Trusted Forwarders:

    • Use Case: Enable gasless transactions using ERC-2771 and trusted forwarders.

    • Example: Facilitating transactions without requiring users to hold ETH for gas fees.

Deploying this contract

During deployment, the following parameters are required:

  1. Contract Metadata:

    • Name: [Enter Contract Name]

    • Symbol: [Enter Contract Symbol]

    • Description: [Enter Contract Description]

    • Image: [Upload Image File]

Using this contract

Once the contract has been successfully deployed, you can manage its behavior through a user-friendly interface. To do this, click the "Manage Contract" button from the confirmation modal after deployment. This will bring you to the contract's dashboard with three main tabs:

Airdrop Tab

This is the core feature of the contract — distributing tokens to recipients.

  • Select Token: Click on SELECT to choose the ERC20 token or native token (e.g., tBNB on testnet) for the airdrop.

  • Total for Airdrop: Displays the total amount of tokens set for distribution.

  • Total Recipients: Displays the number of wallet addresses added to receive tokens.

  • Recipient Management:

    • Click SELECT to upload or input the list of recipient addresses and corresponding token amounts.

    • You can manually ADD RECORD, or use the IMPORT option to bulk upload recipients via CSV.

    • Use EXPORT to download the current list of airdrop entries.

  • Confirm: After finalizing the recipient list and token, click CONFIRM to initiate the airdrop transaction. The button remains disabled until all required inputs are provided.

Note: The actual airdrop will deduct from the contract's token balance. Ensure the contract holds enough tokens before confirming.

Metadata Tab

This section allows you to modify the public-facing identity of your airdrop contract.

  • Name: You can edit the contract name here.

  • Description: Useful for describing the purpose or context of the airdrop.

  • Image: Update or replace the image associated with this contract.

Click UPDATE to save changes. These metadata updates are stored on-chain and may require a transaction depending on the implementation.

Admin Tab

This section defines the role-based permissions available within the contract. Roles determine who can perform specific administrative or operational actions.

  • Admin: Can grant/revoke roles and modify contract configurations.

  • Transfer: Can transfer tokens using the contract.

  • Minter/Creator: Can mint or create new tokens (if applicable).

  • Other available roles include:

    • Pauser: Allows the assigned address to pause or unpause contract functions (if implemented). Useful for emergency stops or contract maintenance.

    • Lister: Grants permission to list tokens or assets managed by the contract — commonly used in marketplace or registry contexts.

    • Asset Manager: Grants permission to list tokens or assets managed by the contract — commonly used in marketplace or registry contexts.

    • Unwrap: Allows the address to unwrap wrapped tokens or assets (e.g., converting wrapped tokens back to native form).

    • Factory: Enables the creation of new contract instances or clones if the current contract acts as a factory.

    • Signer: Permits the address to sign operations on behalf of users or systems. Often used with meta-transactions or off-chain logic.

    • Metadata: Grants permission to update contract metadata, including name, image, and description.

    • Revoke: This role can revoke roles or permissions from other addresses.

    • Migration: Used during system upgrades or migrations. The address can handle data migration or contract transition processes.

To assign a role, paste the wallet address and click ADD. Then click UPDATE to confirm the changes on-chain.

Performing an Airdrop Using a CSV File

To streamline large-scale token distributions, the AirdropERC20 interface allows you to upload a CSV file containing recipient addresses and their corresponding token amounts.

Step-by-Step Guide

  1. Open the Airdrop Panel From the contract dashboard, navigate to the Airdrop tab and click on the SELECT button in the “Total recipients” section. This opens the recipient manager.

  1. Download the CSV Template

  • Click the EXPORT button (top-right corner of the modal).

  • This downloads a sample CSV file with the correct format. You can use this as a template.

✅ Tip: The file will contain two columns:

cssCopyEditaddress,quantity
  1. Prepare Your CSV File Open the file in any spreadsheet editor (e.g., Excel, Google Sheets) and populate it with the recipient addresses and the amount of tokens each should receive.

Example:

CopyEdit0x1234...abcd, 100
0xabcd...5678, 250
  1. Import the CSV File

  • Return to the recipient manager and click IMPORT.

  • Upload your completed CSV file. If the file is correctly formatted, you will see all rows displayed under the Address and Quantity columns.

  1. Review and Confirm

  • Double-check that the total amount and number of recipients match your expectations.

  • Click CONFIRM to finalize the airdrop setup.

  • You may be prompted to sign a transaction to authorize the transfer.

Important: Make sure the contract has sufficient token balance to cover the entire airdrop. Also ensure the selected wallet address has permissions to perform the airdrop.

Notes on Testnet Usage

These images show usage on BNB Smart Chain Testnet. If you’re testing, make sure:

  • Your wallet is connected to the correct network.

  • You have testnet tBNB for gas fees.

  • You grant appropriate permissions if token contracts require them.

📜
AirdropERC20 contract
LogoDexAppBuilderDexAppBuilder
Direct link
If your contract was correctly deployed you will see this modal.
AirdropERC20 administrative section