usePlatformFees
Hook for getting the platform fee settings of a contract.
Available to use on contracts that implement the PlatformFee interface.
import { usePlatformFees } from "@thirdweb-dev/react";
const { data, isLoading, error } = usePlatformFees(contract);
Usage
Provide your contract instance as the argument.
import { useContract, usePlatformFees } from "@thirdweb-dev/react";
// Your smart contract address (must implement PlatformFee)
const contractAddress = "{{contract_address}}";
function App() {
const { contract } = useContract(contractAddress);
const { data, isLoading, error } = usePlatformFees(contract);
}