diff --git a/crates/precompile/src/lib.rs b/crates/precompile/src/lib.rs index f6465a69..c883ca8d 100644 --- a/crates/precompile/src/lib.rs +++ b/crates/precompile/src/lib.rs @@ -46,6 +46,7 @@ use cfg_if::cfg_if; use core::hash::Hash; use once_cell::race::OnceBox; use std::{boxed::Box, vec::Vec}; +use revm_primitives::{ECOTONE, FJORD}; pub fn calc_linear_cost_u32(len: usize, base: u64, word: u64) -> u64 { (len as u64 + 32 - 1) / 32 * word + base @@ -485,7 +486,9 @@ impl PrecompileSpecId { PRAGUE | PRAGUE_EOF => Self::PRAGUE, #[cfg(feature = "optimism")] BEDROCK | REGOLITH | CANYON => Self::BERLIN, - #[cfg(feature = "optimism")] + #[cfg(all(feature = "optimism", not(feature = "opbnb")))] + ECOTONE | FJORD=> Self::CANCUN, + #[cfg(all(feature = "optimism", feature = "opbnb"))] ECOTONE => Self::CANCUN, #[cfg(feature = "opbnb")] FERMAT => Self::FERMAT, @@ -493,7 +496,7 @@ impl PrecompileSpecId { HABER => Self::HABER, #[cfg(feature = "opbnb")] WRIGHT => Self::HABER, - #[cfg(feature = "opbnb")] + #[cfg(all(feature = "optimism", feature = "opbnb"))] FJORD => Self::HABER, #[cfg(feature = "bsc")] HABER_FIX => Self::HABER,