SwitchableBeacon upgrades & task/role application systems#86
Merged
hudsonhrh merged 1 commit intohudsonhrh/event-ordering-fixfrom Feb 6, 2026
Merged
Conversation
…ication systems ## Changes ### Fix 5: Emit MirrorSet event in constructor - Added MirrorSet event emission when SwitchableBeacon initializes in Mirror mode - Tests verify constructor emits event correctly for both modes ### Fix 2: Implement two-step ownership (Ownable2Step) - SwitchableBeacon: Added pendingOwner state, OwnershipTransferStarted event, acceptOwnership() - Executor: Added acceptBeaconOwnership() helper for deployment flow - GovernanceFactory: Added execBeacon to GovernanceResult, initiates transfer - OrgDeployer: Accepts executor beacon ownership after deployment - Comprehensive test coverage for all two-step scenarios ### Fix 1: Transfer eligibility/toggle beacon ownership to Executor - GovernanceFactory: Pass result.executor as beaconOwner to _deployEligibilityModule and _deployToggleModule - Eligibility/toggle beacons now owned by executor from creation (no transfer needed) - Added 3 tests verifying all module beacons owned by executor after deployment ### Fix 3: Remove setAutoUpgrade from OrgRegistry - Removed setAutoUpgrade() function and AutoUpgradeSet event - autoUpgrade now immutable (set at deployment, read-only thereafter) ### Earlier improvements (from prior context) - TaskManager: Added rejectTask(), TaskApplicationSubmitted, TaskApplicationApproved events - EligibilityModule: Added applyForRole(), withdrawApplication() with application system - Comprehensive tests for task rejection and role application flows All 627 tests pass. Code formatted with forge fmt. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implemented four critical SwitchableBeacon fixes from the upgradeability analysis, plus added task rejection and role application systems from earlier work.
Key Changes
Fix 5: Emit
MirrorSetevent in constructor when initializing in Mirror mode.Fix 2: Implement two-step ownership (Ownable2Step) pattern. SwitchableBeacon
transferOwnership()now setspendingOwneronly;acceptOwnership()completes the transfer. Executor providesacceptBeaconOwnership()helper for deployment flow.Fix 1: Transfer eligibility/toggle module beacon ownership directly to Executor (no transfer needed since created after executor exists). Only executor beacon requires two-step transfer.
Fix 3: Remove
setAutoUpgrade()function andAutoUpgradeSetevent from OrgRegistry. TheautoUpgradeflag is now immutable (set at deployment, read-only thereafter).Test Coverage
Related Issues
Subgraph event tracking issues created: