跳到主要内容

setFee

Contract: JBPayoutRedemptionPaymentTerminal​‌

Interface: IJBPayoutRedemptionPaymentTerminal

Allows the fee to be updated.

Only the owner of this contract can change the fee.

Definition

function setFee(uint256 _fee) external onlyOwner { ... }
  • Arguments:
    • _fee is the new fee, out of MAX_FEE.
  • Through the onlyOwner modifier, the function can only be accessed by the owner of this contract.
  • The function can be overriden by inheriting contracts.
  • The function doesn't return anything.

Body

  1. Make sure the proposed fee is less than the max fee.

    // The provided fee must be within the max.
    if (_fee > _FEE_CAP) revert FEE_TOO_HIGH();

    Internal references:

  2. Store the new fee.

    // Store the new fee.
    fee = _fee;

    Internal references:

  3. Emit a SetFee event with the relevant parameters.

    emit SetFee(_fee, msg.sender);

    Event references: