@@ -20,21 +20,21 @@ use cosm_utils::{
20
20
} ;
21
21
use cosmrs:: rpc:: client:: CompatMode ;
22
22
use cosmrs:: rpc:: { HttpClient , HttpClientUrl } ;
23
- #[ cfg( feature = "wasm_opt " ) ]
23
+ #[ cfg( feature = "wasm-opt " ) ]
24
24
use futures:: future:: join_all;
25
25
use inquire:: { MultiSelect , Select } ;
26
26
use interactive_parse:: InteractiveParseObj ;
27
27
use log:: info;
28
- #[ cfg( feature = "wasm_opt " ) ]
28
+ #[ cfg( feature = "wasm-opt " ) ]
29
29
use tokio:: task:: spawn_blocking;
30
- #[ cfg( feature = "wasm_opt " ) ]
30
+ #[ cfg( feature = "wasm-opt " ) ]
31
31
use wasm_opt:: integration:: run_from_command_args;
32
32
33
33
use crate :: config:: WorkspaceSettings ;
34
34
use crate :: cw20:: cw20_transfer;
35
35
use crate :: query:: query;
36
36
use crate :: utils:: print_res;
37
- #[ cfg( wasm_cli) ]
37
+ #[ cfg( feature = " wasm_cli" ) ]
38
38
use crate :: wasm_cli:: wasm_cli_import_schemas;
39
39
use crate :: {
40
40
cli:: { Cli , Commands } ,
@@ -476,7 +476,7 @@ pub fn schemas(contracts: &[impl Deploy]) -> anyhow::Result<()> {
476
476
. wait ( ) ?;
477
477
}
478
478
479
- #[ cfg( wasm_cli) ]
479
+ #[ cfg( feature = " wasm_cli" ) ]
480
480
// Import schemas
481
481
for contract in contracts {
482
482
wasm_cli_import_schemas ( & contract. name ( ) ) ?;
@@ -496,25 +496,24 @@ pub async fn optimize(
496
496
let name = contract. name ( ) ;
497
497
let bin_name = contract. bin_name ( ) ;
498
498
println ! ( "{} {name} contract" , " Optimizing" . bold( ) . bright_green( ) ) ;
499
- #[ cfg( feature = "wasm_opt " ) ]
499
+ #[ cfg( feature = "wasm-opt " ) ]
500
500
{
501
501
let mut command = wasm_opt:: integration:: Command :: new ( "wasm-opt" ) ;
502
502
command
503
503
. arg ( "-Oz" )
504
504
. arg ( "-o" )
505
505
. arg ( settings. artifacts_dir . join ( format ! ( "{}.wasm" , bin_name) ) )
506
- . arg (
507
- settings
508
- . target_dir
509
- . join ( format ! ( "wasm32-unknown-unknown/release/{bin_name}.wasm" ) ) ,
510
- ) ;
506
+ . arg ( settings. target_dir . join ( format ! (
507
+ "wasm32-unknown-unknown/{}/{bin_name}.wasm" ,
508
+ settings. build_profile
509
+ ) ) ) ;
511
510
handles. push ( {
512
511
spawn_blocking ( move || {
513
512
run_from_command_args ( command) . unwrap ( ) ;
514
513
} )
515
514
} )
516
515
}
517
- #[ cfg( not( feature = "wasm_opt " ) ) ]
516
+ #[ cfg( not( feature = "wasm-opt " ) ) ]
518
517
{
519
518
let mut command = Command :: new ( "wasm-opt" ) ;
520
519
handles. push (
@@ -535,9 +534,9 @@ pub async fn optimize(
535
534
) ;
536
535
}
537
536
}
538
- #[ cfg( feature = "wasm_opt " ) ]
537
+ #[ cfg( feature = "wasm-opt " ) ]
539
538
join_all ( handles) . await ;
540
- #[ cfg( not( feature = "wasm_opt " ) ) ]
539
+ #[ cfg( not( feature = "wasm-opt " ) ) ]
541
540
handles. iter_mut ( ) . for_each ( |x| {
542
541
x. wait ( ) . unwrap ( ) ;
543
542
} ) ;
0 commit comments