Function: increaseLockPosition(uint128 additionalAmountToLock, uint128 newExpiry)
The function increases the lock position of a user by adjusting both the amount locked and the expiration time.
Inputs
additionalAmountToLockControl: Arbitrary.
Constraints: None.
Impact: The parameter specifies how much additional Anzen is to be locked.
newExpiryControl: Arbitrary.
Constraints: Must be a valid week start and within the allowed lock duration.
Impact: The parameter sets a new expiry date for the lock.
Branches and code coverage
Intended branches
Transfer additional Anzen from the user to the contract if
additionalAmountToLockis greater than zero.Call
_increasePositionto internally update the user's locked position, the total supply, and the user's balance history.
Negative behavior
Revert if
newExpiryresults in an invalid lock duration or is otherwise inappropriate relative to the current time or lock policy.