ISablierFlow
Inherits: IBatch, ISablierFlowBase
Creates and manages Flow streams with linear streaming functions.
Functions
coveredDebtOf
Returns the amount of debt covered by the stream balance, denoted in token's decimals.
Reverts if streamId
references a null stream.
function coveredDebtOf(uint256 streamId) external view returns (uint128 coveredDebt);
Parameters
Name | Type | Description |
---|---|---|
streamId | uint256 | The stream ID for the query. |
depletionTimeOf
Returns the time at which the total debt exceeds stream balance. If the total debt is less than or equal to stream balance, it returns 0.
Reverts on the following conditions:
- If
streamId
references a paused or a null stream. - If stream balance is zero.
function depletionTimeOf(uint256 streamId) external view returns (uint256 depletionTime);
Parameters
Name | Type | Description |
---|---|---|
streamId | uint256 | The stream ID for the query. |
ongoingDebtScaledOf
Returns the amount of debt accrued since the snapshot time until now, denoted as a fixed-point number where 1e18 is 1 token.
Reverts if streamId
references a null stream.
function ongoingDebtScaledOf(uint256 streamId) external view returns (uint256 ongoingDebtScaled);
Parameters
Name | Type | Description |
---|---|---|
streamId | uint256 | The stream ID for the query. |
refundableAmountOf
Returns the amount that the sender can be refunded from the stream, denoted in token's decimals.
Reverts if streamId
references a null stream.
function refundableAmountOf(uint256 streamId) external view returns (uint128 refundableAmount);
Parameters
Name | Type | Description |
---|---|---|
streamId | uint256 | The stream ID for the query. |
statusOf
Returns the stream's status.
Reverts if streamId
references a null stream. Integrators should exercise caution when depending on the return value
of this function as streams can be paused and resumed at any moment.
function statusOf(uint256 streamId) external view returns (Flow.Status status);
Parameters
Name | Type | Description |
---|---|---|
streamId | uint256 | The stream ID for the query. |
totalDebtOf
Returns the total amount owed by the sender to the recipient, denoted in token's decimals.
Reverts if streamId
references a null stream.
function totalDebtOf(uint256 streamId) external view returns (uint256 totalDebt);
Parameters
Name | Type | Description |
---|---|---|
streamId | uint256 | The stream ID for the query. |