Skip to content

feat: Splitting GatewayCTMDeployer#1964

Merged
StanislavBreadless merged 46 commits intodraft-v31from
sb/split-gw-ctm-deployer
Jan 26, 2026
Merged

feat: Splitting GatewayCTMDeployer#1964
StanislavBreadless merged 46 commits intodraft-v31from
sb/split-gw-ctm-deployer

Conversation

@StanislavBreadless
Copy link
Collaborator

What ❔

We'll have to reuse the same deployer on EVM chains, so it has to be split into multiple contracts to ensure that it fits into EVM limits.

Note, that for deployments on GW, it will rely on the presence of a deterministic CREATE2 factory.

I have NOT yet deeply reviewed it, so comments may contains occasional errors, this PR is to demonstrate what the feature will look like overall.

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

@StanislavBreadless StanislavBreadless marked this pull request as ready for review January 20, 2026 10:12
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a21e7b462

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

/// @notice Address of the ChainTypeManager implementation contract.
address chainTypeManagerImplementation;
/// @notice Address of the Verifier contract.
address verifier;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use the verifiers struct here please

@github-actions
Copy link
Contributor

Coverage after merging sb/split-gw-ctm-deployer into draft-v31 will be

91.43%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
contracts/bridge
   BridgeHelper.sol100%100%100%100%
   BridgedStandardERC20.sol96.25%100%92.31%97.01%231–232
   L1ERC20Bridge.sol97.78%100%100%97.30%261
   L1Nullifier.sol95.98%100%100%95.24%432–433, 436, 462, 710, 713, 715, 731
   UpgradeableBeaconDeployer.sol100%100%100%100%
contracts/bridge/asset-router
   AssetRouterBase.sol98.53%100%100%98.21%128
   L1AssetRouter.sol91.62%100%86.67%92.70%104, 319, 330, 412–413, 432, 590, 601, 615, 620
contracts/bridge/asset-tracker
   AssetTrackerBase.sol93.55%100%88.89%95.45%84
   GWAssetTracker.sol89.85%100%94.29%89.18%101–103, 116–117, 246–248, 264, 354, 395, 397–403, 410–411, 630–631, 97–99
   L1AssetTracker.sol97.92%100%100%97.56%227, 410, 61
   LegacySharedBridgeAddresses.sol83.33%100%100%81.82%39, 41
contracts/bridge/interfaces
   AssetHandlerModifiers.sol75%100%100%66.67%13
contracts/bridge/ntv
   L1NativeTokenVault.sol98.13%100%100%97.65%182, 184
   NativeTokenVaultBase.sol98.95%100%100%98.74%139, 144
contracts/common
   MessageVerification.sol88.24%100%87.50%88.46%34, 41–42
   ReentrancyGuard.sol100%100%100%100%
contracts/common/l2-helpers
   L2ContractHelper.sol98.11%100%100%97.78%108
   SystemContractsCaller.sol52.50%100%60%51.43%44–45, 47, 49, 51, 53, 66, 69, 72, 75, 78, 83, 89, 91, 93, 96, 98
contracts/common/libraries
   DataEncoding.sol95.54%100%95.65%95.51%183, 270, 288, 294
   DynamicIncrementalMerkle.sol100%100%100%100%
   DynamicIncrementalMerkleMemory.sol98.96%100%100%98.84%196
   FullMerkle.sol100%100%100%100%
   FullMerkleMemory.sol93.81%100%100%93.33%114, 131, 149, 163, 194, 90
   Merkle.sol100%100%100%100%
   MessageHashing.sol98.67%100%100%98.46%154
   SemVer.sol100%100%100%100%
   UncheckedMath.sol100%100%100%100%
   UnsafeBytes.sol100%100%100%100%
   ZKSyncOSBytecodeInfo.sol100%100%100%100%
contracts/common/libraries/TransientPrimitives
   TransientPrimitives.sol100%100%100%100%
contracts/core/bridgehub
   BridgehubBase.sol96.83%100%100%96.18%134, 283, 299, 552, 556, 559
   L1Bridgehub.sol90%100%91.67%89.77%207, 282, 286–287, 290, 300, 66–67, 90
   L2Bridgehub.sol66.67%100%60%68.57%103–104, 112, 114–115, 124, 129–130, 132–133, 76
contracts/core/chain-asset-handler
   ChainAssetHandlerBase.sol86.75%100%100%84.51%129–130, 180, 183, 195–196, 250, 267, 89, 96–97
   L1ChainAssetHandler.sol92.68%100%88.89%93.75%68–69
   L2ChainAssetHandler.sol88.24%100%87.50%88.46%121, 70, 94
contracts/core/chain-registration
   ChainRegistrationSender.sol88.24%100%100%85.19%41, 85, 89, 95
contracts/core/ctm-deployment
   CTMDeploymentTracker.sol100%100%100%100%
contracts/core/message-root
   L1MessageRoot.sol88.37%100%87.50%88.57%108–109, 65–66
   L2MessageRoot.sol60%100%44.44%64.52%39–40, 45–46, 50, 57, 62–63, 68–70
   MessageRootBase.sol86.92%100%88.89%86.52%113, 117, 123–125, 131–133, 196, 212, 285, 314
