useUpdatePlatformFees
Set the platform fee recipient and basis points
Example
const Component = () => {
const { contract } = useContract("{{contract_address}}");
const {
mutate: updatePlatformFees,
isLoading,
error,
} = useUpdatePlatformFees(contract);
if (error) {
console.error("failed to update platform fees", error);
}
return (
<button
disabled={isLoading}
onClick={() =>
updatePlatformFees({
updatePayload: {
fee_recipient: "{{wallet_address}}",
platform_fee_basis_points: 5_00,
},
})
}
>
Update Platform fees
</button>
);
};
Parameters
Returns
a mutation object that can be used to update the platform fees settings