Helpers
Library with helper functions in SablierFlow contract.
Functions
calculateAmountsFromFee
Calculate the fee amount and the net amount after subtracting the fee, based on the fee
percentage.
function calculateAmountsFromFee(
uint128 totalAmount,
UD60x18 fee
)
internal
pure
returns (uint128 feeAmount, uint128 netAmount);
checkAndCalculateBrokerFee
Checks the Broker
parameter, and then calculates the broker fee amount and the deposit amount from the total amount.
function checkAndCalculateBrokerFee(
uint128 totalAmount,
Broker memory broker,
UD60x18 maxFee
)
internal
pure
returns (uint128 brokerFeeAmount, uint128 depositAmount);