useRoyaltySettings

Hook for retrieving royalty settings of a smart contract.

Available to use on contracts that implement the Royalty interface.

Example

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

Parameters

Returns

The hook's data property, once loaded, is an object with two properties:

{
seller_fee_basis_points: number;
fee_recipient: string;
}
  • The seller_fee_basis_points is the royalty amount (in basis points) that the seller will receive for each token sale on secondary markets.

  • The fee_recipient is the wallet address that will receive the royalty payments.