Private
contractPrivate
metadataSet claim conditions on a single NFT
Rest
...args: [tokenId: BigNumberish, claimConditionInputs: { Sets the public mint conditions that need to be fulfilled by users to claim a particular NFT in this contract.
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
maxClaimableSupply: 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);
Rest
...args: [tokenId: BigNumberish, claimConditionInputs: { Set claim conditions on multiple NFTs at once
Rest
...args: [claimConditionsForToken: ClaimConditionsForToken[], resetClaimEligibilityForAll: any]Sets the claim conditions that need to be fulfilled by users to claim the given NFTs in this contract.
const claimConditionsForTokens = [
{
tokenId: 0,
claimConditions: [{
startTime: new Date(), // start the claim phase now
maxClaimableSupply: 2, // limit how many mints for this tokenId
price: 0.01, // price for this tokenId
snapshot: ['0x...', '0x...'], // limit minting to only certain addresses
}]
},
{
tokenId: 1,
claimConditions: [{
startTime: new Date(),
price: 0.08, // different price for this tokenId
}]
},
];
await dropContract.claimConditions.setBatch(claimConditionsForTokens);
Rest
...args: [claimConditionsForToken: ClaimConditionsForToken[], resetClaimEligibilityForAll: any]Private
storageUpdate a single claim condition with new data.
Rest
...args: [tokenId: BigNumberish, index: number, claimConditionInput: { Rest
...args: [tokenId: BigNumberish, index: number, claimConditionInput: { Can Claim
Optional
addressToCheck: stringCheck if a particular NFT can currently be claimed by a given user.
// Quantity of tokens to check claimability of
const quantity = 1;
const canClaim = await contract.canClaim(quantity);
Private
getOptional
conditionId: BigNumberishGet the currently active claim condition
Optional
options: ClaimConditionFetchOptionsthe claim condition metadata
Get all the claim conditions
Optional
options: ClaimConditionFetchOptionsthe claim conditions metadata
For any claim conditions that a particular wallet is violating, this function returns human-readable information about the breaks in the condition that can be used to inform the user.
the token id to check
The desired quantity that would be claimed.
Optional
addressToCheck: stringThe wallet address, defaults to the connected wallet.
Construct a claim transaction without executing it. This is useful for estimating the gas cost of a claim transaction, overriding transaction options and having fine grained control over the transaction execution.
Address you want to send the token to
Id of the token you want to claim
Quantity of the tokens you want to claim
Optional
options: ClaimOptionsUse contract.erc1155.claim.prepare(...args)
instead
Returns allow list information and merkle proofs for the given address.
the token ID to check
the claimer address
Optional
claimConditionId: BigNumberishoptional the claim condition id to get the proofs for
Private
getReturns proofs and the overrides required for the transaction.
Optional
address: stringoverrides
and proofs
as an object.Generated using TypeDoc
Manages claim conditions for Edition Drop contracts