@@ -13,7 +13,7 @@ pub struct TargetTriple {
13
13
}
14
14
15
15
impl TargetTriple {
16
- pub fn new (
16
+ pub const fn new (
17
17
architecture : Architecture ,
18
18
vendor : Vendor ,
19
19
operating_system : OperatingSystem ,
@@ -121,8 +121,12 @@ impl OperatingSystem {
121
121
"homestead" => EvmVersion :: Homestead ,
122
122
"byzantium" => EvmVersion :: Byzantium ,
123
123
"constantinople" => EvmVersion :: Constantinople ,
124
+ "berlin" => EvmVersion :: Berlin ,
124
125
"istanbul" => EvmVersion :: Istanbul ,
125
126
"london" => EvmVersion :: London ,
127
+ "paris" => EvmVersion :: Paris ,
128
+ "Shanghai" => EvmVersion :: Shanghai ,
129
+ "cancun" => EvmVersion :: Cancun ,
126
130
_ => return Err ( InvalidTriple :: OsNotSupported ) ,
127
131
} ;
128
132
Ok ( Self :: Evm ( evm_version) )
@@ -146,7 +150,11 @@ pub enum EvmVersion {
146
150
Byzantium ,
147
151
Constantinople ,
148
152
Istanbul ,
153
+ Berlin ,
149
154
London ,
155
+ Paris ,
156
+ Shanghai ,
157
+ Cancun ,
150
158
}
151
159
152
160
#[ derive( Debug , Clone , Error ) ]
@@ -175,7 +183,11 @@ impl Display for EvmVersion {
175
183
Self :: Byzantium => write ! ( f, "byzantium" ) ,
176
184
Self :: Constantinople => write ! ( f, "constantinople" ) ,
177
185
Self :: Istanbul => write ! ( f, "istanbul" ) ,
186
+ Self :: Berlin => write ! ( f, "berlin" ) ,
178
187
Self :: London => write ! ( f, "london" ) ,
188
+ Self :: Paris => write ! ( f, "paris" ) ,
189
+ Self :: Shanghai => write ! ( f, "shanghai" ) ,
190
+ Self :: Cancun => write ! ( f, "cancun" ) ,
179
191
}
180
192
}
181
193
}
0 commit comments