Skip to content

Commit

Permalink
chore(deps): bump foundry-compilers (#8746)
Browse files Browse the repository at this point in the history
* chore(deps): bump compilers

* add doc

* fix
  • Loading branch information
klkvr authored Aug 26, 2024
1 parent 88a4920 commit d28a337
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ foundry-linking = { path = "crates/linking" }

# solc & compilation utilities
foundry-block-explorers = { version = "0.5.1", default-features = false }
foundry-compilers = { version = "0.10.2", default-features = false }
foundry-compilers = { version = "0.10.3", default-features = false }
foundry-fork-db = "0.2"
solang-parser = "=0.3.3"

Expand Down
7 changes: 5 additions & 2 deletions crates/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ impl Config {

/// Returns configuration for a compiler to use when setting up a [Project].
pub fn compiler(&self) -> Result<MultiCompiler, SolcError> {
Ok(MultiCompiler { solc: self.solc_compiler()?, vyper: self.vyper_compiler()? })
Ok(MultiCompiler { solc: Some(self.solc_compiler()?), vyper: self.vyper_compiler()? })
}

/// Returns configured [MultiCompilerSettings].
Expand Down Expand Up @@ -1347,6 +1347,7 @@ impl Config {
"evm.deployedBytecode".to_string(),
]),
search_paths: None,
experimental_codegen: self.vyper.experimental_codegen,
})
}

Expand Down Expand Up @@ -5023,6 +5024,7 @@ mod tests {
[vyper]
optimize = "codesize"
path = "/path/to/vyper"
experimental_codegen = true
"#,
)?;

Expand All @@ -5031,7 +5033,8 @@ mod tests {
config.vyper,
VyperConfig {
optimize: Some(VyperOptimizationMode::Codesize),
path: Some("/path/to/vyper".into())
path: Some("/path/to/vyper".into()),
experimental_codegen: Some(true),
}
);

Expand Down
3 changes: 3 additions & 0 deletions crates/config/src/vyper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ pub struct VyperConfig {
/// The Vyper instance to use if any.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<PathBuf>,
/// Optionally enables experimental Venom pipeline
#[serde(default, skip_serializing_if = "Option::is_none")]
pub experimental_codegen: Option<bool>,
}
2 changes: 1 addition & 1 deletion crates/verify/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl VerificationContext {
project.no_artifacts = true;

let solc = Solc::find_or_install(&compiler_version)?;
project.compiler.solc = SolcCompiler::Specific(solc);
project.compiler.solc = Some(SolcCompiler::Specific(solc));

Ok(Self { config, project, target_name, target_path, compiler_version })
}
Expand Down

0 comments on commit d28a337

Please sign in to comment.