Replies: 4 comments 5 replies
-
The client repository suffers from a similar problem within the We have Not saying it's the best name, but it's short and it does the job for now. |
Beta Was this translation helpful? Give feedback.
-
Yet another idea is to use the "balance of" pattern from ERC-20 and ERC-721, and do something like this:
And/ or couple this with the idea I left in #227:
|
Beta Was this translation helpful? Give feedback.
-
Agree that we should rename those functions.
Interesting idea. For me, it is either |
Beta Was this translation helpful? Give feedback.
-
I ended up going with |
Beta Was this translation helpful? Give feedback.
-
The following functions are mission-critical:
getReturnableAmount
getStreamedAmount
getWithdrawableAmount
And they are in a different category of importance compared to the static getters (e.g.
getStartTime
).This fact has become clearer once I got to implement stream statuses in #269, since I had to add special checks for the status of the stream (based on @andreivladbrg's feedback, thanks again) just in these functions but not in the other getters. In addition, I have also thought about this when I started working on invariant tests (#244) - there are a few protocol invariants that depend upon the functions above.
It is thus that I find it a little bit uncomfortable to have these functions start with the same prefix as the static getters. There's no hint at the dynamic nature of these functions.
What would you say about using one of the following prefixes instead?
compute
calculate
Beta Was this translation helpful? Give feedback.
All reactions