add method for vester update duration

This commit is contained in:
CounterFire2023 2024-09-10 16:00:24 +08:00
parent 6ea5075c4e
commit 287c832d2f

View File

@ -41,6 +41,7 @@ contract Vester is IVester, IERC20, ReentrancyGuard, Governable {
event Deposit(address account, uint256 amount);
event Withdraw(address account, uint256 claimedAmount, uint256 balance);
event PairTransfer(address indexed from, address indexed to, uint256 value);
event DurationUpdated(uint256 duration);
constructor(
string memory _name,
@ -119,6 +120,11 @@ contract Vester is IVester, IERC20, ReentrancyGuard, Governable {
rewardTracker = _rewardTracker;
}
function updateDuration(uint256 _vestingDuration) external onlyGov {
vestingDuration = _vestingDuration;
emit DurationUpdated(_vestingDuration);
}
function setCumulativeRewardDeductions(address _account, uint256 _amount) external override nonReentrant {
_validateHandler();
cumulativeRewardDeductions[_account] = _amount;