Function useSetClaimConditions

  • Beta

    Set claim conditions

    Parameters

    Returns UseMutationResult<{
        receipt: providers.TransactionReceipt;
    }, unknown, SetClaimConditionsParams, unknown>

    a mutation object that can be used to set claim conditions

    Example

    const Component = () => {
    const { contract } = useContract("{{contract_address}}");
    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, maxClaimableSupply: 100 }] })}
    >
    Set Claim Conditions!
    </button>
    );
    };

    Twfeature

    ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1 | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1

    See

    Documentation

Generated using TypeDoc