Docs

usePrimarySaleRecipient

Hook for getting the primary sales recipient of a smart contract.

Available to use on contracts that implement the PrimarySale interface.

Example

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

Parameters

Returns

The hook's data property, once loaded, is a string with the wallet address of the primary sales recipient.