-
Notifications
You must be signed in to change notification settings - Fork 49
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
Feedback from PRB on V2.2 #883
Conversation
chore: improve wording comments chore: misc improvements and renames docs: capitalize ID refactor: improve variable names refactor: separate max segment and tranche counts refactor: use for loop instead of while
perf: optimize "_update" by testing "_isTransferable" last test: apply "inheritdoc" test: define "withdrawAmount" once test: improve function names test: improve writing in comments test: set the license to "UNLICENSED"
docs: improve writing in NatSpec refactor: rename "sablierAddress" to "sablierStringified"
docs: improve writing in custom errors' NatSpec
chore: improve writing in comments test: bring back test in "createWithDurations" test: close #880 test: fuzz cliff time as zero test: improve BTs and associated modifiers
docs: _create in NatSpec
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.
test/integration/shared/lockup-linear/createWithTimestamps.t.sol
Outdated
Show resolved
Hide resolved
Thanks for the review PRB! Haven't finished reviewing yet, but I want to point out one thing to get things move faster, I guess this was not intentional @PaulRBerg: v2-core/src/SablierV2LockupTranched.sol Lines 47 to 49 in bda5c85
Can you confirm, please, that Doing some changes locally, so I will push commit once I finish. |
chore: fix segments reference fix: mistaken "cliffs" array
Thanks for the counter-review, guys.
Ofc not. I have accidentally copy-pasted it there. Good catch. |
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.
Great findings and suggestions PRB. Short form for _create
is better, capitalizing the ID improves readability and also like more and prefer the naming of the functions in the Helpers library now. I remember using the same terminology when the checks were initially moved to a separate library.
docs: improve wording in comments perf: use "unchecked" for tranche calculations refactor: rename variables
Thanks for the kind words, @andreivladbrg. I have addressed most of your feedback with my latest commit.
The precompile tests are failing, but that's because of #886. |
chore: update "filter_paths" docs: improve writing in comments refactor: include "streamId" in "SablierV2Lockup_WithdrawToZeroAddress" refactor: alphabetical order
Ok guys, I reviewed everything. Whenever you're ready, we can merge this. P.S. let's squash before merging, please. |
test: replace "maxUint40" with "maxOfThree"
@andreivladbrg @smol-ninja can you approve so we can merge? |
I've also bumped PRBMath (see context here: PaulRBerg/prb-math#225). |
* docs: improve wording in NatSpec chore: improve wording comments chore: misc improvements and renames docs: capitalize ID refactor: improve variable names refactor: separate max segment and tranche counts refactor: use for loop instead of while * build: bump OpenZeppelin to v5.0.2 * docs: improve writing in NatSpec perf: optimize "_update" by testing "_isTransferable" last test: apply "inheritdoc" test: define "withdrawAmount" once test: improve function names test: improve writing in comments test: set the license to "UNLICENSED" * refactor: rename "streamingModel" to "sablierModel" docs: improve writing in NatSpec refactor: rename "sablierAddress" to "sablierStringified" * refactor: rename internal create function * chore: singular Check, Effect, Interaction docs: improve writing in custom errors' NatSpec * perf: close #878 docs: improve writing in NatSpec test: apply "seconds" keyword * refactor: reorder checks chore: improve writing in comments test: bring back test in "createWithDurations" test: close #880 test: fuzz cliff time as zero test: improve BTs and associated modifiers * test: remove unused import * test: include map symbol test for lockup tranched docs: _create in NatSpec * revert: bring back GPL V3 license in mocks chore: fix segments reference fix: mistaken "cliffs" array * refactor: update precompiles * test: reuse "createWithTimestamps" modifiers * test: revert max counts to 500 * test: use lockup object * style: correct bad formated natspec * refactor: rename "currentTime" to "blockTimestamp" docs: improve wording in comments perf: use "unchecked" for tranche calculations refactor: rename variables * docs: improve writing in NatSpec * refactor: order functions and fields alphabetically * refactor: rename variable * docs: capitalize IDs chore: update "filter_paths" docs: improve writing in comments refactor: include "streamId" in "SablierV2Lockup_WithdrawToZeroAddress" refactor: alphabetical order * build: bump sphinx * test: remove ERC721Mock and use forge mock * test: update precompiles * chore: say "block timestamp" in comments * refactor: update gas snapshot test: replace "maxUint40" with "maxOfThree" * chore: add trailing slash * build: bump PRBMath --------- Co-authored-by: smol-ninja <[email protected]> Co-authored-by: andreivladbrg <[email protected]>
* docs: improve wording in NatSpec chore: improve wording comments chore: misc improvements and renames docs: capitalize ID refactor: improve variable names refactor: separate max segment and tranche counts refactor: use for loop instead of while * build: bump OpenZeppelin to v5.0.2 * docs: improve writing in NatSpec perf: optimize "_update" by testing "_isTransferable" last test: apply "inheritdoc" test: define "withdrawAmount" once test: improve function names test: improve writing in comments test: set the license to "UNLICENSED" * refactor: rename "streamingModel" to "sablierModel" docs: improve writing in NatSpec refactor: rename "sablierAddress" to "sablierStringified" * refactor: rename internal create function * chore: singular Check, Effect, Interaction docs: improve writing in custom errors' NatSpec * perf: close #878 docs: improve writing in NatSpec test: apply "seconds" keyword * refactor: reorder checks chore: improve writing in comments test: bring back test in "createWithDurations" test: close #880 test: fuzz cliff time as zero test: improve BTs and associated modifiers * test: remove unused import * test: include map symbol test for lockup tranched docs: _create in NatSpec * revert: bring back GPL V3 license in mocks chore: fix segments reference fix: mistaken "cliffs" array * refactor: update precompiles * test: reuse "createWithTimestamps" modifiers * test: revert max counts to 500 * test: use lockup object * style: correct bad formated natspec * refactor: rename "currentTime" to "blockTimestamp" docs: improve wording in comments perf: use "unchecked" for tranche calculations refactor: rename variables * docs: improve writing in NatSpec * refactor: order functions and fields alphabetically * refactor: rename variable * docs: capitalize IDs chore: update "filter_paths" docs: improve writing in comments refactor: include "streamId" in "SablierV2Lockup_WithdrawToZeroAddress" refactor: alphabetical order * build: bump sphinx * test: remove ERC721Mock and use forge mock * test: update precompiles * chore: say "block timestamp" in comments * refactor: update gas snapshot test: replace "maxUint40" with "maxOfThree" * chore: add trailing slash * build: bump PRBMath --------- Co-authored-by: smol-ninja <[email protected]> Co-authored-by: andreivladbrg <[email protected]>
I spent a few days reviewing the
staging
branch - good job @sablier-labs/solidity!Closes #870, #871, #878, #879, and #880.