DropErc1155ClaimConditions
Manages claim conditions for Edition Drop contracts
class DropErc1155ClaimConditions< TContract extends PrebuiltEditionDrop | BaseClaimConditionERC1155,> {}
function constructor( contractWrapper: ContractWrapper< BaseClaimConditionERC1155 | PrebuiltEditionDrop >,
Can Claim
Check if a particular NFT can currently be claimed by a given user.
// Quantity of tokens to check claimability ofconst quantity = 1;const canClaim = await contract.canClaim(quantity);
function canClaim( tokenId: BigNumberish, quantity: BigNumberish, addressToCheck?: string,): Promise<boolean>;
Get the currently active claim condition
function getActive( tokenId: BigNumberish,): 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( tokenId: BigNumberish,): 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( tokenId: BigNumberish, destinationAddress: string, quantity: BigNumberish,): Promise<Array<any>>;
Returns allow list information and merkle proofs for the given address.
function getClaimerProofs( tokenId: BigNumberish, 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( tokenId: BigNumberish, quantity: BigNumberish, addressToCheck?: string,
Use contract.erc1155.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, tokenId: BigNumberish, quantity: BigNumberish,): Promise<>;
let returnType: Promise<>;
Get the total supply claimed by a specific wallet
function getSupplyClaimedByWallet( tokenId: BigNumberish, walletAddress: string,): Promise<BigNumber>;
Returns proofs and the overrides required for the transaction.
function prepareClaim( tokenId: BigNumberish, quantity: BigNumberish, checkERC20Allowance: boolean, address?: string,
overrides
and proofs
as an object.
function set( tokenId: BigNumberish, 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 setBatch( resetClaimEligibilityForAll: any,): Promise<TResult>;
Preparable
You can also prepare the transaction without executing it by calling setBatch.prepare()
with same arguments. Learn more
function update( tokenId: BigNumberish, 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