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
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
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
| Name | Type | Description |
|---|---|---|
| _saleRecipient | address | Address to be set as new recipient of primary sales. |
Events
PrimarySaleRecipientUpdated
event PrimarySaleRecipientUpdated(address indexed recipient)
Parameters
| Name | Type | Description |
|---|---|---|
recipient indexed | address | undefined |