You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to take the getWithdrawableAmount function and rename it to getStreamedAmount, and then write up a new getWithdrawableAmount that simply calls getStreamedAmount and subtracts the withdrawn amount.
Benefits:
Consistency with the marketing approach. We're marketing ourselves as a streaming protocol, yet we don't have any function that returns the amount streamed so far.
We would be able to simplify the implementation for the getReturnableAmount function, since we could call getStreamedAmount instead of getWithdrawableAmount, and not subtract the withdrawn amount. This should save a little bit of gas.
Obviously, there's a contract size concern regarding SablierV2Pro. Thus, if we implement the proposal herein, we may have to move the _calculateWithdrawableAmountForMultipleSegments and the _calculateWithdrawableAmountForOneSegment functions in the Helpers library - but, as discussed in #220, I was open to this anyway.
The text was updated successfully, but these errors were encountered:
The idea is to take the
getWithdrawableAmount
function and rename it togetStreamedAmount
, and then write up a newgetWithdrawableAmount
that simply callsgetStreamedAmount
and subtracts the withdrawn amount.Benefits:
getReturnableAmount
function, since we could callgetStreamedAmount
instead ofgetWithdrawableAmount
, and not subtract the withdrawn amount. This should save a little bit of gas.Obviously, there's a contract size concern regarding
SablierV2Pro
. Thus, if we implement the proposal herein, we may have to move the_calculateWithdrawableAmountForMultipleSegments
and the_calculateWithdrawableAmountForOneSegment
functions in theHelpers
library - but, as discussed in #220, I was open to this anyway.The text was updated successfully, but these errors were encountered: