From c4845c2d94ee5d55b29152e48414b05647f9010d Mon Sep 17 00:00:00 2001 From: rakita Date: Thu, 5 Sep 2024 17:18:22 +0200 Subject: [PATCH] fix optimism test --- crates/optimism/src/fast_lz.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/optimism/src/fast_lz.rs b/crates/optimism/src/fast_lz.rs index a1498f4155..327eb96f7b 100644 --- a/crates/optimism/src/fast_lz.rs +++ b/crates/optimism/src/fast_lz.rs @@ -106,12 +106,11 @@ fn u24(input: &[u8], idx: u32) -> u32 { #[cfg(test)] mod tests { use super::*; - use crate::OptimismEvmWiring; use alloy_sol_types::sol; use alloy_sol_types::SolCall; use revm::{ db::BenchmarkDB, - primitives::{address, bytes, Bytecode, Bytes, TxKind, U256}, + primitives::{address, bytes, Bytecode, Bytes, EthereumWiring, TxKind, U256}, Evm, }; @@ -162,14 +161,14 @@ mod tests { let native_val = flz_compress_len(&input); - let mut evm = Evm::>::builder() + let mut evm = Evm::>::builder() .with_db(BenchmarkDB::new_bytecode(contract_bytecode.clone())) .with_default_ext_ctx() .modify_tx_env(|tx| { - tx.base.caller = address!("1000000000000000000000000000000000000000"); - tx.base.transact_to = + tx.caller = address!("1000000000000000000000000000000000000000"); + tx.transact_to = TxKind::Call(address!("0000000000000000000000000000000000000000")); - tx.base.data = FastLz::fastLzCall::new((input,)).abi_encode().into(); + tx.data = FastLz::fastLzCall::new((input,)).abi_encode().into(); }) .build();