Appearance
Solidity API
IPropsERC1155Airdrop
This interface defines the functionality for airdropping ERC1155 tokens
Implement this interface to add airdrop capabilities to an ERC1155 token contract
AirdropExecuted
solidity
event AirdropExecuted(uint256[] tokenIds, address[] recipients, uint256[] amounts)Event emitted when an airdrop is executed
Parameters
| Name | Type | Description |
|---|---|---|
| tokenIds | uint256[] | An array of token IDs that were airdropped |
| recipients | address[] | An array of addresses that received the airdropped tokens |
| amounts | uint256[] | An array of amounts corresponding to each token and recipient |
batchMintAirdrop
solidity
function batchMintAirdrop(uint256[] _tokenIds, address[] _recipients, uint256[] _amounts) externalExecutes a batch minting airdrop of ERC1155 tokens
This function should mint and distribute tokens to multiple recipients in one transaction
Parameters
| Name | Type | Description |
|---|---|---|
| _tokenIds | uint256[] | An array of token IDs to be minted and airdropped |
| _recipients | address[] | An array of addresses to receive the airdropped tokens |
| _amounts | uint256[] | An array of amounts to be minted for each token and recipient @custom:requirements - The lengths of _tokenIds, _recipients, and _amounts arrays must be equal - The function should handle the minting and distribution of tokens - Proper access control should be implemented in the contract that implements this interface |