Skip to content

Commit

Permalink
fix: support one-part format of the ZKsync version of solc
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgar2017 committed May 21, 2024
1 parent 83c19bf commit d19c4a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions compiler_tester/src/compilers/solidity/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl SolidityCompiler {
libraries: &BTreeMap<String, BTreeMap<String, String>>,
mode: &SolidityMode,
) -> anyhow::Result<era_compiler_solidity::SolcStandardJsonOutput> {
let mut solc = if mode.is_system_contracts_mode {
let mut solc_compiler = if mode.is_system_contracts_mode {
Self::system_contract_executable()
} else {
Self::executable(&mode.solc_version)
Expand Down Expand Up @@ -219,7 +219,7 @@ impl SolidityCompiler {
.to_string_lossy()
.to_string();

solc.standard_json(
solc_compiler.standard_json(
solc_input,
Some(mode.solc_pipeline),
None,
Expand Down Expand Up @@ -373,7 +373,11 @@ impl Compiler for SolidityCompiler {
let last_contract = Self::get_last_contract(&solc_output, &sources)
.map_err(|error| anyhow::anyhow!("Failed to get the last contract: {}", error))?;

let mut solc_compiler = SolidityCompiler::executable(&mode.solc_version)?;
let mut solc_compiler = if mode.is_system_contracts_mode {
SolidityCompiler::system_contract_executable()
} else {
SolidityCompiler::executable(&mode.solc_version)
}?;

let project = era_compiler_solidity::Project::try_from_solidity_sources(
&mut solc_output,
Expand Down

0 comments on commit d19c4a5

Please sign in to comment.