-
Notifications
You must be signed in to change notification settings - Fork 48
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: use createWithTimestamps
in claim
#1024
Conversation
feat: add START_TIME in MerkleLT refactor: use createWithTimestamps in claim function
test: update tests accordingly
createWithTimestamps
in claim
createWithTimestamps
in claim
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.
Thanks for the PR Andrei. Please find my comments below some of which have been addressed through a separate PR #1027 as it required refactoring claim
tests to include all possible branches.
Feel free to give that a review. Let me know if you have any question.
test/periphery/integration/merkle-campaign/factory/create-merkle-lt/createMerkleLT.t.sol
Outdated
Show resolved
Hide resolved
test/periphery/integration/merkle-campaign/lt/claim/claim.t.sol
Outdated
Show resolved
Hide resolved
test/periphery/integration/merkle-campaign/ll/claim/claim.t.sol
Outdated
Show resolved
Hide resolved
@smol-ninja merged the PR here, lmk if it looks good now |
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.
* feat: introduce a Schedule struct for MerkleLL feat: add START_TIME in MerkleLT refactor: use createWithTimestamps in claim function * fix: cover the case when there is no cliff * fix: implement _deployMerkleLT to prevent stack too deep error test: update tests accordingly * style: run forge fmt * fix: first tranche * perf: optimize _calculateStartTimeAndTranches * test: increase coverage * test: dry fy claim tests * remove redundant struct * feedback on PR #1024 (#1027) * feedback on PR #1024 * address feedback --------- Co-authored-by: andreivladbrg <andreivladbrg@gmail.com> --------- Co-authored-by: smol-ninja <shubhamy2015@gmail.com>
* feat: introduce a Schedule struct for MerkleLL feat: add START_TIME in MerkleLT refactor: use createWithTimestamps in claim function * fix: cover the case when there is no cliff * fix: implement _deployMerkleLT to prevent stack too deep error test: update tests accordingly * style: run forge fmt * fix: first tranche * perf: optimize _calculateStartTimeAndTranches * test: increase coverage * test: dry fy claim tests * remove redundant struct * feedback on PR #1024 (#1027) * feedback on PR #1024 * address feedback --------- Co-authored-by: andreivladbrg <andreivladbrg@gmail.com> --------- Co-authored-by: smol-ninja <shubhamy2015@gmail.com>
Closes #996
Some problems in the issue:
MerkleLL
the case when cliff duration is 0 was not coveredMerkleLT
thestartTime + MerkleLT.TrancheWithPercentage.duration // recursively
was not correct, but only for the first tranche