feat: Safe infrastructure and CrossChainRelay deployment#64
feat: Safe infrastructure and CrossChainRelay deployment#64smartprogrammer93 merged 4 commits intoshasta-pocfrom
Conversation
- Add deploy-safe-infra.sh: deploys SafeL2, SafeProxyFactory, MultiSend, MultiSendCallOnly, FallbackHandler on BOTH L1 and L2 with matched nonces - Add deploy-cross-chain-relay.sh: deploys CrossChainRelay on L2 - Add docker-compose profiles: safe-deployer, relay-deployer - Update deploy-surge-full.sh: call Safe and relay deployments after UserOpsSubmitter (backwards compatible — both exist) - Update .env.devnet: add SAFE_DEPLOYER_PRIVATE_KEY and VITE_SAFE_* vars Requires SAFE_DEPLOYER_PRIVATE_KEY to be a fresh EOA with nonce 0 on both chains for identical contract addresses. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Safe v1.4.1 contracts are already deployed at canonical addresses on both Gnosis L1 and Surge L2 (in genesis). No custom deployment needed. Removed: - deployer/deploy-safe-infra.sh - Docker compose safe-deployer profile - deploy_safe_contracts() function - SAFE_DEPLOYER_PRIVATE_KEY env var Kept: - CrossChainRelay deployer (still needed on L2) - Canonical Safe addresses in .env.devnet Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude review |
|
Claude finished @smartprogrammer93's task in 1m 33s —— View job Code Review
Overall this is a clean, well-structured addition that follows the existing deployer pattern. A few issues worth fixing:
|
| Severity | Issue |
|---|---|
| Minor | LOG_LEVEL unset but referenced in forge call |
| Minor | FOUNDRY_PROFILE hardcoded in script vs. docker-compose env |
| Minor | Missing --mode debug hint in deploy_relay_contract error path |
| Nit | VERIFY_ARG injected redundantly (inherited pattern) |
| Nit | No depends_on for L2 node (inherited pattern) |
| Nit | VITE_L2_RELAY= could use a clarifying comment |
No blocking issues. The core logic is sound and consistent with the existing deployment pattern.
- Remove undefined LOG_LEVEL from forge script call - Move FOUNDRY_PROFILE to docker-compose env (matching other deployers) - Remove redundant VERIFY_ARG from docker-compose env - Add missing --mode debug hint in deploy_relay_contract error path - Add clarifying comment for blank VITE_L2_RELAY Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude review |
|
Claude finished @smartprogrammer93's task in 1m 51s —— View job Code Review
Overall this is a clean addition that follows the existing deployer pattern well. The latest commit (
|
| Severity | Issue |
|---|---|
| Moderate | No deployment artifact copy — VITE_L2_RELAY has no automated path to being populated |
| Minor | FORK_URL hardcoded in docker-compose instead of env var reference |
| Nit | --evm-version paris unexplained (no comment) |
| Nit | No depends_on for L2 node (inherited pattern) |
The moderate issue only matters if something downstream actually reads VITE_L2_RELAY. If the address is being set manually post-deploy, the current state is fine — but worth confirming.
- Copy relay.json deployment artifact to /deployment/deployment_relay.json
- Replace hardcoded L2 URL with ${L2_ENDPOINT_HTTP} env var
- Add comment explaining --evm-version paris requirement
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude review |
|
Claude finished @smartprogrammer93's task in 1m 45s —— View job Code Review
All issues raised in the previous two reviews have been resolved in the latest commits. This is a clean, ready-to-merge addition. One new item worth confirming before merge:
|
| Issue | Status |
|---|---|
LOG_LEVEL unset in forge call |
✅ Not present in relay script (userops submitter still has it — pre-existing) |
FOUNDRY_PROFILE hardcoded in script |
✅ Moved to docker-compose environment block |
| Missing silence-mode debug hint | ✅ Added at line 1590–1592 |
| No deployment artifact copy | ✅ cp ./deployments/relay.json /deployment/deployment_relay.json added |
FORK_URL hardcoded |
✅ Now uses ${L2_ENDPOINT_HTTP} |
--evm-version paris unexplained |
✅ Comment added explaining PUSH0/MCOPY absence on L2 |
VITE_L2_RELAY= needs clarifying comment |
✅ Comment added |
Summary
| Severity | Issue |
|---|---|
| Minor | Artifact path ./deployments/relay.json — verify it matches forge output before merging |
| Nit | $PRIVATE_KEY unquoted (inherited pattern) |
| Nit | temp_output not cleaned up on success (inherited pattern) |
No blocking issues. The core logic is sound and all prior feedback has been addressed.
Summary
Adds CrossChainRelay deployment to the Surge deployment pipeline. Safe v1.4.1 contracts use canonical addresses already in L2 genesis — no custom deployment needed.
Changes
Safe v1.4.1 (canonical — no deployment needed)
Already present on both Gnosis L1 and Surge L2 genesis at standard addresses:
Related PRs
🤖 Generated with Claude Code