diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 36e55c6d2c..a8f3705dbc 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -57,8 +57,6 @@ pub use chain::{ ChainSpecBuilder, DisplayHardforks, ForkBaseFeeParams, ForkCondition, ForkTimestamps, NamedChain, DEV, GOERLI, HOLESKY, MAINNET, SEPOLIA, }; -#[cfg(feature = "optimism")] -pub use chain::{BASE_GOERLI, BASE_MAINNET, OP_GOERLI}; pub use compression::*; pub use constants::{ DEV_GENESIS_HASH, EMPTY_OMMER_ROOT_HASH, GOERLI_GENESIS_HASH, HOLESKY_GENESIS_HASH, @@ -98,8 +96,6 @@ pub use transaction::{ TxEip4844, TxHashOrNumber, TxLegacy, TxType, TxValue, EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, LEGACY_TX_TYPE_ID, }; -#[cfg(feature = "optimism")] -pub use transaction::{TxDeposit, DEPOSIT_TX_TYPE_ID}; pub use withdrawal::Withdrawal; // Re-exports @@ -133,3 +129,15 @@ pub use arbitrary; #[cfg(feature = "c-kzg")] pub use c_kzg as kzg; + +/// Optimism specific re-exports +#[cfg(feature = "optimism")] +mod optimism { + pub use crate::{ + chain::{BASE_GOERLI, BASE_MAINNET, OP_GOERLI}, + transaction::{TxDeposit, DEPOSIT_TX_TYPE_ID}, + }; +} + +#[cfg(feature = "optimism")] +pub use optimism::*;