diff --git a/crates/precompile/Cargo.toml b/crates/precompile/Cargo.toml index 22b9611b..ad26cc5a 100644 --- a/crates/precompile/Cargo.toml +++ b/crates/precompile/Cargo.toml @@ -110,6 +110,14 @@ negate-opbnb-default-handler = [ ] # Enables the BLS12-381 precompiles. blst = ["dep:blst"] +opbnb = ["revm-primitives/opbnb"] +opbnb-default-handler = [ + "opbnb", + "revm-primitives/opbnb-default-handler", +] +negate-opbnb-default-handler = [ + "revm-primitives/negate-opbnb-default-handler", +] [[bench]] name = "bench" diff --git a/crates/precompile/src/lib.rs b/crates/precompile/src/lib.rs index 0c589f1b..b3414f49 100644 --- a/crates/precompile/src/lib.rs +++ b/crates/precompile/src/lib.rs @@ -12,6 +12,7 @@ pub mod blake2; mod bls; #[cfg(feature = "blst")] pub mod bls12_381; +mod bls; pub mod bn128; mod cometbft; pub mod hash; diff --git a/crates/primitives/src/specification.rs b/crates/primitives/src/specification.rs index feaed724..21c61de8 100644 --- a/crates/primitives/src/specification.rs +++ b/crates/primitives/src/specification.rs @@ -221,6 +221,8 @@ spec!(ECOTONE, EcotoneSpec); spec!(FERMAT, FermatSpec); #[cfg(feature = "optimism")] spec!(FJORD, FjordSpec); +#[cfg(feature = "opbnb")] +spec!(FERMAT, FermatSpec); #[cfg(not(feature = "optimism"))] #[macro_export] @@ -374,6 +376,10 @@ macro_rules! spec_to_generic { } $crate::SpecId::FJORD => { use $crate::FjordSpec as SPEC; + } + #[cfg(feature = "opbnb")] + $crate::SpecId::FERMAT => { + use $crate::FermatSpec as SPEC; $e } }