Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump foundry-compilers #44

Merged
merged 9 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading