Skip to content
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

feat: zksync support #4725

Open
wants to merge 234 commits into
base: main
Choose a base branch
from

Conversation

mshojaei-txfusion
Copy link
Collaborator

Description

This PR introduces a series of changes aimed at enhancing zkSync support within the codebase. Key updates include the addition of the zksolc compiler for zkSync, integration of contract artifacts, CLI automation for core deployment, and compatibility adjustments in tests for the zkSync environment. It also includes improvements in contract verification on zkSync explorer and handling gas limits for zkSync deployments.

Drive-by changes

  • Added support for the zksolc compiler.
  • Decoupled Hardhat configuration for EVM from zkSync.
  • Enabled the export of zkSync-related contract artifacts.
  • Verified compatibility of different deployment components based on the chain’s technical stack.
  • Integrated zkSync provider and signer.
  • Added support for contract verification on the zkSync explorer.
  • Blacklisted static contracts from deployment on zkSync, as they are not supported.

Related issues

No related issue

Backward compatibility

Yes

Testing

Manual testing and some automated tests were performed, including end-to-end tests on zkSync for warp read and apply functionalities.

ljankovic-txfusion and others added 30 commits September 12, 2024 12:23
ltyu and others added 24 commits January 7, 2025 11:05
refactor: consolidate ISM compatibility logic and static deployment c…
@ltyu ltyu dismissed jmrossy’s stale review January 17, 2025 16:26

It seems like most issues were resolved and/or outdated

.changeset/wicked-cherries-pump.md Outdated Show resolved Hide resolved

import { Annotated, ProtocolType } from '@hyperlane-xyz/utils';

export enum ProviderType {
ZkSync = 'zksync',
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not a big deal but would you agree that when adding an entry to an enum with several entries already, it makes sense to add it at the end? Especially when it starts with 'Z'. I wonder why so many developer tend to shove new things at the top as though they're more important than the existing parts.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmmm interesting thought In my experience, new code is more visible when you put it at the top, especially when its code you write yourself, has nothing to do with importance. Will address this

Copy link
Collaborator

Choose a reason for hiding this comment

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

Resolved. All zksync references on this file are not below the existing ones

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that new code is more visible when it's at the top, but why do you feel that new code needs to me more visible than the existing code?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just being devil's advocate. I agree, It doesn't belong at the top, have no good explanation why this particular file is ordered the way it was, other files are fine. @mshojaei-txfusion lets make a note of this

typescript/sdk/src/index.ts Outdated Show resolved Hide resolved
Comment on lines +15 to +20
networks: {
zkSyncNetwork: {
url: 'http://127.0.0.1:8011',
ethNetwork: '',
zksync: true,
},
Copy link
Contributor

@xeno097 xeno097 Jan 17, 2025

Choose a reason for hiding this comment

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

Is this needed for building the zk-sync artifacts or can it be removed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would keep it there, removing the zksync network reference has been know to cause issues for some reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

9 participants