DropClaimConditions
Manages claim conditions for NFT Drop contracts
class DropClaimConditions< TContract extends | PrebuiltNFTDrop | PrebuiltTokenDrop | BaseClaimConditionERC721 | BaseDropERC20,> {}
function constructor( contractWrapper: ContractWrapper< | BaseDropERC20 | BaseClaimConditionERC721 | PrebuiltTokenDrop | PrebuiltNFTDrop >,
Can Claim
Check if the drop can currently be claimed.
// Quantity of tokens to check claimability ofconst quantity = 1;const canClaim = await contract.canClaim(quantity);
function canClaim( quantity: string | number, addressToCheck?: string,): Promise<boolean>;
Get the currently active claim condition
function getActive(): Promise<{ availableSupply: string; currencyAddress: string; currencyMetadata: { decimals: number; displayValue: string; name: string; symbol: string; value: BigNumber; }; currentMintSupply: string; maxClaimablePerWallet: string; maxClaimableSupply: string; merkleRootHash: string | Array<number>; metadata?: objectOutputType< { name: ZodOptional<ZodString> }, ZodUnknown, "strip" >; price: BigNumber; snapshot?: null | Array<{ address: string; currencyAddress?: string; maxClaimable: string; price?: string; }>; startTime: Date; waitInSeconds: BigNumber;}>;
let returnType: Promise<{ availableSupply: string; currencyAddress: string; currencyMetadata: { decimals: number; displayValue: string; name: string; symbol: string; value: BigNumber; }; currentMintSupply: string; maxClaimablePerWallet: string; maxClaimableSupply: string; merkleRootHash: string | Array<number>; metadata?: objectOutputType< { name: ZodOptional<ZodString> }, ZodUnknown, "strip" >; price: BigNumber; snapshot?: null | Array<{ address: string; currencyAddress?: string; maxClaimable: string; price?: string; }>; startTime: Date; waitInSeconds: BigNumber;}>;
The claim condition metadata
Get all the claim conditions
function getAll(): Promise< Array<{ availableSupply: string; currencyAddress: string; currencyMetadata: { decimals: number; displayValue: string; name: string; symbol: string; value: BigNumber; }; currentMintSupply: string; maxClaimablePerWallet: string; maxClaimableSupply: string; merkleRootHash: string | Array<number>; metadata?: objectOutputType< { name: ZodOptional<ZodString> }, ZodUnknown, "strip" >; price: BigNumber; snapshot?: null | Array<{ address: string; currencyAddress?: string; maxClaimable: string; price?: string; }>; startTime: Date; waitInSeconds: BigNumber; }>>;
let returnType: Promise< Array<{ availableSupply: string; currencyAddress: string; currencyMetadata: { decimals: number; displayValue: string; name: string; symbol: string; value: BigNumber; }; currentMintSupply: string; maxClaimablePerWallet: string; maxClaimableSupply: string; merkleRootHash: string | Array<number>; metadata?: objectOutputType< { name: ZodOptional<ZodString> }, ZodUnknown, "strip" >; price: BigNumber; snapshot?: null | Array<{ address: string; currencyAddress?: string; maxClaimable: string; price?: string; }>; startTime: Date; waitInSeconds: BigNumber; }>>;
The claim conditions metadata
function getClaimArguments( destinationAddress: string, quantity: BigNumberish,): Promise<Array<any>>;
Returns allow list information and merkle proofs for the given address.
function getClaimerProofs( claimerAddress: string, claimConditionId?: BigNumberish,): Promise<null | { address: string; currencyAddress?: string; maxClaimable: string; price?: string; proof: Array<string>;}>;
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.
function getClaimIneligibilityReasons( quantity: string | number, addressToCheck?: string,
Use contract.erc721.claim.prepare(...args)
instead
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.
function getClaimTransaction( destinationAddress: string, quantity: BigNumberish,): Promise<>;
let returnType: Promise<>;
Get the total supply claimed by a specific wallet
function getSupplyClaimedByWallet( walletAddress: string,): Promise<BigNumber>;
function set( claimConditionInputs: Array<{ currencyAddress?: string; maxClaimablePerWallet?: string | number; maxClaimableSupply?: string | number; merkleRootHash?: string | Array<number>; metadata?: objectInputType< { name: ZodOptional<ZodString> }, ZodUnknown, "strip" >; price?: string | number; snapshot?: | null | Array<string> | Array<{ address: string; currencyAddress?: string; maxClaimable?: string | number; price?: string | number; }>; startTime?: number | Date; waitInSeconds?: string | number | bigint | BigNumber; }>, resetClaimEligibilityForAll: any,): Promise<TResult>;
let claimConditionInputs: Array<{ currencyAddress?: string; maxClaimablePerWallet?: string | number; maxClaimableSupply?: string | number; merkleRootHash?: string | Array<number>; metadata?: objectInputType< { name: ZodOptional<ZodString> }, ZodUnknown, "strip" >; price?: string | number; snapshot?: | null | Array<string> | Array<{ address: string; currencyAddress?: string; maxClaimable?: string | number; price?: string | number; }>; startTime?: number | Date; waitInSeconds?: string | number | bigint | BigNumber;}>;
Preparable
You can also prepare the transaction without executing it by calling set.prepare()
with same arguments.Learn more
function update( index: number, claimConditionInput: { currencyAddress?: string; maxClaimablePerWallet?: string | number; maxClaimableSupply?: string | number; merkleRootHash?: string | Array<number>; metadata?: objectInputType< { name: ZodOptional<ZodString> }, ZodUnknown, "strip" >; price?: string | number; snapshot?: | null | Array<string> | Array<{ address: string; currencyAddress?: string; maxClaimable?: string | number; price?: string | number; }>; startTime?: number | Date; waitInSeconds?: string | number | bigint | BigNumber; },): Promise<TResult>;
let claimConditionInput: { currencyAddress?: string; maxClaimablePerWallet?: string | number; maxClaimableSupply?: string | number; merkleRootHash?: string | Array<number>; metadata?: objectInputType< { name: ZodOptional<ZodString> }, ZodUnknown, "strip" >; price?: string | number; snapshot?: | null | Array<string> | Array<{ address: string; currencyAddress?: string; maxClaimable?: string | number; price?: string | number; }>; startTime?: number | Date; waitInSeconds?: string | number | bigint | BigNumber;};
Preparable
You can also prepare the transaction without executing it by calling update.prepare()
with same arguments.Learn more