useActiveClaimCondition() function
This feature is currently in beta and may change based on feedback that we receive.
Use this to get the active claim conditon for ERC20, ERC721 or ERC1155 based contracts. They need to extend the claimCondition
extension for this hook to work.
Example 1
const { data: activeClaimCondition, isLoading, error } = useActiveClaimCondition(<YourERC20ContractInstance>);
Example 2
const { data: activeClaimCondition, isLoading, error } = useActiveClaimCondition(<YourERC721ContractInstance>);
Example 3
const { data: activeClaimCondition, isLoading, error } = useActiveClaimCondition(<YourERC1155ContractInstance>, <tokenId>);
Signature:
export declare function useActiveClaimCondition<TContract extends NFTContract>(
...[contract, tokenId]: ClaimConditionsInputParams<TContract>
): 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
Parameter | Type | Description |
---|---|---|
[contract, tokenId] | ClaimConditionsInputParams<TContract> |
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 currently active claim condition