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
tokenControl: Fully controlled by the caller.
Constraints: N/A.
Impact: Token namespace for operator approval and allowances.
operatorControl: Fully controlled by the caller.
Constraints: Must be nonzero (enforced by modifier).
Impact: Target operator whose approval and allowances are set.
approvedControl: Fully controlled by the caller.
Constraints: N/A.
Impact: Enables or disables the operator.
rateAllowanceControl: Fully controlled by the caller.
Constraints: N/A.
Impact: Max cumulative payment rate the operator may configure across rails.
lockupAllowanceControl: Fully controlled by the caller.
Constraints: N/A.
Impact: Max cumulative lockup the operator may configure/consume.
maxLockupPeriodControl: 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.