Function: createLockFor(uint256 _value, uint256 _lockDuration, address _to)
Deposits _value tokens for _to and locks for _lockDuration.
Inputs
_valueControl: Controlled by the caller (agency).
Constraints: Must be greater than zero.
Impact: Specifies the amount of tokens to deposit and lock.
_lockDurationControl: Controlled by the caller (agency).
Constraints: Must be greater than the current timestamp and less than or equal to the maximum lock duration (two years).
Impact: Specifies the duration for which the tokens will be locked.
_toControl: Controlled by the caller (agency).
Constraints: Must be a valid address.
Impact: Specifies the address to deposit and lock tokens for.
Branches and code coverage (including function calls)
Intended branches
Successful creation of a new lock for
_towith the specified_valueand_lockDuration.
Negative behavior
Revert if the caller is not an agency.
Revert if
_valueis zero.Revert if
_lockDurationis not greater than the current timestamp.Revert if
_lockDurationexceeds the maximum lock duration (two years).Revert if trying to create lock twice.