@@ -106,10 +106,9 @@ impl BindArgs {
106
106
}
107
107
108
108
if self . ethers {
109
- eprintln ! (
110
- "Warning: `--ethers` bindings are deprecated and will be removed in the future. \
111
- Consider using `--alloy` (default) instead."
112
- ) ;
109
+ sh_warn ! (
110
+ "`--ethers` bindings are deprecated and will be removed in the future. Consider using `--alloy` (default) instead."
111
+ ) ?;
113
112
}
114
113
115
114
let config = self . try_load_config_emit_warnings ( ) ?;
@@ -118,7 +117,7 @@ impl BindArgs {
118
117
119
118
if bindings_root. exists ( ) {
120
119
if !self . overwrite {
121
- println ! ( "Bindings found. Checking for consistency." ) ;
120
+ sh_println ! ( "Bindings found. Checking for consistency." ) ? ;
122
121
return self . check_existing_bindings ( & artifacts, & bindings_root) ;
123
122
}
124
123
@@ -128,7 +127,7 @@ impl BindArgs {
128
127
129
128
self . generate_bindings ( & artifacts, & bindings_root) ?;
130
129
131
- println ! ( "Bindings have been generated to {}" , bindings_root. display( ) ) ;
130
+ sh_println ! ( "Bindings have been generated to {}" , bindings_root. display( ) ) ? ;
132
131
Ok ( ( ) )
133
132
}
134
133
@@ -274,7 +273,7 @@ impl BindArgs {
274
273
275
274
fn check_ethers ( & self , artifacts : & Path , bindings_root : & Path ) -> Result < ( ) > {
276
275
let bindings = self . get_multi ( artifacts) ?. build ( ) ?;
277
- println ! ( "Checking bindings for {} contracts." , bindings. len( ) ) ;
276
+ sh_println ! ( "Checking bindings for {} contracts." , bindings. len( ) ) ? ;
278
277
if !self . module {
279
278
bindings
280
279
. ensure_consistent_crate (
@@ -294,14 +293,14 @@ impl BindArgs {
294
293
} else {
295
294
bindings. ensure_consistent_module ( bindings_root, self . single_file ) ?;
296
295
}
297
- println ! ( "OK." ) ;
296
+ sh_println ! ( "OK." ) ? ;
298
297
Ok ( ( ) )
299
298
}
300
299
301
300
fn check_alloy ( & self , artifacts : & Path , bindings_root : & Path ) -> Result < ( ) > {
302
301
let mut bindings = self . get_solmacrogen ( artifacts) ?;
303
302
bindings. generate_bindings ( ) ?;
304
- println ! ( "Checking bindings for {} contracts" , bindings. instances. len( ) ) ;
303
+ sh_println ! ( "Checking bindings for {} contracts" , bindings. instances. len( ) ) ? ;
305
304
bindings. check_consistency (
306
305
& self . crate_name ,
307
306
& self . crate_version ,
@@ -311,7 +310,7 @@ impl BindArgs {
311
310
self . module ,
312
311
self . alloy_version . clone ( ) ,
313
312
) ?;
314
- println ! ( "OK." ) ;
313
+ sh_println ! ( "OK." ) ? ;
315
314
Ok ( ( ) )
316
315
}
317
316
@@ -326,7 +325,7 @@ impl BindArgs {
326
325
327
326
fn generate_ethers ( & self , artifacts : & Path , bindings_root : & Path ) -> Result < ( ) > {
328
327
let mut bindings = self . get_multi ( artifacts) ?. build ( ) ?;
329
- println ! ( "Generating bindings for {} contracts" , bindings. len( ) ) ;
328
+ sh_println ! ( "Generating bindings for {} contracts" , bindings. len( ) ) ? ;
330
329
if !self . module {
331
330
trace ! ( single_file = self . single_file, "generating crate" ) ;
332
331
if !self . skip_extra_derives {
@@ -346,7 +345,7 @@ impl BindArgs {
346
345
347
346
fn generate_alloy ( & self , artifacts : & Path , bindings_root : & Path ) -> Result < ( ) > {
348
347
let mut solmacrogen = self . get_solmacrogen ( artifacts) ?;
349
- println ! ( "Generating bindings for {} contracts" , solmacrogen. instances. len( ) ) ;
348
+ sh_println ! ( "Generating bindings for {} contracts" , solmacrogen. instances. len( ) ) ? ;
350
349
351
350
if !self . module {
352
351
trace ! ( single_file = self . single_file, "generating crate" ) ;
0 commit comments