You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: make Contract generic for Compiler and add metadata to CompilerOutput (#224)
Right now the compiler abstraction has two couplings that force
foundry-zksync to implement it's [own fork of
compilers](https://github.com/Moonsong-Labs/compilers/tree/zksync-v0.11.6):
1. `Contract` is specific to `solc`/EVM contracts. Era VM contracts,
while requiring different fields, still could use most of the
functionality of the `compilers` pipeline.
2. `CompilerOutput` has `solc` specific fields. `zksolc` compilation has
relevant information that is useful to have later on, for example when
storing `BuildInfo`
This PR implements changes to address this. If implemented, it would
allow `foundry-zksync` (and potentially other non EVM implementations of
foundry) to get rid of all overrides and only maintain ZKsync specific
data structures/trait implementations. See [sample
PR](Moonsong-Labs/compilers#42). Changes
include:
1. Make `Compiler` generic over `Contract` (using `CompilerContract` as
a trait type).
2. Add `metadata` field to `CompilerOutput` in order to add arbitrary
data to compilation output.
---------
Co-authored-by: Nisheeth Barthwal <[email protected]>
Co-authored-by: Arsenii Kulikov <[email protected]>
0 commit comments