feat(deploy): proposeContractToNetworks for deferred Safe cuts (EXSC-725) - #2158
feat(deploy): proposeContractToNetworks for deferred Safe cuts (EXSC-725)#21580xDEnYO wants to merge 2 commits into
Conversation
…XSC-725) Provide a cut-only / re-propose path when bytecode is already logged, plus multisig-rollout --propose-only, so deferred deployments and recreate-after-delete no longer need one-off scripts. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughPropose-only registration is added for already-deployed contracts, with per-network proposal outcomes, environment-specific routing, duplicate skipping, optional whitelist synchronization, and updated rollout and deployment documentation. ChangesPropose-only registration workflow
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
script/tasks/proposeContractToNetworks.sh (1)
1-13: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueAlign this strict-mode opt-out with the
**/*.shrule.
script/tasks/proposeContractToNetworks.shis the only task script documenting that strict mode is intentionally omitted;script/deploy/deployContractToNetworks.shdoes the same only because it’s part of the deploy framework. Remove this non-compliance from the task script or add the framework exclusion to the bash rule so the strict-mode requirement remains consistent.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@script/tasks/proposeContractToNetworks.sh` around lines 1 - 13, Align proposeContractToNetworks.sh with the repository’s strict-mode policy: either add the required strict-mode setup and preserve its behavior, or update the shared *.sh rule to explicitly exclude deploy framework scripts including this task only if that exception is intended. Keep the policy consistent with deployContractToNetworks.sh and remove the task script’s standalone opt-out documentation.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@script/tasks/proposeContractToNetworks.sh`:
- Around line 52-78: Update isAddressRegisteredOnDiamond to reuse
getPeripheryAddressFromDiamond for the periphery lookup, passing NETWORK,
DIAMOND_ADDRESS, and CONTRACT_NAME, and compare its normalized result with
LOG_ADDRESS. Also check the existing helper scripts for a facet-membership
helper and reuse it in the isFacetContractName branch if available, preserving
the current registration result and error behavior.
- Around line 297-300: Scope the SEND_PROPOSALS_DIRECTLY_TO_DIAMOND hard-abort
in the propose-only guard to production only by including TARGET_ENVIRONMENT in
the condition. Preserve the existing error and exit behavior for production,
while allowing staging runs—including bootstrap scenarios—to continue without
aborting.
- Around line 81-179: The proposeToNetworkWorker flow currently detects Safe
no-op outcomes by grepping free-form output, allowing helper behavior to drift
and be recorded as OK. Update diamondUpdateFacet and diamondUpdatePeriphery
no-op handling to return or emit a stable reserved signal, then consume that
signal in proposeToNetworkWorker instead of matching “Proposal already exists”
or “FacetCut is empty” text; preserve recording these cases as SKIP with their
existing reasons while treating genuine failures as FAIL.
---
Nitpick comments:
In `@script/tasks/proposeContractToNetworks.sh`:
- Around line 1-13: Align proposeContractToNetworks.sh with the repository’s
strict-mode policy: either add the required strict-mode setup and preserve its
behavior, or update the shared *.sh rule to explicitly exclude deploy framework
scripts including this task only if that exception is intended. Keep the policy
consistent with deployContractToNetworks.sh and remove the task script’s
standalone opt-out documentation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 03b685a9-3905-439a-afc9-6072df487342
📒 Files selected for processing (5)
.agents/README.md.agents/commands/multisig-rollout.mddocs/Deploy.mddocs/superpowers/specs/2026-07-30-propose-contract-to-networks-design.mdscript/tasks/proposeContractToNetworks.sh
…SC-725) - scope the SEND_PROPOSALS_DIRECTLY_TO_DIAMOND abort to production, per the design doc — staging never routes through the Safe and the flag is a legitimate staging bootstrap setting - reuse getPeripheryAddressFromDiamond for the periphery registration check instead of re-implementing the lookup via universalCast - --all-where-deployed: skip Tron networks with a warning instead of aborting the whole run (25 shared contracts live in deployments/tron.json; explicit Tron arguments still hard-error), and fail cleanly when no eligible networks remain - document the production-Safe vs staging-direct behavior in the usage text Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Which Linear task belongs to this PR?
Fixes EXSC-725
Why did I implement it this way?
Deferred diamond cuts (e.g. MayanFacet v2.0.0) and recreate-after-delete needed a first-class path: deploy already has
deployContractToNetworks.sh, whitelist hassyncWhitelistToNetworks.sh, but cut-only was a one-off. AddedproposeContractToNetworks.shas a thin wrapper over existingdiamondUpdateFacet/diamondUpdatePeriphery(+ allowlist sync for diamond-called periphery), with OK/SKIP/FAIL outcomes and MongointentHashduplicate skipping. Wiredmultisig-rollout --propose-onlyso the signing/Slack tail stays the same.Checklist before requesting a review
bash -n+--help/ missing-args smoke)Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)