Skip to content

feat(operations-gen): add zkSync bytecode support [CLD-2780]#1049

Merged
graham-chainlink merged 2 commits into
mainfrom
ggoh/CLD-2780/add-zksync-bytecode-to-operations-gen
Jun 16, 2026
Merged

feat(operations-gen): add zkSync bytecode support [CLD-2780]#1049
graham-chainlink merged 2 commits into
mainfrom
ggoh/CLD-2780/add-zksync-bytecode-to-operations-gen

Conversation

@graham-chainlink

@graham-chainlink graham-chainlink commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

In order to use operations-gen cli to generate the deploy operations for MCMS contracts , we need to support zksync.

Adds zkSync VM deploy bytecode support to operations-gen so generated EVM Deploy operations can include both EVM and zkSync bytecode.

Config:

version: "1.0.0"
chain_family: evm

input:
  gobindings_package: "github.com/smartcontractkit/chainlink-deployments-framework/tools/operations-gen/testdata/evm/gobindings"
  zksync_bindings_package: "github.com/smartcontractkit/chainlink-deployments-framework/tools/operations-gen/testdata/evm/zksync_bindings"

output:
  base_path: "."

contracts:
  - contract_name: LinkToken
    version: "1.0.0"
    zksync_bytecode: LinkTokenZkBytecode
    functions:
      - name: transfer
        access: public
      - name: balanceOf
        access: public
      - name: approve
        access: public

Closes CLD-2780.

@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9348b7f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
operations-gen Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-2780/add-zksync-bytecode-to-operations-gen branch from 9e739f1 to 90625f2 Compare June 16, 2026 06:36
@graham-chainlink graham-chainlink requested a review from Copilot June 16, 2026 06:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends tools/operations-gen to support zkSync VM deploy bytecode alongside standard EVM bytecode, so generated Deploy operations can deploy correctly on zkSync VM chains.

Changes:

  • Adds zksync_bytecode (per-contract) and input.zksync_bindings_package (default package) to the EVM config schema and documents them.
  • Updates the EVM codegen pipeline + template to optionally emit Bytecode{ZkSyncVM: ...} and import zkSync bytecode symbols from either gobindings or a dedicated package.
  • Adds unit + golden tests and test fixtures covering package resolution and generated output.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/operations-gen/testdata/evm/zksync_bindings/bytecode.go Adds zkSync bytecode fixture symbol for tests
tools/operations-gen/testdata/evm/operations_gen_mcms_config.yaml Extends MCMS config fixture with zkSync bindings package + bytecode symbol
tools/operations-gen/testdata/evm/operations_gen_link_token_zksync_config.yaml Adds a new fixture config for zkSync bytecode generation
tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go Updates golden output to include ZkSyncVM bytecode + import
tools/operations-gen/testdata/evm/link_token_zksync.golden.go Adds golden output for LinkToken with zkSync bytecode
tools/operations-gen/testdata/evm/gobindings/v1_0_0/link_token/link_token.go Adds zkSync bytecode fixture symbol inside gobindings testdata
tools/operations-gen/README.md Documents new config fields and constraint with omit_deploy
tools/operations-gen/internal/families/evm/zksync_bytecode.go Implements YAML parsing + package/symbol resolution for zkSync bytecode
tools/operations-gen/internal/families/evm/zksync_bytecode_test.go Adds unit tests for YAML parsing, resolution, and omit_deploy rejection
tools/operations-gen/internal/families/evm/evm_test.go Adds integration test for resolving relative zksync_bindings_package
tools/operations-gen/internal/families/evm/evm_golden_test.go Adds golden test for LinkToken zkSync bytecode generation
tools/operations-gen/internal/families/evm/contract.go Threads resolved zkSync bytecode (package+symbol) into contract IR
tools/operations-gen/internal/families/evm/config.go Adds new YAML config fields for zkSync bytecode
tools/operations-gen/internal/families/evm/codegen.go Extends template data with zkSync bytecode fields and import logic
tools/operations-gen/generate/templates/evm/operations.tmpl Emits optional zkSync bytecode import and ZkSyncVM: field
.changeset/clear-beans-deny.md Declares a minor version bump for operations-gen feature
Files not reviewed (2)
  • tools/operations-gen/testdata/evm/link_token_zksync.golden.go: Generated file
  • tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/operations-gen/internal/families/evm/zksync_bytecode.go Outdated
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-2780/add-zksync-bytecode-to-operations-gen branch 2 times, most recently from 75ed314 to 369e649 Compare June 16, 2026 06:49
@graham-chainlink graham-chainlink marked this pull request as ready for review June 16, 2026 06:52
@graham-chainlink graham-chainlink requested a review from a team as a code owner June 16, 2026 06:52
Copilot AI review requested due to automatic review settings June 16, 2026 06:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 16 changed files in this pull request and generated 3 comments.

Files not reviewed (2)
  • tools/operations-gen/testdata/evm/link_token_zksync.golden.go: Generated file
  • tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go: Generated file

Comment thread tools/operations-gen/internal/families/evm/zksync_bytecode.go Outdated
Comment thread tools/operations-gen/internal/families/evm/zksync_bytecode.go Outdated
Comment thread .changeset/clear-beans-deny.md Outdated
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-2780/add-zksync-bytecode-to-operations-gen branch from 369e649 to fef2b6c Compare June 16, 2026 06:59
…ation

Enable operations-gen to wire zkSync VM deploy bytecode into generated Deploy
operations via zksync_bytecode and zksync_bindings_package config fields.
Copilot AI review requested due to automatic review settings June 16, 2026 07:04
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-2780/add-zksync-bytecode-to-operations-gen branch from fef2b6c to 42d710a Compare June 16, 2026 07:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 16 changed files in this pull request and generated no new comments.

Files not reviewed (2)
  • tools/operations-gen/testdata/evm/link_token_zksync.golden.go: Generated file
  • tools/operations-gen/testdata/evm/many_chain_multi_sig.golden.go: Generated file

Comment thread tools/operations-gen/internal/families/evm/contract.go Outdated
ajaskolski
ajaskolski previously approved these changes Jun 16, 2026

@ajaskolski ajaskolski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one small comment but overall looks good to me

ecPablo
ecPablo previously approved these changes Jun 16, 2026
@graham-chainlink graham-chainlink added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit 4c5edff Jun 16, 2026
41 of 45 checks passed
@graham-chainlink graham-chainlink deleted the ggoh/CLD-2780/add-zksync-bytecode-to-operations-gen branch June 16, 2026 15:04
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.

4 participants