usePrimarySaleRecipient
Hook for getting the primary sales recipient of a smart contract.
Available to use on contracts that implement the Primary Sale interface.
import { usePrimarySaleRecipient } from "@thirdweb-dev/react";
Usage
Provide your contract instance from the useContract
hook as the argument.
import { useContract, usePrimarySaleRecipient } from "@thirdweb-dev/react";
const contractAddress = "{{contract_address}}";
function App() {
const { contract } = useContract(contractAddress);
const { data, isLoading, error } = usePrimarySaleRecipient(contract);
}
Return Value
The hook's data
property, once loaded, is a string with the wallet address of the primary sales recipient.
string;