Function: setOperatorApproval(address token, address operator, bool approved, uint256 rateAllowance, uint256 lockupAllowance, uint256 maxLockupPeriod)
This function sets or updates the caller’s operator approval for a token, including the approved flag, rate allowance, lockup allowance, and maximum lockup period.
Inputs
token
Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Token namespace for operator approval and allowances.
operator
Control: Fully controlled by the caller.
Constraints: Must be nonzero (enforced by modifier).
Impact: Target operator whose approval and allowances are set.
approved
Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Enables or disables the operator.
rateAllowance
Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Max cumulative payment rate the operator may configure across rails.
lockupAllowance
Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Max cumulative lockup the operator may configure/consume.
maxLockupPeriod
Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Max lockup period (in epochs) the operator may set per rail.
Branches and code coverage
Intended branches
Success path (sets flags/allowances, emits
OperatorApprovalUpdated
).Zero-operator-address revert.