foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.31k stars 1.76k forks source link

zksync2 support #919

Closed dcposch closed 7 months ago

dcposch commented 2 years ago

Component

Forge

Describe the feature you would like

Support compiling for and deploying to zksync2.

Additional context

Zksync2 is, as far as I can tell, the first (mostly) EVM-compatible ZK rollup. They recently launched a public testnet.

Currently, their deployment pipeline only works with Hardhat. Details: https://v2-docs.zksync.io/dev/guide/hello-world.html#initializing-the-project-deploying-smart-contract

Obviously, I'd prefer to use Forge. I'm not sure what it would take. It looks like we'd have to support using a custom solc. Just opening this as a stub issue to track potential future zksync support.

mds1 commented 2 years ago

In addition to supporting a different compiler, we also need to account for differences in EVM semantics so tests behave as expected. There's an open issue to discuss the best approach for that here: https://github.com/gakonst/foundry/issues/748

onbjerg commented 2 years ago

I think we need a classification or something for "tiers" of languages/VMs once we start supporting more of them, since we probably can't ship all Foundry features to all languages/backends and it is definitely going to be an iterative process.

The tier should indicate how well-supported the VM or language is. Perhaps a feature table would be nice too to indicate what Foundry features are supported for which languages/VMs. Bare minimum would be build/test (just unit tests, no traces)/deploy

daweth commented 1 year ago

How's this going? Has zkSync era support been added yet? @onbjerg

Evalir commented 1 year ago

@daweth zksync has their own foundry fork: https://github.com/matter-labs/foundry-zksync

mattsse commented 7 months ago

closing as dup of #7624