Skip to content

feat(zksync): add LayerSwapFacet zkSync deploy + update scripts#2067

Draft
gvladika wants to merge 3 commits into
mainfrom
feat/exsc-645-layerswap-zksync-deploy
Draft

feat(zksync): add LayerSwapFacet zkSync deploy + update scripts#2067
gvladika wants to merge 3 commits into
mainfrom
feat/exsc-645-layerswap-zksync-deploy

Conversation

@gvladika

@gvladika gvladika commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Which Linear task belongs to this PR?

Fixes EXSC-645

Why did I implement it this way?

Follow-up from the 38x LayerSwapFacet v1.0.0 rollout: abstract, sophon, and zksync (zkSync-family) were excluded from the main batch because the deployment must be compiled with zksolc, which requires zkSync-specific scripts. This adds both script/deploy/zksync/DeployLayerSwapFacet.zksync.s.sol and script/deploy/zksync/UpdateLayerSwapFacet.zksync.s.sol, mirroring their counterparts under script/deploy/facets/ exactly — the only difference is that the ./utils/…ScriptBase.sol imports resolve to the zkSync-specific bases under script/deploy/zksync/, which is the established convention (the same file pairs are byte-identical for e.g. GlacisFacet). Both scripts are required for a zkEVM rollout: deploySingleContract.sh selects Deploy*.zksync.s.sol for the CREATE3 deploy, and diamondUpdateFacet.sh hard-requires script/deploy/zksync/Update*.zksync.s.sol to build the diamondCut (it aborts if the zkSync update script is missing rather than falling back to the non-zkSync one). config/layerswap.json already contains abstract/sophon/zksync layerSwapDepository entries, so no config change was needed. Verified both scripts compile under the pinned zksolc toolchain via FOUNDRY_PROFILE=zksync forge build --zksync.

Production deployment (LayerSwapFacet v1.0.0)

Chain Contract address Safe nonce
abstract 0xb59C89A4c9a8B8ff643f7b4e20c7df09CF25E042 30
zksync 0xb59C89A4c9a8B8ff643f7b4e20c7df09CF25E042 36

Each chain has one timelock-wrapped diamondCut Safe proposal carrying the deployer's signature; the production <chain>.diamond.json registries update only when the cuts execute. sophon is not included — its node rejects the deploy with contract deployer address … is not in the allow list (Sophon gates contract deployment behind a deployer allow-list our deployer isn't on). That's an external, Sophon-side blocker tracked as follow-up; the scripts in this PR are ready to deploy it once the deployer is allowlisted.

Checklist before requesting a review

Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)

  • I have checked that any arbitrary calls to external contracts are validated and or restricted
  • I have checked that any privileged calls (i.e. storage modifications) are validated and or restricted
  • I have ensured that any new contracts have had AT A MINIMUM 1 preliminary audit conducted on by <company/auditor>

@lifi-action-bot lifi-action-bot marked this pull request as draft July 16, 2026 07:29
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@gvladika, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cead25f4-4987-4ae4-bf6e-a5ee12c0d31f

📥 Commits

Reviewing files that changed from the base of the PR and between 8537ad9 and 2bb108f.

📒 Files selected for processing (3)
  • deployments/abstract.json
  • deployments/zksync.json
  • script/deploy/zksync/UpdateLayerSwapFacet.zksync.s.sol

Walkthrough

Adds a zkSync deployment script for LayerSwapFacet. The script reads deployment addresses from configuration files, selects the staging or production backend signer, encodes constructor arguments, and deploys the facet.

Changes

LayerSwapFacet deployment

Layer / File(s) Summary
Constructor argument configuration
script/deploy/zksync/DeployLayerSwapFacet.zksync.s.sol
Reads the LayerSwap depository and environment-specific backend signer, then ABI-encodes both constructor arguments.
LayerSwapFacet deployment execution
script/deploy/zksync/DeployLayerSwapFacet.zksync.s.sol
Adds DeployScript, targets LayerSwapFacet, and deploys it using the generated constructor arguments.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the main change by describing the new zkSync LayerSwapFacet deploy script, though it slightly overstates the scope with update scripts.
Description check ✅ Passed The description covers the required template sections and includes task, rationale, and review checklist details.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/exsc-645-layerswap-zksync-deploy

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gvladika gvladika changed the title feat(zksync): add DeployLayerSwapFacet.zksync.s.sol for zkSync-family chains feat(zksync): add LayerSwapFacet zkSync deploy + update scripts Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants