From 32c275dfaadef42d3d43cc0ee0653e910c83a6b0 Mon Sep 17 00:00:00 2001 From: Francesco Dainese Date: Fri, 1 Nov 2024 18:09:56 +0100 Subject: [PATCH 1/3] fix(compiler:zk): non-opt `OutputSelection` fix(compiler:zk): `codegen` --- crates/config/src/zksync.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/config/src/zksync.rs b/crates/config/src/zksync.rs index 5265b9ca1..8d86eaa41 100644 --- a/crates/config/src/zksync.rs +++ b/crates/config/src/zksync.rs @@ -5,7 +5,9 @@ use foundry_compilers::{ }, solc::CliSettings, zksolc::{ - settings::{BytecodeHash, Optimizer, OptimizerDetails, SettingsMetadata, ZkSolcSettings}, + settings::{ + BytecodeHash, Codegen, Optimizer, OptimizerDetails, SettingsMetadata, ZkSolcSettings, + }, ZkSettings, }, }; @@ -122,11 +124,12 @@ impl ZkSyncConfig { force_evmla: self.force_evmla, llvm_options: self.llvm_options.clone(), output_selection: OutputSelection { - all: Some(FileOutputSelection { - per_file: None, - per_contract: Some([OutputSelectionFlag::ABI].into()), - }), + all: FileOutputSelection { + per_file: [].into(), + per_contract: [OutputSelectionFlag::ABI].into(), + }, }, + codegen: if self.force_evmla { Codegen::EVMLA } else { Codegen::Yul }, }; // `cli_settings` get set from `Project` values when building `ZkSolcVersionedInput` From 6740feb1f5eb1dcaddb1c8671ba25c0803d4b37b Mon Sep 17 00:00:00 2001 From: Francesco Dainese Date: Fri, 1 Nov 2024 20:30:59 +0100 Subject: [PATCH 2/3] chore: bump compilers --- Cargo.lock | 27 +++++++++++++-------------- Cargo.toml | 4 ++-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cf76344a2..b7a6d6396 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4817,7 +4817,7 @@ dependencies = [ [[package]] name = "foundry-block-explorers" version = "0.7.3" -source = "git+https://github.com/Moonsong-Labs/block-explorers?branch=zksync-v0.7.3#9ebec2f71f0ee739f4ec4fb21df4d301aeb61936" +source = "git+https://github.com/Moonsong-Labs/block-explorers?branch=zksync-v0.7.3#ef81bf5a733517de496ae1d14024ea9b4fcd4d3c" dependencies = [ "alloy-chains", "alloy-json-abi", @@ -5067,8 +5067,8 @@ dependencies = [ [[package]] name = "foundry-compilers" -version = "0.11.1" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.1#e3f44379f6bfb3c50e3a69acbeaa8f6da0cb4aae" +version = "0.11.4" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -5107,8 +5107,8 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts" -version = "0.11.1" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.1#e3f44379f6bfb3c50e3a69acbeaa8f6da0cb4aae" +version = "0.11.4" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "foundry-compilers-artifacts-solc", "foundry-compilers-artifacts-vyper", @@ -5117,8 +5117,8 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-solc" -version = "0.11.1" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.1#e3f44379f6bfb3c50e3a69acbeaa8f6da0cb4aae" +version = "0.11.4" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -5140,8 +5140,8 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-vyper" -version = "0.11.1" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.1#e3f44379f6bfb3c50e3a69acbeaa8f6da0cb4aae" +version = "0.11.4" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -5154,8 +5154,8 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-zksolc" -version = "0.11.1" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.1#e3f44379f6bfb3c50e3a69acbeaa8f6da0cb4aae" +version = "0.11.4" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -5175,14 +5175,13 @@ dependencies = [ [[package]] name = "foundry-compilers-core" -version = "0.11.1" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.1#e3f44379f6bfb3c50e3a69acbeaa8f6da0cb4aae" +version = "0.11.4" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-primitives", "cfg-if 1.0.0", "dunce", "fs_extra", - "memmap2", "once_cell", "path-slash", "regex", diff --git a/Cargo.toml b/Cargo.toml index 167503ca3..917d30c16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -174,10 +174,10 @@ foundry-zksync-inspectors = { path = "crates/zksync/inspectors" } # solc & compilation utilities # foundry-block-explorers = { version = "0.7.3", default-features = false } -# foundry-compilers = { version = "0.11.1", default-features = false } +# foundry-compilers = { version = "0.11.4", default-features = false } # foundry-fork-db = "0.3" foundry-block-explorers = { git = "https://github.com/Moonsong-Labs/block-explorers", branch = "zksync-v0.7.3", default-features = false } -foundry-compilers = { git = "https://github.com/Moonsong-Labs/compilers", branch = "zksync-v0.11.1" } +foundry-compilers = { git = "https://github.com/Moonsong-Labs/compilers", branch = "zksync-v0.11.4" } foundry-fork-db = { git = "https://github.com/Moonsong-Labs/foundry-zksync-fork-db", branch = "zksync-v0.3.1" } solang-parser = "=0.3.3" From a5f80e33573e6d9305fb1fcc7454abc84dc51a06 Mon Sep 17 00:00:00 2001 From: Francesco Dainese Date: Fri, 1 Nov 2024 20:34:59 +0100 Subject: [PATCH 3/3] chore: re-bump compilers after merge --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 89c2cd439..8563f8af6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5101,7 +5101,7 @@ dependencies = [ [[package]] name = "foundry-compilers" version = "0.11.4" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#04cb9bd38c9dbd6388488a0d6cd9377db1e44a44" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -5141,7 +5141,7 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts" version = "0.11.4" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#04cb9bd38c9dbd6388488a0d6cd9377db1e44a44" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "foundry-compilers-artifacts-solc", "foundry-compilers-artifacts-vyper", @@ -5151,7 +5151,7 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-solc" version = "0.11.4" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#04cb9bd38c9dbd6388488a0d6cd9377db1e44a44" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -5174,7 +5174,7 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-vyper" version = "0.11.4" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#04cb9bd38c9dbd6388488a0d6cd9377db1e44a44" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -5188,7 +5188,7 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-zksolc" version = "0.11.4" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#04cb9bd38c9dbd6388488a0d6cd9377db1e44a44" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -5209,7 +5209,7 @@ dependencies = [ [[package]] name = "foundry-compilers-core" version = "0.11.4" -source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#04cb9bd38c9dbd6388488a0d6cd9377db1e44a44" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" dependencies = [ "alloy-primitives", "cfg-if 1.0.0",