diff --git a/crates/artifacts/solc/src/lib.rs b/crates/artifacts/solc/src/lib.rs index e643f91f2..f9d122b6f 100644 --- a/crates/artifacts/solc/src/lib.rs +++ b/crates/artifacts/solc/src/lib.rs @@ -39,7 +39,8 @@ use foundry_compilers_core::{ error::SolcError, utils::{ strip_prefix_owned, BERLIN_SOLC, BYZANTIUM_SOLC, CANCUN_SOLC, CONSTANTINOPLE_SOLC, - ISTANBUL_SOLC, LONDON_SOLC, PARIS_SOLC, PETERSBURG_SOLC, PRAGUE_SOLC, SHANGHAI_SOLC, + ISTANBUL_SOLC, LONDON_SOLC, OSAKA_SOLC, PARIS_SOLC, PETERSBURG_SOLC, PRAGUE_SOLC, + SHANGHAI_SOLC, }, }; pub use serde_helpers::{deserialize_bytes, deserialize_opt_bytes}; @@ -856,8 +857,10 @@ impl EvmVersion { if *version >= BYZANTIUM_SOLC { // If the Solc version is the latest, it supports all EVM versions. // For all other cases, cap at the at-the-time highest possible fork. - let normalized = if *version >= PRAGUE_SOLC { + let normalized = if *version >= OSAKA_SOLC { self + } else if *version >= PRAGUE_SOLC { + Self::Prague } else if self >= Self::Cancun && *version >= CANCUN_SOLC { Self::Cancun } else if self >= Self::Shanghai && *version >= SHANGHAI_SOLC { @@ -2021,6 +2024,7 @@ mod tests { ("0.8.26", EvmVersion::Cancun, Some(EvmVersion::Cancun)), ("0.8.26", EvmVersion::Prague, Some(EvmVersion::Cancun)), ("0.8.27", EvmVersion::Prague, Some(EvmVersion::Prague)), + ("0.8.29", EvmVersion::Osaka, Some(EvmVersion::Osaka)), ] { let version = Version::from_str(solc_version).unwrap(); assert_eq!(