Skip to main content

useClaimConditions() function

This feature is currently in beta and may change based on feedback that we receive.

Use this to get all claim conditons for ERC20, ERC721 or ERC1155 based contracts. They need to extend the claimCondition extension for this hook to work.

Example 1

const { data: claimConditions, isLoading, error } = useClaimConditions(<YourERC20ContractInstance>);

Example 2

const { data: claimConditions, isLoading, error } = useClaimConditions(<YourERC721ContractInstance>);

Example 3

const { data: claimConditions, isLoading, error } = useClaimConditions(<YourERC1155ContractInstance>, <tokenId>);

Signature:

export declare function useClaimConditions(
contract: RequiredParam<DropContract>,
tokenId?: BigNumberish,
): import("@tanstack/react-query").UseQueryResult<
{
snapshot?:
| {
address: string;
maxClaimable: string;
}[]
| undefined;
quantityLimitPerTransaction: string;
startTime: Date;
price: import("ethers").BigNumber;
currencyAddress: string;
maxQuantity: string;
waitInSeconds: import("ethers").BigNumber;
merkleRootHash: string | number[];
availableSupply: string;
currentMintSupply: string;
currencyMetadata: {
symbol: string;
value: import("ethers").BigNumber;
name: string;
decimals: number;
displayValue: string;
};
}[],
unknown
>;

Parameters

ParameterTypeDescription
contractRequiredParam<DropContract>an instance of a contract that extends the ERC721 or ERC1155 spec and implements the claimConditions extension.
tokenIdBigNumberish(Optional) the id of the token to fetch the claim conditions for (if the contract is an ERC1155 contract)

Returns:

import("@tanstack/react-query").UseQueryResult<{ snapshot?: { address: string; maxClaimable: string; }[] | undefined; quantityLimitPerTransaction: string; startTime: Date; price: import("ethers").BigNumber; currencyAddress: string; maxQuantity: string; waitInSeconds: import("ethers").BigNumber; merkleRootHash: string | number[]; availableSupply: string; currentMintSupply: string; currencyMetadata: { symbol: string; value: import("ethers").BigNumber; name: string; decimals: number; displayValue: string; }; }[], unknown>

a response object with the list of claim conditions