📌 Description
set_operator(operator) appoints a single operator address (admin-only, per the README's table). When the admin appoints a new operator, the previous operator's ability to call pause/unpause must be fully revoked in the same transaction — there should be no window, and no code path, where both the old and new operator addresses remain independently authorized.
🧩 Requirements and context
- Add a test: appoint operator A, appoint operator B (replacing A), then assert A can no longer call
pause/unpause (rejected) while B can.
- Confirm
operator()/is_operator(address) reads reflect only the current operator, never a stale prior one.
- No functional change expected unless the test uncovers a real gap.
🛠️ Suggested execution
- Add the adversarial replace-operator test to
src/test.rs using mock_auths to attempt the call as the old operator post-replacement.
- Fix
set_operator/is_operator in src/lib.rs if a gap is found.
✅ Acceptance criteria
🔒 Security notes
Directly verifies there's no privilege-retention window when the operator role changes hands.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
set_operator(operator)appoints a single operator address (admin-only, per the README's table). When the admin appoints a new operator, the previous operator's ability to callpause/unpausemust be fully revoked in the same transaction — there should be no window, and no code path, where both the old and new operator addresses remain independently authorized.🧩 Requirements and context
pause/unpause(rejected) while B can.operator()/is_operator(address)reads reflect only the current operator, never a stale prior one.🛠️ Suggested execution
src/test.rsusingmock_authsto attempt the call as the old operator post-replacement.set_operator/is_operatorinsrc/lib.rsif a gap is found.✅ Acceptance criteria
pause/unpause.is_operatornever reports a stale prior operator as current.🔒 Security notes
Directly verifies there's no privilege-retention window when the operator role changes hands.
📋 Guidelines