-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add "getStreamedAmount" function #266
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e39bbab
to
1c98818
Compare
4cb683a
to
c8963d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this PR, but some small mistakes were made.
build: upgrade to latest "prb-math" chore: add explanations for why casting is safe chore: add more explanatory code comments chore: delete unused imports chore: improve wording in code comments refactor: assign "elapsedSegmentTime" and "totalSegmentTime" only once refactor: change types to "SD59x18" in "getWithdrawableAmount" refactor: delete the "segmentCount" param in "_checkProSegments" refactor: rename "checkCreateLinearParams" to "checkCreateLinearArgs" refactor: rename "checkCreateProParams" to "checkCreateProArgs" refactor: rename "proRataAmount" var to "streamedAmount" in "getWithdrawableAmount" refactor: use casting utilities from PRBMath test: order helpers alphabetically in "ProTest"
perf: simplify "getReturnableAmount" by calling "getStreamedAmount" refactor: move "getWithdrawableAmount" logic to "getStreamedAmount" refactor: order constant functions alphabetically test: add missing check for "currentTime >= stopTime" in "getStreamedAmount" replicas test: better document fuzzing in "getWithdrawableAmount" tests test: simplify "getWithdrawableAmount" tests by fuzzing current time test: test "getStreamedAmount"
c8963d8
to
2cc3934
Compare
chore: remove local variable in "getReturnableAmount" test: correct comments about functions that calculate the streamed amount
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements #255.
Changelog: