Skip to main content

useSetClaimConditions() function

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

Use this to set claim conditions on your DropContract

Example

const Component = () => {
const { contract } = useContract(<ContractAddress>);
const {
mutate: setClaimConditions,
isLoading,
error,
} = useSetClaimConditions(contract);

if (error) {
console.error("failed to set claim conditions", error);
}

return (
<button
disabled={isLoading}
onClick={() => setClaimConditions({ phases: [{ price: 2, maxQuantity: 100 }] })}
>
Set Claim Conditions!
</button>
);
};

Signature:

export declare function useSetClaimConditions(
contract: RequiredParam<DropContract>,
tokenId?: BigNumberish,
): import("@tanstack/react-query").UseMutationResult<
Omit<
{
receipt: import("@ethersproject/abstract-provider").TransactionReceipt;
data: () => Promise<unknown>;
},
"data"
>,
unknown,
SetClaimConditionsParams,
unknown
>;

Parameters

ParameterTypeDescription
contractRequiredParam<DropContract>an instance of a DropContract
tokenIdBigNumberish(Optional)

Returns:

import("@tanstack/react-query").UseMutationResult<Omit<{ receipt: import("@ethersproject/abstract-provider").TransactionReceipt; data: () => Promise<unknown>; }, "data">, unknown, SetClaimConditionsParams, unknown>

a mutation object that can be used to set claim conditions