Skip to content

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

NameTypeDescription
tokenIdsuint256[]An array of token IDs that were airdropped
recipientsaddress[]An array of addresses that received the airdropped tokens
amountsuint256[]An array of amounts corresponding to each token and recipient

batchMintAirdrop

solidity
function batchMintAirdrop(uint256[] _tokenIds, address[] _recipients, uint256[] _amounts) external

Executes a batch minting airdrop of ERC1155 tokens

This function should mint and distribute tokens to multiple recipients in one transaction

Parameters

NameTypeDescription
_tokenIdsuint256[]An array of token IDs to be minted and airdropped
_recipientsaddress[]An array of addresses to receive the airdropped tokens
_amountsuint256[]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