contracts/governance
   AccessControlRestriction.sol100%100%100%100%
   ChainAdmin.sol97.87%100%100%97.30%39
   ChainAdminOwnable.sol100%100%100%100%
   Governance.sol100%100%100%100%
   L2ProxyAdminDeployer.sol100%100%100%100%
   PermanentRestriction.sol100%100%100%100%
   ServerNotifier.sol100%100%100%100%
   TransitionaryOwner.sol100%100%100%100%
contracts/governance/restriction
   Restriction.sol100%100%100%100%
   RestrictionValidator.sol100%100%100%100%
contracts/interop
   AttributesDecoder.sol100%100%100%100%
   InteropCenter.sol93.90%100%89.47%94.48%114, 428, 502, 54–55, 59–60, 72
   InteropDataEncoding.sol100%100%100%100%
   InteropHandler.sol91.53%100%83.33%92.45%33–35, 381, 403, 408, 41–42
   L2MessageVerification.sol100%100%100%100%
contracts/l2-system/zksync-os
   L1MessageGasLib.sol100%100%100%100%
   L1Messenger.sol94.12%100%100%92.86%29
   SystemContext.sol100%100%100%100%
   ZKOSContractDeployer.sol0%100%0%0%12–14, 20, 26, 30–31
contracts/l2-upgrades
   L2ComplexUpgrader.sol0%100%0%0%23–25, 39, 44, 46, 56, 62–63, 70, 79–81, 84, 86–87
   L2GenesisForceDeploymentsHelper.sol93.92%100%100%93.33%117, 148, 150, 154, 156–157, 187, 193, 402
   L2GenesisUpgrade.sol0%100%0%0%30, 37, 39–40, 43, 47–50, 53, 55, 63
   L2V30TestnetSystemProxiesUpgrade.sol0%100%0%0%22, 27–28, 30, 41, 47, 52, 56, 61, 66, 71, 76, 81, 86, 93, 99
   L2V31Upgrade.sol0%100%0%0%17
   SystemContractProxy.sol87.50%100%66.67%90.48%16–17
   SystemContractProxyAdmin.sol60%100%66.67%57.14%12, 18–19
contracts/state-transition
   AccessControlEnumerablePerChainAddressUpgradeable.sol98.25%100%100%97.83%179
   ChainTypeManagerBase.sol97.97%100%100%97.45%442, 505, 543, 619
   EraChainTypeManager.sol89.47%100%100%87.50%31, 51
   MultisigCommitter.sol93.40%100%95%93.02%149, 171, 224, 249, 62–63
   ValidatorTimelock.sol94.95%100%90%96.20%128, 171, 291
   ZKsyncOSChainTypeManager.sol100%100%100%100%
contracts/state-transition/chain-deps
   DiamondInit.sol93.88%100%100%93.62%59, 63, 67
   DiamondProxy.sol100%100%100%100%
contracts/state-transition/chain-deps/facets
   Admin.sol99.24%100%100%99.14%476, 481
   Executor.sol88.21%100%100%87.04%1001, 1028, 137, 169–170, 179, 240, 267, 274–276, 303, 377, 388, 458, 537, 560, 567, 635, 638–639, 643–644, 696, 714, 735–737, 740, 742, 744–745, 747–748, 750, 789, 795–796, 806–808, 816, 874–875, 907, 912
   Getters.sol100%100%100%100%
   Mailbox.sol83.49%100%86.67%82.98%118, 125–126, 128–129, 156, 163–164, 166–167, 215, 222–223, 225–226, 278,

@StanislavBreadless StanislavBreadless merged commit b9f26d2 into draft-v31 Jan 26, 2026
24 of 26 checks passed
@StanislavBreadless StanislavBreadless deleted the sb/split-gw-ctm-deployer branch January 26, 2026 09:53
StanislavBreadless added a commit that referenced this pull request Jan 26, 2026
#1974)

# What ❔

ports draft-v31 changes + the ones inside
#1964

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jcsec-security pushed a commit that referenced this pull request Jan 28, 2026
We'll have to reuse the same deployer on EVM chains, so it has to be
split into multiple contracts to ensure that it fits into EVM limits.

Note, that for deployments on GW, it will rely on the presence of a
deterministic CREATE2 factory.

I have NOT yet deeply reviewed it, so comments may contains occasional
errors, this PR is to demonstrate what the feature will look like
overall.

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jcsec-security pushed a commit that referenced this pull request Jan 28, 2026
We'll have to reuse the same deployer on EVM chains, so it has to be
split into multiple contracts to ensure that it fits into EVM limits.

Note, that for deployments on GW, it will rely on the presence of a
deterministic CREATE2 factory.

I have NOT yet deeply reviewed it, so comments may contains occasional
errors, this PR is to demonstrate what the feature will look like
overall.

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jcsec-security pushed a commit that referenced this pull request Jan 28, 2026
We'll have to reuse the same deployer on EVM chains, so it has to be
split into multiple contracts to ensure that it fits into EVM limits.

Note, that for deployments on GW, it will rely on the presence of a
deterministic CREATE2 factory.

I have NOT yet deeply reviewed it, so comments may contains occasional
errors, this PR is to demonstrate what the feature will look like
overall.

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants