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: implement changes for zksolc 1.5.1 #487

Merged
merged 5 commits into from
Jul 24, 2024
Merged

feat: implement changes for zksolc 1.5.1 #487

merged 5 commits into from
Jul 24, 2024

Conversation

elfedy
Copy link
Contributor

@elfedy elfedy commented Jul 22, 2024

Motivation

1.5.0 renames system_mode to enable_vm_extensions and moved some cli flags to std json.
1.5.1 does not output fields that are specified in output selection.

Solution

Adapt configs and defaults to those changes and make 1.5.1 the default compiler.

Related PRs

Needs Moonsong-Labs/compilers#15

let abi_json = &solc_metadata_json["output"]["abi"];
let abi_string = abi_json.to_string();
let abi: JsonAbi = JsonAbi::from_json_str(&abi_string)?;
let ZkContractArtifact { bytecode, hash, factory_dependencies, abi, .. } = artifact;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is so much better

output_selection: OutputSelection {
all: Some(FileOutputSelection {
per_file: None,
per_contract: Some([OutputSelectionFlag::ABI].into()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, are we sure we don't use some fields that used to be present like the metadata? I think it would came up just as invariant testing but just wondering.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so, we use the bytecodes but those are always output. If something comes up we can add it then

@elfedy elfedy merged commit 2d3a2f4 into dev Jul 24, 2024
14 checks passed
@elfedy elfedy deleted the elfedy-zksolc-151 branch July 24, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants