useSetAppURI

Set App URI of the 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>
);
};
function useSetAppURI(
contract: RequiredParam<ValidContractInstance>,
): UseMutationResult<
Omit<
{
data: () => Promise<unknown>;
receipt: providers.TransactionReceipt;
},
"data"
>,
unknown,
{ uri: string },
unknown
>;

Parameters

Instance of a SmartContract

Type

let contract: RequiredParam<ValidContractInstance>;

Returns

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

A mutation object to update the appURI of a contract