Skip to content
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

Merged
merged 10 commits into from
Aug 28, 2024

Conversation

andreivladbrg
Copy link
Member

@andreivladbrg andreivladbrg commented Aug 25, 2024

Closes #996

Some problems in the issue:

  • In MerkleLL the case when cliff duration is 0 was not covered
  • In MerkleLTthe startTime + MerkleLT.TrancheWithPercentage.duration // recursively was not correct, but only for the first tranche

feat: add START_TIME in MerkleLT
refactor: use createWithTimestamps in claim function
@andreivladbrg andreivladbrg marked this pull request as draft August 25, 2024 11:32
@andreivladbrg andreivladbrg marked this pull request as ready for review August 27, 2024 11:54
smol-ninja added a commit that referenced this pull request Aug 28, 2024
@smol-ninja smol-ninja changed the title Use createWithTimestamps in claim feat: use createWithTimestamps in claim Aug 28, 2024
Copy link
Member

@smol-ninja smol-ninja left a 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.

src/periphery/types/DataTypes.sol Outdated Show resolved Hide resolved
src/periphery/SablierMerkleLT.sol Show resolved Hide resolved
test/utils/Defaults.sol Outdated Show resolved Hide resolved
test/utils/Defaults.sol Outdated Show resolved Hide resolved
@smol-ninja smol-ninja mentioned this pull request Aug 28, 2024
smol-ninja and others added 2 commits August 28, 2024 11:54
* feedback on PR #1024

* address feedback

---------

Co-authored-by: andreivladbrg <andreivladbrg@gmail.com>
@andreivladbrg
Copy link
Member Author

@smol-ninja merged the PR here, lmk if it looks good now

Copy link
Member

@smol-ninja smol-ninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smol-ninja smol-ninja merged commit 5eb674a into staging Aug 28, 2024
8 checks passed
@smol-ninja smol-ninja deleted the claim/create-wtih-timestamps branch August 28, 2024 11:24
andreivladbrg added a commit that referenced this pull request Sep 11, 2024
* 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>
andreivladbrg added a commit that referenced this pull request Oct 8, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants