From 9980926d40c10f3f4ee0d1add127a6dcf992cd32 Mon Sep 17 00:00:00 2001 From: Omar Date: Mon, 4 Aug 2025 19:40:53 +0300 Subject: [PATCH] Add a case ignore flag (#114) * Added a resolver tied to a specific block * Increase the number of private keys * Increase kitchensink wait time to 60 seconds * Add a case ignore flag --- crates/core/src/driver/mod.rs | 6 ++++++ crates/core/src/main.rs | 25 +++++++++++++++++++++++++ crates/format/src/case.rs | 1 + 3 files changed, 32 insertions(+) diff --git a/crates/core/src/driver/mod.rs b/crates/core/src/driver/mod.rs index 95b3243..7779c58 100644 --- a/crates/core/src/driver/mod.rs +++ b/crates/core/src/driver/mod.rs @@ -5,6 +5,7 @@ use std::marker::PhantomData; use std::path::PathBuf; use alloy::eips::BlockNumberOrTag; +use alloy::hex; use alloy::json_abi::JsonAbi; use alloy::network::{Ethereum, TransactionBuilder}; use alloy::primitives::{BlockNumber, U256}; @@ -242,6 +243,11 @@ where ) { let value = U256::from_be_slice(output_word); self.variables.insert(variable_name.clone(), value); + tracing::info!( + variable_name, + variable_value = hex::encode(value.to_be_bytes::<32>()), + "Assigned variable" + ); } Ok(()) diff --git a/crates/core/src/main.rs b/crates/core/src/main.rs index 54f661b..78ea14a 100644 --- a/crates/core/src/main.rs +++ b/crates/core/src/main.rs @@ -162,6 +162,20 @@ where Some(false) | None => true, }, ) + .filter( + |(metadata_file_path, _, case_idx, case, _)| match case.ignore { + Some(true) => { + tracing::warn!( + metadata_file_path = %metadata_file_path.display(), + case_idx, + case_name = ?case.name, + "Ignoring case" + ); + false + } + Some(false) | None => true, + }, + ) .collect::>(); let metadata_case_status = Arc::new(RwLock::new(test_cases.iter().fold( @@ -463,6 +477,17 @@ where } }; + tracing::info!( + ?library_instance, + library_address = ?leader_receipt.contract_address, + "Deployed library to leader" + ); + tracing::info!( + ?library_instance, + library_address = ?follower_receipt.contract_address, + "Deployed library to follower" + ); + let Some(leader_library_address) = leader_receipt.contract_address else { tracing::error!("Contract deployment transaction didn't return an address"); anyhow::bail!("Contract deployment didn't return an address"); diff --git a/crates/format/src/case.rs b/crates/format/src/case.rs index 4c59ab9..4e1f958 100644 --- a/crates/format/src/case.rs +++ b/crates/format/src/case.rs @@ -15,6 +15,7 @@ pub struct Case { pub inputs: Vec, pub group: Option, pub expected: Option, + pub ignore: Option, } impl Case {