-
Notifications
You must be signed in to change notification settings - Fork 19
✨ Feat/gov uniqueness #776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis PR introduces module installation uniqueness enforcement for the AXONE_GOV_ID module within Abstract accounts. A pre-check during instantiation prevents duplicate installations by detecting existing module registrations and returning a domain-specific error. Supporting changes include a new error variant, comprehensive integration tests, and minor refactoring in prolog utilities. Changes
Sequence Diagram(s)sequenceDiagram
participant Test
participant InstantiateHandler as Instantiate Handler
participant ModuleRegistry as Module Registry (Deps)
participant AxoneGov as AxoneGov Instance
Test->>InstantiateHandler: call instantiate(env, module)
InstantiateHandler->>ModuleRegistry: query existing AXONE_GOV_ID<br/>for account
alt Module Already Installed
ModuleRegistry-->>InstantiateHandler: existing address found
InstantiateHandler-->>Test: error: ModuleAlreadyInstalled
else First Installation
ModuleRegistry-->>InstantiateHandler: no existing module
InstantiateHandler->>AxoneGov: proceed with initialization<br/>(constitution setup, save state)
AxoneGov-->>InstantiateHandler: instantiate response<br/>(revision, hash)
InstantiateHandler-->>Test: success response
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
size-limit report 📦
|
28640ca to
49ccdad
Compare
Governance attached to an Abstract Account is unique by nature. An account must not host multiple
axone-govinstances because that would create ambiguity about which constitution and which decision space is authoritative.Truns out that Abstract already enforces a single module address per module id. This PR makes that constraint explicit in
axone-govto fail early with a domain specific error and to protect against non standard deployment flows or misconfiguration.Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.