Skip to content

Commit 4a49c1b

Browse files
authored
fix: EvmVersion from_str (#235)
Currently, `EvmVersion` won't get deserialized for `spuriousdragon` and `tangerinewhistle`. This can be reproduced using: ``` cast run 0x6b5ca68eb4c4b38690ec12ba9f85409b618759646e50ab53b28f9d67f74978fc --rpc-url=https://rpc.ankr.com/eth --evm-version spuriousDragon Error: failed to extract foundry config: foundry config error: Unknown evm version: spuriousdragon for key "default.evm_version" in RunArgs for setting `evm_version` ``` Solution: Handle camel case and lowercase
1 parent ff2a8d6 commit 4a49c1b

File tree

1 file changed

+2
-2
lines changed
  • crates/artifacts/solc/src

1 file changed

+2
-2
lines changed

crates/artifacts/solc/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,8 +957,8 @@ impl FromStr for EvmVersion {
957957
fn from_str(s: &str) -> Result<Self, Self::Err> {
958958
match s {
959959
"homestead" => Ok(Self::Homestead),
960-
"tangerineWhistle" => Ok(Self::TangerineWhistle),
961-
"spuriousDragon" => Ok(Self::SpuriousDragon),
960+
"tangerineWhistle" | "tangerinewhistle" => Ok(Self::TangerineWhistle),
961+
"spuriousDragon" | "spuriousdragon" => Ok(Self::SpuriousDragon),
962962
"byzantium" => Ok(Self::Byzantium),
963963
"constantinople" => Ok(Self::Constantinople),
964964
"petersburg" => Ok(Self::Petersburg),

0 commit comments

Comments
 (0)