-
Notifications
You must be signed in to change notification settings - Fork 63
contract.MintBatchExtension
Aleksey Bykhun edited this page Jan 18, 2023
·
1 revision
modifier onlyNFTOwner(IERC721Community nft);
Mint one token to each recipient
function mintAndSend(IERC721Community nft, address[] calldata recipients) external onlyNFTOwner(nft);
Parameters
Name | Type | Description |
---|---|---|
nft |
IERC721Community |
The NFT contract |
recipients |
address[] |
The list of recipients, each getting exactly one token |
Mint tokens to a list of recipients
function mintAndSendBatch(IERC721Community nft, address[] calldata recipients, uint256[] calldata amounts)
external
onlyNFTOwner(nft);
Parameters
Name | Type | Description |
---|---|---|
nft |
IERC721Community |
The NFT contract |
recipients |
address[] |
The list of recipients |
amounts |
uint256[] |
Amount per each recipient to mint |
Send a batch of tokens to a list of recipients
The sender must have approved this contract to transfer the tokens
Use multisendBatch
for ERC721A-optimized transfer
function multisend(IERC721Community nft, uint256[] calldata ids, address[] calldata recipients) external;
Parameters
Name | Type | Description |
---|---|---|
nft |
IERC721Community |
The NFT contract |
ids |
uint256[] |
Token IDs to send |
recipients |
address[] |
The list of recipients |
Sequentially sends tokens to a list of recipients, starting from startTokenId
The sender must have approved this contract to transfer the tokens
Optimized for ERC721A: when you transfer tokenIds sequentially, the gas cost is lower
function multisendBatch(IERC721Community nft, uint256 startTokenId, address[] calldata recipients) external;
Parameters
Name | Type | Description |
---|---|---|
nft |
IERC721Community |
The NFT contract |
startTokenId |
uint256 |
The first token ID to send |
recipients |
address[] |
The list of recipients |