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);
}
function usePrimarySaleRecipient(
contract: RequiredParam<ValidContractInstance>,
): UseQueryResult<string, unknown>;

Parameters

Instance of a SmartContract

Type

let contract: RequiredParam<ValidContractInstance>;

Returns

let returnType: UseQueryResult<string, unknown>;

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