Infernet
SDK
Reference
Payments
Fee

Fee

Git Source (opens in a new tab)

Inherits: Ownable

Protocol fee registry

Implements Ownable to represent feeRecipient as registry owner

State Variables

FEE

Fee amount, range: [0, 10000] with 2 decimal precision [0.00, 100.00]

Updating fee past 100.00 is not disallowed and it is up to the updating caller to ensure bounds

Exposes public getter to allow checking fee

uint16 public FEE;

Functions

constructor

Initializes new Fee

constructor(address feeRecipient, uint16 fee);

Parameters

NameTypeDescription
feeRecipientaddressinitial protocol fee recipient
feeuint16initial protocol fee

updateFee

Allows owner (fee recipient) to update protocol fee

function updateFee(uint16 newFee) external onlyOwner;

Parameters

NameTypeDescription
newFeeuint16protocol fee to update to

FEE_RECIPIENT

Returns fee recipient (owner) address

Acts simply as a proxy to the existing owner() fn to be more verbose

function FEE_RECIPIENT() external view returns (address);

Returns

NameTypeDescription
<none>addressfee recipient address