Skip to content

ZK Sync gobindings #833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
May 19, 2025
Merged

ZK Sync gobindings #833

merged 26 commits into from
May 19, 2025

Conversation

ilanolkies
Copy link
Collaborator

@ilanolkies ilanolkies commented Apr 11, 2025

  • Compile contracts targetting ZK Sync VM
  • Generate go bindings of latest version for ZK Sync deployments using chainlink-evm/gethwrappers/generation/generate/zksync
  • Add "versioned" artifacts using bytecode from g++
  • Copy to latest to v1.6

Implementation: ./scripts/compile_all and go generate ./gobindings now accept the env ZKSYNC=true to pick generation procedure. By doing this we avoid writing new compilation scripts and go_generate.go, or copy/pasting its lines.

Related PRs:

Notes:

  • chains/evm/scripts/install_forge_zksync was "copy/pasted" from chainlink-evm to prevent having it as a dependency
  • Versioned contracts were built from g++ bytecode with some manual changes. The implementation is also in chainlink-zksync repo.

Next steps: if necessary, we can refactor the wrappers into a new repo or import this wrappers from chainlink-evm. It will require some work (setup CI, security, readme, etc.). We can move forward with this and then analyze how to refactor properly once we start using it.

@ilanolkies ilanolkies marked this pull request as ready for review April 24, 2025 20:10
@ilanolkies ilanolkies requested review from a team as code owners April 24, 2025 20:10
@ilanolkies ilanolkies requested a review from makramkd April 28, 2025 21:28
@ilanolkies ilanolkies marked this pull request as draft May 8, 2025 16:58
@ilanolkies
Copy link
Collaborator Author

We need to move code to https://github.com/smartcontractkit/chainlink-deployments-framework + fix merge conflicts

@ilanolkies ilanolkies marked this pull request as ready for review May 16, 2025 16:04
@ilanolkies ilanolkies enabled auto-merge (squash) May 16, 2025 16:32
@ilanolkies ilanolkies requested a review from a team May 16, 2025 16:33
.PHONY: wrappers-zksync
wrappers-zksync: pnpmdep foundry-zksync
ZKSYNC=true ./scripts/compile_all
ZKSYNC=true go generate ./gobindings
Copy link
Collaborator

@RensR RensR May 19, 2025

Choose a reason for hiding this comment

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

can we replace these two lines with ZKSYNC=true make wrappers. Probably also means you don't need pnpmdep as the main wrapper call already has it

@ilanolkies ilanolkies requested review from jhweintraub and RensR May 19, 2025 13:49
RensR
RensR previously approved these changes May 19, 2025
jhweintraub
jhweintraub previously approved these changes May 19, 2025
@ilanolkies ilanolkies dismissed stale reviews from jhweintraub and RensR via b51cb17 May 19, 2025 15:23
Copy link

Metric zksync main
Coverage 72.9% 72.5%

@ilanolkies ilanolkies merged commit d27174a into main May 19, 2025
40 checks passed
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.

6 participants