DropErc1155ClaimConditions.set() method
Set claim conditions on a single NFT
Example
const presaleStartTime = new Date();
const publicSaleStartTime = new Date(Date.now() + 60 * 60 * 24 * 1000);
// Optionally specify addresses that can claim
const snapshots = ['0x...', '0x...']
// Or alternatively, you can pass snapshots with the max number of NFTs each address can claim
// const snapshots = [{ address: '0x...', maxClaimable: 1 }, { address: '0x...', maxClaimable: 2 }]
const claimConditions = [
{
startTime: presaleStartTime, // start the presale now
maxQuantity: 2, // limit how many mints for this presale
price: 0.01, // presale price
snapshot: snapshots, // limit minting to only certain addresses
},
{
startTime: publicSaleStartTime, // 24h after presale, start public sale
price: 0.08, // public sale price
}
]);
const tokenId = 0; // the id of the NFT to set claim conditions on
await dropContract.claimConditions.set(tokenId, claimConditions);
Signature:
set(tokenId: BigNumberish, claimConditionInputs: ClaimConditionInput[], resetClaimEligibilityForAll?: boolean): Promise<TransactionResult>;
Parameters
Parameter | Type | Description |
---|---|---|
tokenId | BigNumberish | The id of the NFT to set the claim conditions on |
claimConditionInputs | ClaimConditionInput[] | The claim conditions |
resetClaimEligibilityForAll | boolean | (Optional) Whether to reset the state of who already claimed NFTs previously |
Returns:
Promise<TransactionResult>
Remarks
Sets the public mint conditions that need to be fulfilled by users to claim a particular NFT in this contract.