Skip to content
Merged
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
8 changes: 6 additions & 2 deletions crates/artifacts/solc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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!(
Expand Down