diff --git a/Cargo.lock b/Cargo.lock index 8563f8af6..42a179e65 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#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#8f1613ec0f386f025012dc8ec89037eea7a37b43" 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#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#8f1613ec0f386f025012dc8ec89037eea7a37b43" 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#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#8f1613ec0f386f025012dc8ec89037eea7a37b43" 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#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#8f1613ec0f386f025012dc8ec89037eea7a37b43" 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#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#8f1613ec0f386f025012dc8ec89037eea7a37b43" 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#7d2dc971a21db4e188fd42d086ad0daea2dc7ae9" +source = "git+https://github.com/Moonsong-Labs/compilers?branch=zksync-v0.11.4#8f1613ec0f386f025012dc8ec89037eea7a37b43" dependencies = [ "alloy-primitives", "cfg-if 1.0.0", diff --git a/crates/config/src/zksync.rs b/crates/config/src/zksync.rs index 8d86eaa41..89051fac3 100644 --- a/crates/config/src/zksync.rs +++ b/crates/config/src/zksync.rs @@ -6,14 +6,15 @@ use foundry_compilers::{ solc::CliSettings, zksolc::{ settings::{ - BytecodeHash, Codegen, Optimizer, OptimizerDetails, SettingsMetadata, ZkSolcSettings, + BytecodeHash, Codegen, Optimizer, OptimizerDetails, SettingsMetadata, ZkSolcError, + ZkSolcSettings, ZkSolcWarning, }, ZkSettings, }, }; use serde::{Deserialize, Serialize}; -use std::path::PathBuf; +use std::{collections::HashSet, path::PathBuf}; use crate::SolcReq; @@ -59,8 +60,14 @@ pub struct ZkSyncConfig { /// The optimization mode string for zkSync pub optimizer_mode: char, - /// zkSolc optimizer details + /// zksolc optimizer details pub optimizer_details: Option, + + /// zksolc suppressed errors + pub suppressed_warnings: HashSet, + + /// zksolc suppressed warnings + pub suppressed_errors: HashSet, } impl Default for ZkSyncConfig { @@ -80,6 +87,8 @@ impl Default for ZkSyncConfig { optimizer: true, optimizer_mode: '3', optimizer_details: Default::default(), + suppressed_warnings: Default::default(), + suppressed_errors: Default::default(), } } } @@ -130,6 +139,8 @@ impl ZkSyncConfig { }, }, codegen: if self.force_evmla { Codegen::EVMLA } else { Codegen::Yul }, + suppressed_warnings: self.suppressed_warnings.clone(), + suppressed_errors: self.suppressed_errors.clone(), }; // `cli_settings` get set from `Project` values when building `ZkSolcVersionedInput`