Skip to main content

PlatformFee

Functionality available for contracts that inherit the PlatformFee contract.

get

Get the platform fee recipient and basis points.

const feeInfo = await contract.platformFee.get();
Configuration

Return Value

Returns an object containing the platform fee recipient and basis points.

{
platform_fee_basis_points: number;
platform_fee_recipient: string;
}

set

Set the platform fee recipient and basis points.

const txResult = await contract.platformFees.set({
platform_fee_basis_points: 100,
platform_fee_recipient: "0x123",
});
Configuration

platform_fee_basis_points

The percentage fee to take, in basis points. For example, 100 basis points is 1%.

Must be a number.

platform_fee_recipient

The wallet address that will receive the platform fees.

Must be a string.