Skip to main content

SablierV2Base

Git Source

Inherits: NoDelegateCall, ISablierV2Base, Adminable

See the documentation in ISablierV2Base.

State Variables

MAX_FEE

Retrieves the maximum fee that can be charged by the protocol or a broker, denoted as a fixed-point number where 1e18 is 100%.

This value is hard coded as a constant.

UD60x18 public constant override MAX_FEE = UD60x18.wrap(0.1e18);

comptroller

Retrieves the address of the comptroller contract, responsible for the Sablier V2 protocol configuration.

ISablierV2Comptroller public override comptroller;

protocolRevenues

Retrieves the protocol revenues accrued for the provided ERC-20 asset, in units of the asset's decimals.

mapping(IERC20 asset => uint128 revenues) public override protocolRevenues;

Functions

constructor

Emits a {TransferAdmin} event.

constructor(address initialAdmin, ISablierV2Comptroller initialComptroller);

Parameters

NameTypeDescription
initialAdminaddressThe address of the initial contract admin.
initialComptrollerISablierV2ComptrollerThe address of the initial comptroller.

claimProtocolRevenues

Claims all accumulated protocol revenues for the provided ERC-20 asset.

Emits a {ClaimProtocolRevenues} event. Requirements:

  • msg.sender must be the contract admin.
function claimProtocolRevenues(IERC20 asset) external override onlyAdmin;

Parameters

NameTypeDescription
assetIERC20The contract address of the ERC-20 asset for which to claim protocol revenues.

setComptroller

Assigns a new comptroller contract responsible for the protocol configuration.

Emits a {SetComptroller} event. Notes:

  • Does not revert if the comptroller is the same. Requirements:
  • msg.sender must be the contract admin.
function setComptroller(ISablierV2Comptroller newComptroller) external override onlyAdmin;

Parameters

NameTypeDescription
newComptrollerISablierV2ComptrollerThe address of the new comptroller contract.