From 10c35daad1e336bb1c103e839e9889973f3a4599 Mon Sep 17 00:00:00 2001 From: Karrq Date: Fri, 20 Sep 2024 14:39:28 +0200 Subject: [PATCH] refactor(zk): simplify test contract check Co-authored-by: Nisheeth Barthwal --- crates/cheatcodes/src/inspector.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/cheatcodes/src/inspector.rs b/crates/cheatcodes/src/inspector.rs index 7c0bef78e..e1234d693 100644 --- a/crates/cheatcodes/src/inspector.rs +++ b/crates/cheatcodes/src/inspector.rs @@ -1530,8 +1530,7 @@ impl Cheatcodes { return None; } - if let Some(true) = - ecx.db.get_test_contract_address().map(|addr| call.bytecode_address == addr) + if ecx.db.get_test_contract_address().map(|addr| call.bytecode_address == addr).unwrap_or_default() { info!( "running call in EVM, instead of zkEVM (Test Contract) {:#?}",