Skip to content

Commit

Permalink
chore: bump foundry-compilers (#44)
Browse files Browse the repository at this point in the history
ref foundry-rs/compilers#115

---------

Co-authored-by: Matthias Seitz <[email protected]>
  • Loading branch information
klkvr and mattsse authored May 3, 2024
1 parent cd824d3 commit b40cc98
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ reqwest = { version = "0.12", default-features = false, features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

tokio = { version = "1.37" }
tokio = { version = "1.37" }
2 changes: 1 addition & 1 deletion crates/block-explorers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ thiserror = "1.0"
tracing = "0.1.37"
semver = "1.0"

foundry-compilers = { version = "0.3", optional = true }
foundry-compilers = { version = "0.4", optional = true }

[dev-dependencies]
tempfile = "3.8"
Expand Down
4 changes: 2 additions & 2 deletions crates/block-explorers/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,15 @@ impl Metadata {
pub fn project_builder(&self) -> Result<ProjectBuilder> {
let solc_config = SolcConfig::builder().settings(self.settings()?).build();

Ok(Project::builder().solc_config(solc_config))
Ok(Project::builder().settings(solc_config.settings))
}

/// Parses the EVM version.
#[cfg(feature = "foundry-compilers")]
pub fn evm_version(&self) -> Result<Option<EvmVersion>> {
match self.evm_version.as_str() {
"" | "Default" => {
Ok(EvmVersion::default().normalize_version(&self.compiler_version()?))
Ok(EvmVersion::default().normalize_version_solc(&self.compiler_version()?))
}
_ => {
let evm_version = self
Expand Down
7 changes: 6 additions & 1 deletion crates/block-explorers/tests/it/verify.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(feature = "compilers-full")]

use crate::run_with_client;
use alloy_chains::Chain;
use foundry_block_explorers::verify::VerifyContract;
Expand All @@ -14,7 +16,10 @@ async fn can_flatten_and_verify_contract() {
.sources(root)
.build()
.expect("failed to resolve project paths");
let project = Project::builder().paths(paths).build().expect("failed to build the project");
let project = Project::builder()
.paths(paths)
.build(Default::default())
.expect("failed to build the project");

let address = "0x9e744c9115b74834c0f33f4097f40c02a9ac5c33".parse().unwrap();
let compiler_version = "v0.5.17+commit.d19bba13";
Expand Down

0 comments on commit b40cc98

Please sign in to comment.