Skip to main content

PrimarySale

Primary Sale

Thirdweb's PrimarySale is a contract extension to be used with any base contract. It exposes functions for setting and reading the recipient of primary sales, and lets the inheriting contract perform conditional logic that uses information about primary sales, if desired.

Methods

primarySaleRecipient

function primarySaleRecipient() external view returns (address)

Returns primary sale recipient address.

Returns

NameTypeDescription
_0addressundefined

setPrimarySaleRecipient

function setPrimarySaleRecipient(address _saleRecipient) external nonpayable

Updates primary sale recipient.

Caller should be authorized to set primary sales info. See {_canSetPrimarySaleRecipient}. Emits {PrimarySaleRecipientUpdated Event}; See {_setupPrimarySaleRecipient}.

Parameters

NameTypeDescription
_saleRecipientaddressAddress to be set as new recipient of primary sales.

Events

PrimarySaleRecipientUpdated

event PrimarySaleRecipientUpdated(address indexed recipient)

Parameters

NameTypeDescription
recipient indexedaddressundefined