diff --git a/crates/optimism/src/transaction/abstraction.rs b/crates/optimism/src/transaction/abstraction.rs index 674f4f7d6b..a7a0fb5966 100644 --- a/crates/optimism/src/transaction/abstraction.rs +++ b/crates/optimism/src/transaction/abstraction.rs @@ -183,14 +183,17 @@ impl OpTxTrait for OpTransaction { } #[cfg(test)] +#[cfg(feature = "std")] mod tests { use super::*; use revm::primitives::{Address, U256, B256}; + use std::panic; + // Helper macro for testing panic messages macro_rules! assert_panic { ($expected:expr, $($eval:tt)+) => { - let result = std::panic::catch_unwind(|| { + let result = panic::catch_unwind(|| { $($eval)+ }); assert!(result.is_err());