-
Notifications
You must be signed in to change notification settings - Fork 2
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: MerkleVCA
contract
#58
Conversation
refactor: separate out parameters struct for Merkle Instant and Merkle Lockups refactor: refactor shape and camapign name as bytes32 in Merkle campaign constructor arguments chore: contract inheritance test: deploy factory locally for fork tests feat: merkle vca contract feat: add CreateMerkleVCA run script refactor: rename schedule to _vestingSchedule in MerkleVCA feat: add SablierMerkleVCA in prepare-artifacts bash script refactor: replace internal variables with private in non-abstract contracts refactor: 7 days claim window post vesting unlock fix: set sacrificedAmount to 0 in refundSacrificedAmount function refactor: error name feat: revert claim if vesting start time is in future feat: revert createMerkleVCA if either of vesting times is zero test: integration tests for createMerkleVCA fix: calculate claimable amount only if blocktime is in the vesting range test: add merkleVCA integration tests test: integration tests test: fork tests for merkleVCA test: remove Vars struct from merkle instant contructor test refactore: rename sacrifiedAmount to forgoneAmount
This comment was marked as resolved.
This comment was marked as resolved.
52474ad
to
0f7a97f
Compare
This PR is now ready for your review @andreivladbrg. |
cb87898
to
320595e
Compare
Co-authored-by: Andrei Vlad Birgaoanu <[email protected]>
320595e
to
e76d4e6
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.
while reviewing, a question came to mind—should we allow creating a MerkleVCA
campaign with an end time in the past? or should we revert and instead, recommend the user to create a MerkleInstant
campaign?
this would mean adding the following check in the constructor:
if(endTime <= block.timestamp) {
revert();
}
haven’t reviewed the tests yet, but in order to be more time-efficient, i’m going to leave these comments:
chore: use named args in transfer function chore: correct prepare artifacts interface
My reply is #58 (comment). |
Co-authored-by: Andrei Vlad Birgaoanu <[email protected]>
c54bc79
to
8a9eb88
Compare
8a9eb88
to
156b3b1
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.
great work, left some comments re tests:
tests/integration/concrete/factory/create-merkle-vca/createMerkleVCA.tree
Outdated
Show resolved
Hide resolved
test: rename dir to tokens small polishes
Added a new commit, 651f982, incorporating your feedback as well as fixing a bug in VCA fork tests. |
@andreivladbrg looking forward to your approval on this PR. |
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.
Closes #43
Note
The factory won't be able to deploy
SablierMerkleVCA
contract if the following requirements are not met:>= vesting.end + 7 days
(follow this discussion).vesting.end
>vesting.start
Unlike other Merkle campaigns where users are incentivised to claim early, in
MerkleVCA
, users are incentivised to claim late. That means, its entirely possible to see no claim until the vesting ends. So its important to check for the constraints during the deployment instead of the_claim
function.Blocker
Related discussions