Hook for getting the platform fee settings of a contract.

Available to use on contracts that implement the PlatformFee interface.


import { useContract, usePlatformFees } from "@thirdweb-dev/react";
function App() {
const { contract } = useContract(contractAddress);
const { data, isLoading, error } = usePlatformFees(contract);



The hook's data property, once loaded, is an object containing two fields:

  • platform_fee_basis_points : the platform fee basis points set on the contract

  • platform_fee_recipient : the wallet address of the platform fee recipient

Note : The basis points are in percentage format, meaning that a value of 500 is equivalent to a 5% fee.

platform_fee_basis_points: number;
platform_fee_recipient: string;