Skip to content

Commit 7f78bce

Browse files
committed
remove evm args specific verbosity arg in favor of global arg due to Clap limitation
1 parent 6a87e97 commit 7f78bce

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

crates/cast/bin/cmd/run.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ impl RunArgs {
245245
self.label,
246246
self.debug,
247247
self.decode_internal,
248-
shell::verbosity() > 1,
248+
shell::verbosity() > 0,
249249
)
250250
.await?;
251251

crates/cast/bin/cmd/wallet/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ flag to set your key via:
480480
.await?;
481481
match wallet {
482482
WalletSigner::Local(wallet) => {
483-
if shell::verbosity() > 1 {
483+
if shell::verbosity() > 0 {
484484
sh_println!("Address: {}", wallet.address())?;
485485
sh_println!(
486486
"Private key: 0x{}",

crates/common/src/evm.rs

+5-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! CLI arguments for configuring the EVM settings.
22
33
use alloy_primitives::{map::HashMap, Address, B256, U256};
4-
use clap::{ArgAction, Parser};
4+
use clap::Parser;
55
use eyre::ContextCompat;
66
use foundry_config::{
77
figment::{
@@ -14,6 +14,8 @@ use foundry_config::{
1414
};
1515
use serde::Serialize;
1616

17+
use crate::shell;
18+
1719
/// Map keyed by breakpoints char to their location (contract address, pc)
1820
pub type Breakpoints = HashMap<char, (Address, usize)>;
1921

@@ -101,19 +103,6 @@ pub struct EvmArgs {
101103
#[serde(skip)]
102104
pub always_use_create_2_factory: bool,
103105

104-
/// Verbosity of the EVM.
105-
///
106-
/// Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv).
107-
///
108-
/// Verbosity levels:
109-
/// - 2: Print logs for all tests
110-
/// - 3: Print execution traces for failing tests
111-
/// - 4: Print execution traces for all tests, and setup traces for failing tests
112-
/// - 5: Print execution and setup traces for all tests
113-
#[arg(long, short, verbatim_doc_comment, action = ArgAction::Count)]
114-
#[serde(skip)]
115-
pub verbosity: u8,
116-
117106
/// Sets the number of assumed available compute units per second for this provider
118107
///
119108
/// default value: 330
@@ -163,9 +152,9 @@ impl Provider for EvmArgs {
163152
let error = InvalidType(value.to_actual(), "map".into());
164153
let mut dict = value.into_dict().ok_or(error)?;
165154

166-
if self.verbosity > 0 {
155+
if shell::verbosity() > 0 {
167156
// need to merge that manually otherwise `from_occurrences` does not work
168-
dict.insert("verbosity".to_string(), self.verbosity.into());
157+
dict.insert("verbosity".to_string(), shell::verbosity().into());
169158
}
170159

171160
if self.ffi {

0 commit comments

Comments
 (0)