mirror of https://github.com/logos-co/staking.git
Add max lock limit of 4 years
This commit is contained in:
parent
24e59ff4a8
commit
e4085c3447
|
@ -88,6 +88,7 @@ contract StakeManager is Ownable {
|
||||||
function lock(uint256 _time) external onlyVault {
|
function lock(uint256 _time) external onlyVault {
|
||||||
Account storage account = accounts[msg.sender];
|
Account storage account = accounts[msg.sender];
|
||||||
processAccount(account, currentEpoch);
|
processAccount(account, currentEpoch);
|
||||||
|
require(_time < 209 weeks, "Cannot lock for more than 4 years");
|
||||||
require(block.timestamp + _time > account.lockUntil, "Cannot decrease lock time");
|
require(block.timestamp + _time > account.lockUntil, "Cannot decrease lock time");
|
||||||
mintIntialMultiplier(account, _time);
|
mintIntialMultiplier(account, _time);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue