Skip to content

Commit

Permalink
fix optimism test
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita committed Sep 5, 2024
1 parent c1c57ab commit c4845c2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions crates/optimism/src/fast_lz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -162,14 +161,14 @@ mod tests {

let native_val = flz_compress_len(&input);

let mut evm = Evm::<OptimismEvmWiring<BenchmarkDB, ()>>::builder()
let mut evm = Evm::<EthereumWiring<BenchmarkDB, ()>>::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();

Expand Down

0 comments on commit c4845c2

Please sign in to comment.