diff --git a/crates/precompile/src/lib.rs b/crates/precompile/src/lib.rs index 96d53e48..3aee0809 100644 --- a/crates/precompile/src/lib.rs +++ b/crates/precompile/src/lib.rs @@ -43,6 +43,7 @@ use cfg_if::cfg_if; use core::hash::Hash; use once_cell::race::OnceBox; use std::{boxed::Box, vec::Vec}; +use revm_primitives::WRIGHT; pub fn calc_linear_cost_u32(len: usize, base: u64, word: u64) -> u64 { (len as u64 + 32 - 1) / 32 * word + base @@ -487,7 +488,9 @@ impl PrecompileSpecId { #[cfg(feature = "opbnb")] FERMAT => Self::FERMAT, #[cfg(any(feature = "bsc", feature = "opbnb"))] - HABER | WRIGHT => Self::HABER, + HABER => Self::HABER, + #[cfg(feature = "opbnb")] + WRIGHT => Self::HABER, #[cfg(feature = "bsc")] HABER_FIX => Self::HABER, #[cfg(feature = "bsc")] diff --git a/crates/revm/src/optimism/handler_register.rs b/crates/revm/src/optimism/handler_register.rs index cf348d4d..ef512f8e 100644 --- a/crates/revm/src/optimism/handler_register.rs +++ b/crates/revm/src/optimism/handler_register.rs @@ -9,7 +9,8 @@ use crate::{ optimism, primitives::{ db::Database, spec_to_generic, Account, EVMError, Env, ExecutionResult, HaltReason, - HashMap, InvalidTransaction, ResultAndState, Spec, SpecId, SpecId::REGOLITH, U256, + HashMap, InvalidTransaction, ResultAndState, Spec, SpecId, SpecId::REGOLITH, SpecId::WRIGHT, + U256, }, Context, ContextPrecompiles, FrameResult, }; @@ -17,7 +18,6 @@ use core::ops::Mul; use revm_precompile::{secp256r1, PrecompileSpecId}; use std::string::ToString; use std::sync::Arc; -use crate::primitives::WRIGHT; pub fn optimism_handle_register(handler: &mut EvmHandler<'_, EXT, DB>) { spec_to_generic!(handler.cfg.spec_id, {