-
Notifications
You must be signed in to change notification settings - Fork 45
done veVIRTUAL #61
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
base: main
Are you sure you want to change the base?
done veVIRTUAL #61
Conversation
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.
Can we add a function to extend the lock duration without withdrawing? I know it is possible to toggle auto renew to set it to max but would be good to have flexibility to add a manually extension
contracts/token/veVirtual.sol
Outdated
Lock memory lock = locks[_msgSender()][index]; | ||
require(block.timestamp >= lock.end, "Lock is not expired"); | ||
|
||
IERC20(baseToken).safeTransfer(_msgSender(), lock.amount); |
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.
I think we can switch the order of this to prevent re-entrancy attack
so move the index part + delete up then do the transfer
No description provided.