diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/enable_evm_emulator.rs b/zkstack_cli/crates/zkstack/src/commands/chain/enable_evm_emulator.rs index f1bab14f296..a6bbd2c9dc7 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/enable_evm_emulator.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/enable_evm_emulator.rs @@ -21,10 +21,9 @@ pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { shell, EcosystemConfig::default_configs_path(&chain_config.link_to_code), )?; + let has_evm_emulation_support = default_genesis_config.evm_emulator_hash.is_some(); - if !has_evm_emulation_support { - anyhow::bail!(MSG_EVM_EMULATOR_HASH_MISSING_ERR); - } + anyhow::ensure!(has_evm_emulation_support, MSG_EVM_EMULATOR_HASH_MISSING_ERR); let contracts = chain_config.get_contracts_config()?; let secrets = chain_config.get_secrets_config()?; @@ -42,7 +41,7 @@ pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { &chain_config.get_wallets_config()?.governor, contracts.l1.diamond_proxy_addr, &args, - l1_rpc_url.clone(), + l1_rpc_url, ) .await?; logger::success(MSG_EVM_EMULATOR_ENABLED); diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs index bd815caceab..b582f49cf4a 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs @@ -110,7 +110,7 @@ pub async fn init( contracts_config.l1.chain_admin_addr, &chain_config.get_wallets_config()?.governor, contracts_config.l1.diamond_proxy_addr, - &init_args.forge_args.clone(), + &init_args.forge_args, init_args.l1_rpc_url.clone(), ) .await?; @@ -130,7 +130,7 @@ pub async fn init( .token_multiplier_setter .context(MSG_WALLET_TOKEN_MULTIPLIER_SETTER_NOT_FOUND)? .address, - &init_args.forge_args.clone(), + &init_args.forge_args, init_args.l1_rpc_url.clone(), ) .await?; @@ -145,7 +145,7 @@ pub async fn init( contracts_config.l1.chain_admin_addr, &chain_config.get_wallets_config()?.governor, contracts_config.l1.diamond_proxy_addr, - &init_args.forge_args.clone(), + &init_args.forge_args, init_args.l1_rpc_url.clone(), ) .await?;