1
1
//! CLI arguments for configuring the EVM settings.
2
2
3
3
use alloy_primitives:: { map:: HashMap , Address , B256 , U256 } ;
4
- use clap:: { ArgAction , Parser } ;
4
+ use clap:: Parser ;
5
5
use eyre:: ContextCompat ;
6
6
use foundry_config:: {
7
7
figment:: {
@@ -14,6 +14,8 @@ use foundry_config::{
14
14
} ;
15
15
use serde:: Serialize ;
16
16
17
+ use crate :: shell;
18
+
17
19
/// Map keyed by breakpoints char to their location (contract address, pc)
18
20
pub type Breakpoints = HashMap < char , ( Address , usize ) > ;
19
21
@@ -101,19 +103,6 @@ pub struct EvmArgs {
101
103
#[ serde( skip) ]
102
104
pub always_use_create_2_factory : bool ,
103
105
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
-
117
106
/// Sets the number of assumed available compute units per second for this provider
118
107
///
119
108
/// default value: 330
@@ -163,9 +152,9 @@ impl Provider for EvmArgs {
163
152
let error = InvalidType ( value. to_actual ( ) , "map" . into ( ) ) ;
164
153
let mut dict = value. into_dict ( ) . ok_or ( error) ?;
165
154
166
- if self . verbosity > 0 {
155
+ if shell :: verbosity ( ) > 0 {
167
156
// 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 ( ) ) ;
169
158
}
170
159
171
160
if self . ffi {
0 commit comments