Skip to main content

ISablierV2Base

Git Source

Inherits: IAdminable

Base logic for all Sablier V2 streaming contracts.

Functions

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.

function MAX_FEE() external view returns (UD60x18);

comptroller

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

function comptroller() external view returns (ISablierV2Comptroller);

protocolRevenues

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

function protocolRevenues(IERC20 asset) external view returns (uint128 revenues);

Parameters

NameTypeDescription
assetIERC20The contract address of the ERC-20 asset to query.

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;

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;

Parameters

NameTypeDescription
newComptrollerISablierV2ComptrollerThe address of the new comptroller contract.

Events

ClaimProtocolRevenues

Emitted when the admin claims all protocol revenues accrued for a particular ERC-20 asset.

event ClaimProtocolRevenues(address indexed admin, IERC20 indexed asset, uint128 protocolRevenues);

SetComptroller

Emitted when the admin sets a new comptroller contract.

event SetComptroller(address indexed admin, ISablierV2Comptroller oldComptroller, ISablierV2Comptroller newComptroller);