forked from foundry-rs/compilers
-
Notifications
You must be signed in to change notification settings - Fork 3
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
refactor: remove foundry overrides #42
Draft
elfedy
wants to merge
3
commits into
zksync-v0.11.6
Choose a base branch
from
elfedy-no-overrides
base: zksync-v0.11.6
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hedgar2017
approved these changes
Nov 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Would it now be possible to switch to era-solc?
@hedgar2017 yes, we can give it a shot after this see how it goes. |
mattsse
pushed a commit
to foundry-rs/compilers
that referenced
this pull request
Dec 4, 2024
…ilerOutput (#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#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 <nisheeth.barthwal@gmail.com> Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sample of how we would remove foundry overrides using foundry-rs#224 changes.
Remaining code is a single
zksync
crate with artifacts andCompiler
/ArtifactOutput
implementationsNOTE: The PR is not meant to be actually merged with
zksync-v0.11.6
but implemented when the following upstream changes are made. It is made to that branch for now for illustrative purposes.