• Beta

    Set App URI

    Parameters

    • contract: RequiredParam<ValidContractInstance>

      an instance of a SmartContract

    Returns UseMutationResult<Omit<{
        data: (() => Promise<unknown>);
        receipt: providers.TransactionReceipt;
    }, "data">, unknown, {
        uri: string;
    }, unknown>

    a mutation object that can be used to update the appURI of a contract

    Example

    const Component = () => {
    const {
    mutate: useSetAppURI,
    isLoading,
    error,
    } = useSetAppURI(contract);

    if (error) {
    console.error("failed to update appURI", error);
    }

    return (
    <button
    disabled={isLoading}
    onClick={() => useSetAppURI({ uri })}
    >
    Update App URI
    </button>
    );
    };

    Twfeature

    AppUR

Generated using TypeDoc