setFee
Contract: JBPayoutRedemptionPaymentTerminal
Interface: IJBPayoutRedemptionPaymentTerminal
- Step by step
 - Code
 - Errors
 - Events
 - Bug bounty
 
Allows the fee to be updated.
Only the owner of this contract can change the fee.
Definition
function setFee(uint256 _fee) external onlyOwner { ... }
- Arguments:
_feeis the new fee, out of MAX_FEE.
 - Through the 
onlyOwnermodifier, 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
- 
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:
 - 
Store the new fee.
// Store the new fee.
fee = _fee;Internal references:
 - 
Emit a
SetFeeevent with the relevant parameters.emit SetFee(_fee, msg.sender);Event references:
 
/**
  @notice
  Allows the fee to be updated.
  @dev
  Only the owner of this contract can change the fee.
  @param _fee The new fee, out of MAX_FEE.
*/
function setFee(uint256 _fee) external virtual override onlyOwner {
  // The provided fee must be within the max.
  if (_fee > _FEE_CAP) revert FEE_TOO_HIGH();
  // Store the new fee.
  fee = _fee;
  emit SetFee(_fee, msg.sender);
}
| String | Description | 
|---|---|
FEE_TOO_HIGH | Thrown if the proposed fee is greater than 5%. | 
| Name | Data | 
|---|---|
SetFee | 
  | 
| Category | Description | Reward | 
|---|---|---|
| Optimization | Help make this operation more efficient. | 0.5ETH | 
| Low severity | Identify a vulnerability in this operation that could lead to an inconvenience for a user of the protocol or for a protocol developer. | 1ETH | 
| High severity | Identify a vulnerability in this operation that could lead to data corruption or loss of funds. | 5+ETH |