ERC20Airdroper
Inherits: AbstractUtilityContract, Ownable
Author: Solidity University
This contract allows the owner to airdrop ERC20 tokens to multiple addresses.
Inherits from AbstractUtilityContract and Ownable
State Variables
MAX_AIRDROP_BATCH_SIZE
uint256 public constant MAX_AIRDROP_BATCH_SIZE = 300;
token
IERC20 public token;
amount
uint256 public amount;
treasury
address public treasury;
Functions
constructor
constructor() payable Ownable(msg.sender);
airdrop
function airdrop(address[] calldata receivers, uint256[] calldata amounts) external onlyOwner;
initialize
function initialize(bytes memory _initData) external override notInitialized returns (bool);
getInitData
function getInitData(address _deployManager, address _token, uint256 _amount, address _treasury, address _owner)
external
pure
returns (bytes memory);
Errors
ArraysLengthMismatch
error ArraysLengthMismatch();
NotEnoughApprovedTokens
error NotEnoughApprovedTokens();
TransferFailed
error TransferFailed();
BatchSizeExceeded
error BatchSizeExceeded();