Skip to main content

IPlatformFee

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

Methods

getPlatformFeeInfo

function getPlatformFeeInfo() external view returns (address, uint16)

Returns the platform fee bps and recipient.

Returns

NameTypeDescription
_0addressundefined
_1uint16undefined

setPlatformFeeInfo

function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) external nonpayable

Lets a module admin update the fees on primary sales.

Parameters

NameTypeDescription
_platformFeeRecipientaddressundefined
_platformFeeBpsuint256undefined

Events

PlatformFeeInfoUpdated

event PlatformFeeInfoUpdated(address indexed platformFeeRecipient, uint256 platformFeeBps)

Emitted when fee on primary sales is updated.

Parameters

NameTypeDescription
platformFeeRecipient indexedaddressundefined
platformFeeBpsuint256undefined