Function: increaseLockPositionAndBroadcast(uint128 additionalAmountToLock, uint128 newExpiry, uint256[] calldata chainIds)
The function combines the operations of increasing the lock position of the user and broadcasting the updated position across specified chains.
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.
chainIdsControl: Arbitrary.
Constraints: Must be nonempty and supported chain IDs.
Impact: The parameter specifies the chains to broadcast the update.
Branches and code coverage
Intended branches
Call
increaseLockPositionto update the user's locked position by transferring additional funds and adjusting the expiry.Call within
increaseLockPositionfor internal state updates and calculations related to the VE-token balance.Broadcast updates user position to specified chains.
Negative behavior
Revert if
chainIdsis empty.Revert if elements of
chainIdsare not indestinationContracts.Revert if
newExpiryresults in an invalid lock duration or is otherwise inappropriate relative to the current time or lock policy.