Skip to main content

useClaimIneligibilityReasons() function

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

Use this to check for reasons that prevent claiming for either 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 } = useClaimIneligibilityReasons(<YourERC20ContractInstance>, { walletAddress: <walletAddress> });

Example 2

const { data: claimIneligibilityReasons, isLoading, error } = useClaimIneligibilityReasons(<YourERC721ContractInstance>, { quantity: <quantity>, walletAddress: <walletAddress> });

Example 3

const { data: claimIneligibilityReasons, isLoading, error } = useClaimIneligibilityReasons(<YourERC1155ContractInstance>, { quantity: <quantity>, walletAddress: <walletAddress> }, <tokenId>);

Signature:

export declare function useClaimIneligibilityReasons(
contract: RequiredParam<DropContract>,
params: ClaimIneligibilityParams,
tokenId?: BigNumberish,
): import("@tanstack/react-query").UseQueryResult<
import("@thirdweb-dev/sdk").ClaimEligibility[],
unknown
>;

Parameters

ParameterTypeDescription
contractRequiredParam<DropContract>an instance of a contract that extends the ERC20, ERC721 or ERC1155 spec and implements the claimConditions extension.
paramsClaimIneligibilityParams
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<import("@thirdweb-dev/sdk").ClaimEligibility[], unknown>

a response object with the resons for the claim ineligibility