Contract · Payments
Airdrop
Owner-controlled BNB20 airdrop — batch transfer tokens to a list of recipients.
Distribution
~1.1M gas
BNB Smart Chain
Post-deploy checklist
- Deploy your BNB20 first and approve/fund the airdrop contract
- Keep recipient batches under gas limits (~100–200 per tx typical)
- Verify amounts sum correctly before broadcasting
- 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);
}
}
Related templates
OZ Wallet
Token Vesting
Linear vesting with cliff for team members, advisors, and investors. Wraps OpenZeppelin's audited VestingWallet.
Payments
Payment Splitter
Split incoming ETH or BNB20 payments across N payees weighted by shares.
Fundraise
Crowdfunding
Time-boxed ETH fundraising. Contributors are refunded automatically if the soft cap is not met.
