useUpdatePlatformFees
This feature is currently in beta and may change based on feedback that we receive.
Use this to update the platform fees settings of your
Example
const Component = () => {
const {
mutate: updatePlatformFees,
isLoading,
error,
} = useUpdatePlatformFees(SmartContract);
if (error) {
console.error("failed to update platform fees", error);
}
return (
<button
disabled={isLoading}
onClick={() => updatePlatformFees({ updatePayload: { fee_recipient: "0x123", platform_fee_basis_points: 5_00 } })}
>
Update Platform fees
</button>
);
};
Signature:
export declare function useUpdatePlatformFees(contract: RequiredParam<ValidContractInstance>): import("@tanstack/react-query").UseMutationResult<Omit<{
receipt: import("@ethersproject/abstract-provider").TransactionReceipt;
data: () => Promise<unknown>;
}, "data">, unknown, {
platform_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
}, unknown>;
Parameters
Parameter | Type | Description |
---|---|---|
contract | RequiredParam<ValidContractInstance> | an instance of a |
Returns:
import("@tanstack/react-query").UseMutationResult<Omit<{ receipt: import("@ethersproject/abstract-provider").TransactionReceipt; data: () => Promise<unknown>; }, "data">, unknown, { platform_fee_basis_points?: number | undefined; fee_recipient?: string | undefined; }, unknown>
a mutation object that can be used to update the platform fees settings