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

fix(StakeManager): add checks for whether lockup period is in range #39

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

0x-r4bbit
Copy link
Collaborator

This commit introduces MIN_LOCKUP_PERIOD and MAX_LOCKUP_PERIOD and makes use of them within StakeManager.stake() and StakeManager.lock() accordingly.

When users deposit tokens into their vault via stake(), they can provide an optional lockup time. If the value is 0 it implies users do not want to lock their stake.

If the value is > 0 it has to be within the range of MIN_LOCKUP_PERIOD and MAX_LOCKUP_PERIOD.

Properly addresses #15

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Added natspec comments?
  • Ran forge snapshot?
  • Ran pnpm lint?
  • Ran forge test?

Base automatically changed from feat/vault-factory to develop November 7, 2023 08:49
This commit introduces `MIN_LOCKUP_PERIOD` and `MAX_LOCKUP_PERIOD` and
makes use of them within `StakeManager.stake()` and
`StakeManager.lock()` accordingly.

When users deposit tokens into their vault via `stake()`, they can
provide an optional lockup time. If the value is `0` it implies users do
not want to lock their stake.

If the value is `> 0` it has to be within the range of
`MIN_LOCKUP_PERIOD` and `MAX_LOCKUP_PERIOD`.

Properly addresses #15
@0x-r4bbit 0x-r4bbit merged commit d9a6455 into develop Dec 6, 2023
4 checks passed
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