Skip to content
Contract · Payments

Airdrop

Owner-controlled BNB20 airdrop — batch transfer tokens to a list of recipients.

All templates
Distribution
~1.1M gas
BNB Smart Chain
Post-deploy checklist
  1. Deploy your BNB20 first and approve/fund the airdrop contract
  2. Keep recipient batches under gas limits (~100–200 per tx typical)
  3. Verify amounts sum correctly before broadcasting
  4. Announce Merkle alternative for very large drops
Configure & deploy

BNB20 / BNB20 to distribute.

Use cases
  • Community rewards
  • Marketing campaigns
  • DAO voting power distribution
TokenAirdrop.solsolidity
// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0 (Wizard / Contracts MCP patterns)
// Compiled with Solidity ^0.8.24 — BNB Toolset browser solc
pragma solidity ^0.8.24;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract TokenAirdrop is Ownable {
    using SafeERC20 for IERC20;
    IERC20 public immutable token;

    constructor(address initialOwner, IERC20 _token) Ownable(initialOwner) {
        require(address(_token) != address(0), "token=0");
        token = _token;
    }

    function airdrop(address[] calldata recipients, uint256[] calldata amounts) external onlyOwner {
        require(recipients.length == amounts.length, "length");
        for (uint256 i = 0; i < recipients.length; i++) {
            token.safeTransfer(recipients[i], amounts[i]);
        }
    }

    function rescue(address to, uint256 amount) external onlyOwner {
        token.safeTransfer(to, amount);
    }
}