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 for core solidity package #5290

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

Conversation

ljankovic-txfusion
Copy link
Collaborator

Description

ZKSync PR 1

This PR introduces ZKSync support for Solidity contracts and restructures build files directory structure.

Drive-by changes

  • Added ZKSync compilation support using zksolc via @matterlabs/hardhat-zksync-solc
  • Restructured typechain directory location to core-utils/typechain
  • Decoupled Hardhat configuration for ZKSync from EVM.
  • Updated build process to handle both standard and ZKSync contract artifacts
  • Conditional compilation of ZKSync contracts

Related issues

None

Backward compatibility

Yes

Testing

Testing was previously in feat: zksync support PR

mortezashojaei and others added 30 commits October 16, 2024 15:07
Copy link

changeset-bot bot commented Jan 24, 2025

🦋 Changeset detected

Latest commit: 1f19a12

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

This PR includes changesets to release 9 packages
Name Type
@hyperlane-xyz/core Minor
@hyperlane-xyz/helloworld Patch
@hyperlane-xyz/sdk Patch
@hyperlane-xyz/infra Patch
@hyperlane-xyz/cli Patch
@hyperlane-xyz/widgets Patch
@hyperlane-xyz/ccip-server Patch
@hyperlane-xyz/github-proxy Patch
@hyperlane-xyz/utils Patch

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

Copy link
Collaborator Author

@ljankovic-txfusion ljankovic-txfusion Jan 24, 2025

Choose a reason for hiding this comment

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

Due to zksync conditional building. Since zksync functions are a part of core-utils and zksync classes on sdk expect a value, we need to feed them some default values not to break build process. Same applies for buildArtifact.ts

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This script for generating zksync artifacts only runs in nodejs environment thus 'fs' is used. Exported artifacts have .d.ts and .js extension and are generated directly to dist folder, and have a shape of js object.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.53%. Comparing base (84f886b) to head (1f19a12).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5290   +/-   ##
=======================================
  Coverage   77.53%   77.53%           
=======================================
  Files         103      103           
  Lines        2110     2110           
  Branches      190      190           
=======================================
  Hits         1636     1636           
  Misses        453      453           
  Partials       21       21           
Components Coverage Δ
core 87.80% <ø> (ø)
hooks 79.39% <ø> (ø)
isms 83.68% <ø> (ø)
token 91.27% <ø> (ø)
middlewares 79.80% <ø> (ø)

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

Successfully merging this pull request may close these issues.

3 participants