Skip to content

Commit

Permalink
chore: clean imports
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Edison <[email protected]>
  • Loading branch information
greged93 committed Dec 19, 2024
1 parent 4416ec1 commit adbab23
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
8 changes: 4 additions & 4 deletions crates/scroll/revm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ workspace = true
revm = { version = "18.0.0", features = ["std"], default-features = false }

# scroll
reth-scroll-primitives.workspace = true
reth-scroll-primitives = { workspace = true, optional = true }

# misc
serde = { workspace = true, optional = true }
Expand All @@ -26,17 +26,17 @@ default = ["std"]
dev = ["revm/dev"]
arbitrary = [
"revm/arbitrary",
"reth-scroll-primitives/arbitrary"
"reth-scroll-primitives?/arbitrary"
]
asm-keccak = ["revm/asm-keccak"]
c-kzg = ["revm/c-kzg"]
optimism = ["revm/optimism"]
serde = [
"revm/serde",
"serde/std",
"reth-scroll-primitives/serde"
"reth-scroll-primitives?/serde"
]
scroll = ["revm/scroll-poseidon-codehash"]
scroll = ["revm/scroll-poseidon-codehash", "dep:reth-scroll-primitives"]
test-utils = ["revm/test-utils"]
std = [
"revm/std",
Expand Down
16 changes: 9 additions & 7 deletions crates/scroll/revm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
#![warn(unused_crate_dependencies)]

use serde as _;

#[cfg(feature = "scroll")]
pub mod states;
#[cfg(feature = "test-utils")]
#[cfg(all(feature = "scroll", feature = "test-utils"))]
mod test_utils;

#[cfg(feature = "scroll")]
pub use crate::states::ScrollAccountInfo as AccountInfo;
#[cfg(not(feature = "scroll"))]
pub use revm::primitives::AccountInfo;

#[cfg(all(feature = "optimism", not(feature = "scroll")))]
pub use revm::{primitives::OptimismFields, L1BlockInfo, L1_BLOCK_CONTRACT};

Expand All @@ -21,12 +29,6 @@ pub use revm::{
JournaledState,
};

#[cfg(feature = "scroll")]
pub use crate::states::ScrollAccountInfo as AccountInfo;
#[cfg(not(feature = "scroll"))]
pub use revm::primitives::AccountInfo;
pub use states::ScrollAccountInfo;

/// Shared module, available for all feature flags.
pub mod shared {
pub use revm::{db::states::BundleState, primitives::AccountInfo};
Expand Down
4 changes: 2 additions & 2 deletions crates/scroll/revm/src/test_utils.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::{
shared::AccountInfo,
states::{
ScrollAccountInfoRevert, ScrollAccountRevert, ScrollPlainStateReverts, ScrollStateChangeset,
ScrollAccountInfo, ScrollAccountInfoRevert, ScrollAccountRevert, ScrollPlainStateReverts,
ScrollStateChangeset,
},
ScrollAccountInfo,
};
use reth_scroll_primitives::poseidon::{hash_code, POSEIDON_EMPTY};
use revm::db::{
Expand Down

0 comments on commit adbab23

Please sign in to comment.