Skip to content

Commit 571c677

Browse files
committed
Update EVM versions
1 parent c57a9ad commit 571c677

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

crates/triple/src/lib.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct TargetTriple {
1313
}
1414

1515
impl TargetTriple {
16-
pub fn new(
16+
pub const fn new(
1717
architecture: Architecture,
1818
vendor: Vendor,
1919
operating_system: OperatingSystem,
@@ -121,8 +121,12 @@ impl OperatingSystem {
121121
"homestead" => EvmVersion::Homestead,
122122
"byzantium" => EvmVersion::Byzantium,
123123
"constantinople" => EvmVersion::Constantinople,
124+
"berlin" => EvmVersion::Berlin,
124125
"istanbul" => EvmVersion::Istanbul,
125126
"london" => EvmVersion::London,
127+
"paris" => EvmVersion::Paris,
128+
"Shanghai" => EvmVersion::Shanghai,
129+
"cancun" => EvmVersion::Cancun,
126130
_ => return Err(InvalidTriple::OsNotSupported),
127131
};
128132
Ok(Self::Evm(evm_version))
@@ -146,7 +150,11 @@ pub enum EvmVersion {
146150
Byzantium,
147151
Constantinople,
148152
Istanbul,
153+
Berlin,
149154
London,
155+
Paris,
156+
Shanghai,
157+
Cancun,
150158
}
151159

152160
#[derive(Debug, Clone, Error)]
@@ -175,7 +183,11 @@ impl Display for EvmVersion {
175183
Self::Byzantium => write!(f, "byzantium"),
176184
Self::Constantinople => write!(f, "constantinople"),
177185
Self::Istanbul => write!(f, "istanbul"),
186+
Self::Berlin => write!(f, "berlin"),
178187
Self::London => write!(f, "london"),
188+
Self::Paris => write!(f, "paris"),
189+
Self::Shanghai => write!(f, "shanghai"),
190+
Self::Cancun => write!(f, "cancun"),
179191
}
180192
}
181193
}

0 commit comments

Comments
 (0)