@@ -110,9 +110,10 @@ pub enum SpecId {
110110 /// Although the Curie update include new opcodes in Cancun, the most important change
111111 /// `EIP-4844` is not included. So we sort it before Cancun.
112112 CURIE = 19 ,
113- CANCUN = 20 ,
114- PRAGUE = 21 ,
115- PRAGUE_EOF = 22 ,
113+ MORPH203 = 20 , // revert Precompiles: RIPEMD-160, point evaluation, modexp, ecPairing
114+ CANCUN = 21 ,
115+ PRAGUE = 22 ,
116+ PRAGUE_EOF = 23 ,
116117 #[ default]
117118 LATEST = u8:: MAX ,
118119}
@@ -174,6 +175,8 @@ impl From<&str> for SpecId {
174175 "Bernoulli" => SpecId :: BERNOULLI ,
175176 #[ cfg( feature = "morph" ) ]
176177 "Curie" => SpecId :: CURIE ,
178+ #[ cfg( feature = "morph" ) ]
179+ "Morph203" => SpecId :: MORPH203 ,
177180 _ => Self :: LATEST ,
178181 }
179182 }
@@ -220,6 +223,8 @@ impl From<SpecId> for &'static str {
220223 SpecId :: BERNOULLI => "Bernoulli" ,
221224 #[ cfg( feature = "morph" ) ]
222225 SpecId :: CURIE => "Curie" ,
226+ #[ cfg( feature = "morph" ) ]
227+ SpecId :: MORPH203 => "Morph203" ,
223228 SpecId :: LATEST => "Latest" ,
224229 }
225230 }
@@ -290,6 +295,8 @@ spec!(PRE_BERNOULLI, PreBernoulliSpec);
290295#[ cfg( feature = "morph" ) ]
291296spec ! ( BERNOULLI , BernoulliSpec ) ;
292297#[ cfg( feature = "morph" ) ]
298+ spec ! ( MORPH203 , Morph203Spec ) ;
299+ #[ cfg( feature = "morph" ) ]
293300spec ! ( CURIE , CurieSpec ) ;
294301
295302#[ cfg( not( any( feature = "optimism" , feature = "morph" ) ) ) ]
@@ -534,6 +541,10 @@ macro_rules! spec_to_generic {
534541 use $crate:: BernoulliSpec as SPEC ;
535542 $e
536543 }
544+ $crate:: SpecId :: MORPH203 => {
545+ use $crate:: Morph203Spec as SPEC ;
546+ $e
547+ }
537548 $crate:: SpecId :: CURIE => {
538549 use $crate:: CurieSpec as SPEC ;
539550 $e
@@ -578,6 +589,8 @@ mod tests {
578589 #[ cfg( feature = "morph" ) ]
579590 spec_to_generic ! ( BERNOULLI , assert_eq!( SPEC :: SPEC_ID , BERNOULLI ) ) ;
580591 #[ cfg( feature = "morph" ) ]
592+ spec_to_generic ! ( MORPH203 , assert_eq!( SPEC :: SPEC_ID , MORPH203 ) ) ;
593+ #[ cfg( feature = "morph" ) ]
581594 spec_to_generic ! ( CURIE , assert_eq!( SPEC :: SPEC_ID , CURIE ) ) ;
582595 spec_to_generic ! ( CANCUN , assert_eq!( SPEC :: SPEC_ID , CANCUN ) ) ;
583596 #[ cfg( feature = "optimism" ) ]
0 commit comments