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: supporting unlocked with withdrawal period #6

Merged
merged 19 commits into from
Sep 25, 2024

Conversation

wei3erHase
Copy link
Member

@wei3erHase wei3erHase commented Sep 20, 2024

The underlying codebase requires the user to decide at lockup the Date of withdrawal.
The intended behaviour, is that the user can decide to lock the tokens in an "unlocked with withdrawal period" mode, in which it would require the user to first "initiate the withdrawal", to be able to actually withdraw the tokens (e.g.) 7 days later.

This is achieved by:

  • reverting on withdrawal when locking Date is 0
  • adding a new method, identical in arguments to "unlock", that would revert if Date != 0
  • when user calls this method, the locking Date should be now() + 7 days

Base automatically changed from feat/single-schedule to dev September 25, 2024 14:09
@wei3erHase wei3erHase force-pushed the feat/unlock-with-withdrawal branch from e7a32b9 to 028930d Compare September 25, 2024 14:57
@wei3erHase wei3erHase marked this pull request as ready for review September 25, 2024 14:58
@wei3erHase wei3erHase merged commit f387724 into dev Sep 25, 2024
2 checks passed
@wei3erHase wei3erHase deleted the feat/unlock-with-withdrawal branch September 25, 2024 15:00
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.

1 participant