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.36k stars 1.77k forks source link

Add configuration option for alternate compilers #4418

Open eucliss opened 1 year ago

eucliss commented 1 year ago

Component

Forge, Other (please describe)

Describe the feature you would like

As a smart contract developer who builds in Solidity but requires a compiler that is not solc - its difficult for me to use foundry. It would be greatly beneficial for Foundry to implement alternate compiler configurations for developers using custom ZK compilers for L2s.

An Ideal outcome of this would be having a switch in the config such that you could point the compiler to a local compiler command as opposed to defaulting to solc. This may have downstream affects for loading ABIs and bytecode for testing. An example compiler that would utilize this request would be the zkSync compiler - currently the only option is using hardhat and npm (https://www.npmjs.com/package/@matterlabs/hardhat-zksync-solc).

Additional context

No response

mattsse commented 1 year ago

This largely depends on the compiler's solc compatibility and the output's EVM compatibility.

I was unable to locate the actual zksync compiler binary. Could you help me with that?

so I can't comment on whether this would be possible or not