Beta
an instance of a SmartContract
a mutation object that can be used to update the primary sales recipient
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: updatePrimarySalesRecipient,
isLoading,
error,
} = useUpdatePrimarySaleRecipient(contract);
if (error) {
console.error("failed to update recipient", error);
}
return (
<button
disabled={isLoading}
onClick={() => updatePrimarySalesRecipient({ newRecipient: "{{wallet_address}}" })}
>
Update Recipient
</button>
);
};
PrimarySale
Generated using TypeDoc
Set the primary sale recipient