diff --git a/infrastructure/zk/src/fmt.ts b/infrastructure/zk/src/fmt.ts index f8e040ab11a1..97be5c571d6f 100644 --- a/infrastructure/zk/src/fmt.ts +++ b/infrastructure/zk/src/fmt.ts @@ -39,16 +39,22 @@ async function prettierContracts(check: boolean) { } export async function rustfmt(check: boolean = false) { - process.chdir(process.env.ZKSYNC_HOME as string); - // We rely on a supposedly undocumented bug/feature of `rustfmt` that allows us to use unstable features on stable Rust. // Please note that this only works with CLI flags, and if you happened to visit this place after things suddenly stopped working, // it is certainly possible that the feature was deemed a bug and was fixed. Then welp. const config = '--config imports_granularity=Crate --config group_imports=StdExternalCrate'; const command = check ? `cargo fmt -- --check ${config}` : `cargo fmt -- ${config}`; - await utils.spawn(command); - process.chdir('./prover'); - await utils.spawn(command); + + const dirs = [ + process.env.ZKSYNC_HOME as string, + `${process.env.ZKSYNC_HOME}/prover`, + `${process.env.ZKSYNC_HOME}/zk_toolbox` + ]; + + for (const dir of dirs) { + process.chdir(dir); + await utils.spawn(command); + } } export async function runAllRustFormatters(check: boolean = false) { diff --git a/infrastructure/zk/src/lint.ts b/infrastructure/zk/src/lint.ts index 4b7ed461dc48..fcba41110fb4 100644 --- a/infrastructure/zk/src/lint.ts +++ b/infrastructure/zk/src/lint.ts @@ -3,16 +3,16 @@ import * as utils from './utils'; // Note that `rust` is not noted here, as clippy isn't run via `yarn`. // `rust` option is still supported though. -const LINT_COMMANDS: Record = { +const LINT_COMMANDS = { md: 'markdownlint', sol: 'solhint', js: 'eslint', ts: 'eslint --ext ts' }; -const EXTENSIONS = Object.keys(LINT_COMMANDS); +const EXTENSIONS = Object.keys(LINT_COMMANDS) as (keyof typeof LINT_COMMANDS)[]; const CONFIG_PATH = 'etc/lint-config'; -export async function lint(extension: string, check: boolean = false) { +export async function lint(extension: keyof typeof LINT_COMMANDS, check: boolean = false) { if (!EXTENSIONS.includes(extension)) { throw new Error('Unsupported extension'); } @@ -34,17 +34,22 @@ async function clippy() { } async function proverClippy() { - process.chdir(process.env.ZKSYNC_HOME! + '/prover'); + process.chdir(`${process.env.ZKSYNC_HOME}/prover`); await utils.spawn('cargo clippy --tests --locked -- -D warnings -A incomplete_features'); } -const ARGS = [...EXTENSIONS, 'rust', 'prover', 'contracts']; +async function toolboxClippy() { + process.chdir(`${process.env.ZKSYNC_HOME}/zk_toolbox`); + await utils.spawn('cargo clippy --tests --locked -- -D warnings'); +} + +const ARGS = [...EXTENSIONS, 'rust', 'prover', 'contracts', 'toolbox'] as const; export const command = new Command('lint') .description('lint code') .option('--check') .arguments(`[extension] ${ARGS.join('|')}`) - .action(async (extension: string | null, cmd: Command) => { + .action(async (extension: (typeof ARGS)[number] | null, cmd: Command) => { if (extension) { switch (extension) { case 'rust': @@ -56,6 +61,9 @@ export const command = new Command('lint') case 'contracts': await lintContracts(cmd.check); break; + case 'toolbox': + await toolboxClippy(); + break; default: await lint(extension, cmd.check); } @@ -63,6 +71,8 @@ export const command = new Command('lint') const promises = EXTENSIONS.map((ext) => lint(ext, cmd.check)); promises.push(lintContracts(cmd.check)); promises.push(clippy()); + promises.push(proverClippy()); + promises.push(toolboxClippy()); await Promise.all(promises); } }); diff --git a/zk_toolbox/crates/common/src/db.rs b/zk_toolbox/crates/common/src/db.rs index b345fc119469..887880b2c55c 100644 --- a/zk_toolbox/crates/common/src/db.rs +++ b/zk_toolbox/crates/common/src/db.rs @@ -1,6 +1,5 @@ use std::{collections::HashMap, path::PathBuf}; -use crate::{config::global_config, logger}; use sqlx::{ migrate::{Migrate, MigrateError, Migrator}, Connection, PgConnection, @@ -8,6 +7,8 @@ use sqlx::{ use url::Url; use xshell::Shell; +use crate::{config::global_config, logger}; + pub async fn init_db(db_url: &Url, name: &str) -> anyhow::Result<()> { // Connect to the database. let mut connection = PgConnection::connect(db_url.as_ref()).await?; diff --git a/zk_toolbox/crates/common/src/docker.rs b/zk_toolbox/crates/common/src/docker.rs index 97bba57b8aae..f52e3214fa23 100644 --- a/zk_toolbox/crates/common/src/docker.rs +++ b/zk_toolbox/crates/common/src/docker.rs @@ -1,6 +1,7 @@ -use crate::cmd::Cmd; use xshell::{cmd, Shell}; +use crate::cmd::Cmd; + pub fn up(shell: &Shell, docker_compose_file: &str) -> anyhow::Result<()> { Cmd::new(cmd!(shell, "docker-compose -f {docker_compose_file} up -d")).run() } diff --git a/zk_toolbox/crates/common/src/prerequisites.rs b/zk_toolbox/crates/common/src/prerequisites.rs index 7551b247c681..237af5b40483 100644 --- a/zk_toolbox/crates/common/src/prerequisites.rs +++ b/zk_toolbox/crates/common/src/prerequisites.rs @@ -1,6 +1,7 @@ -use crate::{cmd::Cmd, logger}; use xshell::{cmd, Shell}; +use crate::{cmd::Cmd, logger}; + const PREREQUISITES: [Prerequisite; 6] = [ Prerequisite { name: "git", diff --git a/zk_toolbox/crates/common/src/prompt/confirm.rs b/zk_toolbox/crates/common/src/prompt/confirm.rs index 195654e7d65a..79d6e8de91b0 100644 --- a/zk_toolbox/crates/common/src/prompt/confirm.rs +++ b/zk_toolbox/crates/common/src/prompt/confirm.rs @@ -1,6 +1,7 @@ -use cliclack::Confirm; use std::fmt::Display; +use cliclack::Confirm; + pub struct PromptConfirm { inner: Confirm, } diff --git a/zk_toolbox/crates/common/src/prompt/input.rs b/zk_toolbox/crates/common/src/prompt/input.rs index c2cd275ecb50..a936b4e9e635 100644 --- a/zk_toolbox/crates/common/src/prompt/input.rs +++ b/zk_toolbox/crates/common/src/prompt/input.rs @@ -1,6 +1,7 @@ -use cliclack::{Input, Validate}; use std::str::FromStr; +use cliclack::{Input, Validate}; + pub struct Prompt { inner: Input, } diff --git a/zk_toolbox/crates/zk_inception/src/accept_ownership.rs b/zk_toolbox/crates/zk_inception/src/accept_ownership.rs index eb56a5f5325e..ce20f3308b5c 100644 --- a/zk_toolbox/crates/zk_inception/src/accept_ownership.rs +++ b/zk_toolbox/crates/zk_inception/src/accept_ownership.rs @@ -2,10 +2,6 @@ use common::{ forge::{Forge, ForgeScript, ForgeScriptArgs}, spinner::Spinner, }; -use xshell::Shell; - -use crate::forge_utils::check_the_balance; -use crate::forge_utils::fill_forge_private_key; use config::{ forge_interface::{ accept_ownership::AcceptOwnershipInput, script_params::ACCEPT_GOVERNANCE_SCRIPT_PARAMS, @@ -14,6 +10,9 @@ use config::{ EcosystemConfig, }; use ethers::types::{Address, H256}; +use xshell::Shell; + +use crate::forge_utils::{check_the_balance, fill_forge_private_key}; pub async fn accept_admin( shell: &Shell, diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/args/create.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/args/create.rs index 1ad375749672..d952f816820c 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/args/create.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/args/create.rs @@ -2,13 +2,13 @@ use std::{path::PathBuf, str::FromStr}; use clap::Parser; use common::{slugify, Prompt, PromptConfirm, PromptSelect}; +use ethers::types::Address; use serde::{Deserialize, Serialize}; use strum::IntoEnumIterator; use strum_macros::{Display, EnumIter}; +use types::{BaseToken, L1BatchCommitDataGeneratorMode, ProverMode, WalletCreation}; use crate::defaults::L2_CHAIN_ID; -use ethers::types::Address; -use types::{BaseToken, L1BatchCommitDataGeneratorMode, ProverMode, WalletCreation}; #[derive(Debug, Serialize, Deserialize, Parser)] pub struct ChainCreateArgs { diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/args/genesis.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/args/genesis.rs index d34592360ae3..c8229066a2eb 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/args/genesis.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/args/genesis.rs @@ -1,10 +1,10 @@ use clap::Parser; use common::{slugify, Prompt}; +use config::{ChainConfig, DatabaseConfig, DatabasesConfig}; use serde::{Deserialize, Serialize}; use url::Url; use crate::defaults::{generate_db_names, DBNames, DATABASE_PROVER_URL, DATABASE_SERVER_URL}; -use config::{ChainConfig, DatabaseConfig, DatabasesConfig}; #[derive(Debug, Clone, Serialize, Deserialize, Parser, Default)] pub struct GenesisArgs { diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/args/init.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/args/init.rs index 9b6862b6070a..d4722afc7559 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/args/init.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/args/init.rs @@ -1,14 +1,12 @@ use clap::Parser; -use common::forge::ForgeScriptArgs; -use common::Prompt; +use common::{forge::ForgeScriptArgs, Prompt}; use config::ChainConfig; use serde::{Deserialize, Serialize}; use types::L1Network; use url::Url; use super::genesis::GenesisArgsFinal; -use crate::commands::chain::args::genesis::GenesisArgs; -use crate::defaults::LOCAL_RPC_URL; +use crate::{commands::chain::args::genesis::GenesisArgs, defaults::LOCAL_RPC_URL}; #[derive(Debug, Clone, Serialize, Deserialize, Parser)] pub struct InitArgs { diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/create.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/create.rs index f00b166c0e5b..b4dd626f74db 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/create.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/create.rs @@ -1,14 +1,14 @@ use std::cell::OnceCell; use common::{logger, spinner::Spinner}; -use xshell::Shell; - -use crate::commands::chain::args::create::{ChainCreateArgs, ChainCreateArgsFinal}; use config::{ create_local_configs_dir, create_wallets, traits::SaveConfigWithBasePath, ChainConfig, EcosystemConfig, }; use types::ChainId; +use xshell::Shell; + +use crate::commands::chain::args::create::{ChainCreateArgs, ChainCreateArgsFinal}; pub fn run(args: ChainCreateArgs, shell: &Shell) -> anyhow::Result<()> { let mut ecosystem_config = EcosystemConfig::from_file(shell)?; diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/deploy_paymaster.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/deploy_paymaster.rs index ee97dc18b599..d8f872d9e6ae 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/deploy_paymaster.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/deploy_paymaster.rs @@ -4,10 +4,6 @@ use common::{ forge::{Forge, ForgeScriptArgs}, spinner::Spinner, }; -use xshell::Shell; - -use crate::forge_utils::fill_forge_private_key; -use crate::{config_manipulations::update_paymaster, forge_utils::check_the_balance}; use config::{ forge_interface::{ paymaster::{DeployPaymasterInput, DeployPaymasterOutput}, @@ -16,6 +12,12 @@ use config::{ traits::{ReadConfig, SaveConfig}, ChainConfig, EcosystemConfig, }; +use xshell::Shell; + +use crate::{ + config_manipulations::update_paymaster, + forge_utils::{check_the_balance, fill_forge_private_key}, +}; pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { let chain_name = global_config().chain_name.clone(); diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/genesis.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/genesis.rs index a1c357f1f868..1bc9d8dd0c36 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/genesis.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/genesis.rs @@ -7,6 +7,7 @@ use common::{ logger, spinner::Spinner, }; +use config::{ChainConfig, DatabasesConfig, EcosystemConfig}; use xshell::Shell; use super::args::genesis::GenesisArgsFinal; @@ -15,7 +16,6 @@ use crate::{ config_manipulations::{update_database_secrets, update_general_config}, server::{RunServer, ServerMode}, }; -use config::{ChainConfig, DatabasesConfig, EcosystemConfig}; const SERVER_MIGRATIONS: &str = "core/lib/dal/migrations"; const PROVER_MIGRATIONS: &str = "prover/prover_dal/migrations"; diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/init.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/init.rs index ae45e52dcb05..2aa295031972 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/init.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/init.rs @@ -5,18 +5,6 @@ use common::{ logger, spinner::Spinner, }; -use xshell::Shell; - -use super::args::init::InitArgsFinal; -use crate::{ - accept_ownership::accept_admin, - commands::chain::{ - args::init::InitArgs, deploy_paymaster, genesis::genesis, initialize_bridges, - }, - config_manipulations::{update_l1_contracts, update_l1_rpc_url_secret}, - forge_utils::fill_forge_private_key, -}; -use crate::{config_manipulations::update_genesis, forge_utils::check_the_balance}; use config::{ copy_configs, forge_interface::{ @@ -26,6 +14,17 @@ use config::{ traits::{ReadConfig, ReadConfigWithBasePath, SaveConfig, SaveConfigWithBasePath}, ChainConfig, ContractsConfig, EcosystemConfig, }; +use xshell::Shell; + +use super::args::init::InitArgsFinal; +use crate::{ + accept_ownership::accept_admin, + commands::chain::{ + args::init::InitArgs, deploy_paymaster, genesis::genesis, initialize_bridges, + }, + config_manipulations::{update_genesis, update_l1_contracts, update_l1_rpc_url_secret}, + forge_utils::{check_the_balance, fill_forge_private_key}, +}; pub(crate) async fn run(args: InitArgs, shell: &Shell) -> anyhow::Result<()> { let chain_name = global_config().chain_name.clone(); diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/initialize_bridges.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/initialize_bridges.rs index f11ac68414ca..924b27f6ce0b 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/initialize_bridges.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/initialize_bridges.rs @@ -1,16 +1,12 @@ use std::path::Path; +use anyhow::Context; use common::{ cmd::Cmd, config::global_config, forge::{Forge, ForgeScriptArgs}, spinner::Spinner, }; -use xshell::{cmd, Shell}; - -use crate::forge_utils::fill_forge_private_key; -use crate::{config_manipulations::update_l2_shared_bridge, forge_utils::check_the_balance}; -use anyhow::Context; use config::{ forge_interface::{ initialize_bridges::{input::InitializeBridgeInput, output::InitializeBridgeOutput}, @@ -19,6 +15,12 @@ use config::{ traits::{ReadConfig, SaveConfig}, ChainConfig, EcosystemConfig, }; +use xshell::{cmd, Shell}; + +use crate::{ + config_manipulations::update_l2_shared_bridge, + forge_utils::{check_the_balance, fill_forge_private_key}, +}; pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { let chain_name = global_config().chain_name.clone(); diff --git a/zk_toolbox/crates/zk_inception/src/commands/containers.rs b/zk_toolbox/crates/zk_inception/src/commands/containers.rs index db9293710828..a72fbfdc7552 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/containers.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/containers.rs @@ -1,9 +1,9 @@ -use anyhow::{anyhow, Context}; -use common::{docker, logger, spinner::Spinner}; use std::path::PathBuf; -use xshell::Shell; +use anyhow::{anyhow, Context}; +use common::{docker, logger, spinner::Spinner}; use config::{EcosystemConfig, DOCKER_COMPOSE_FILE}; +use xshell::Shell; pub fn run(shell: &Shell) -> anyhow::Result<()> { let ecosystem = diff --git a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/init.rs b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/init.rs index ac1db3a52259..9a94ed7e4aa0 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/init.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/init.rs @@ -6,8 +6,7 @@ use serde::{Deserialize, Serialize}; use types::L1Network; use url::Url; -use crate::commands::chain::args::genesis::GenesisArgs; -use crate::defaults::LOCAL_RPC_URL; +use crate::{commands::chain::args::genesis::GenesisArgs, defaults::LOCAL_RPC_URL}; #[derive(Debug, Clone, Serialize, Deserialize, Parser)] pub struct EcosystemArgs { diff --git a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/change_default.rs b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/change_default.rs index 1dd3bcdee6ba..19af4fe83bdc 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/change_default.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/change_default.rs @@ -1,8 +1,8 @@ use common::PromptSelect; +use config::{traits::SaveConfigWithBasePath, EcosystemConfig}; use xshell::Shell; use crate::commands::ecosystem::args::change_default::ChangeDefaultChain; -use config::{traits::SaveConfigWithBasePath, EcosystemConfig}; pub fn run(args: ChangeDefaultChain, shell: &Shell) -> anyhow::Result<()> { let mut ecosystem_config = EcosystemConfig::from_file(shell)?; diff --git a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/create.rs b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/create.rs index 7bce12a5a40e..2c254326bedb 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/create.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/create.rs @@ -1,8 +1,15 @@ -use std::path::Path; -use std::{path::PathBuf, str::FromStr}; +use std::{ + path::{Path, PathBuf}, + str::FromStr, +}; use anyhow::bail; use common::{cmd::Cmd, logger, spinner::Spinner}; +use config::{ + create_local_configs_dir, create_wallets, get_default_era_chain_id, + traits::SaveConfigWithBasePath, EcosystemConfig, EcosystemConfigFromFileError, + ZKSYNC_ERA_GIT_REPO, +}; use xshell::{cmd, Shell}; use crate::commands::{ @@ -13,11 +20,6 @@ use crate::commands::{ create_configs::{create_erc20_deployment_config, create_initial_deployments_config}, }, }; -use config::traits::SaveConfigWithBasePath; -use config::{ - create_local_configs_dir, create_wallets, get_default_era_chain_id, EcosystemConfig, - EcosystemConfigFromFileError, ZKSYNC_ERA_GIT_REPO, -}; pub fn run(args: EcosystemCreateArgs, shell: &Shell) -> anyhow::Result<()> { match EcosystemConfig::from_file(shell) { diff --git a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/init.rs b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/init.rs index 28213dab1d58..5d39be48d333 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/init.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/init.rs @@ -12,20 +12,6 @@ use common::{ spinner::Spinner, Prompt, }; -use xshell::{cmd, Shell}; - -use super::args::init::{EcosystemArgsFinal, EcosystemInitArgs, EcosystemInitArgsFinal}; -use crate::{ - accept_ownership::accept_owner, - commands::{ - chain, - ecosystem::create_configs::{ - create_erc20_deployment_config, create_initial_deployments_config, - }, - }, - forge_utils::fill_forge_private_key, -}; -use crate::{consts::AMOUNT_FOR_DISTRIBUTION_TO_WALLETS, forge_utils::check_the_balance}; use config::{ forge_interface::{ deploy_ecosystem::{ @@ -43,6 +29,20 @@ use config::{ ChainConfig, ContractsConfig, EcosystemConfig, GenesisConfig, }; use types::{L1Network, ProverMode, WalletCreation}; +use xshell::{cmd, Shell}; + +use super::args::init::{EcosystemArgsFinal, EcosystemInitArgs, EcosystemInitArgsFinal}; +use crate::{ + accept_ownership::accept_owner, + commands::{ + chain, + ecosystem::create_configs::{ + create_erc20_deployment_config, create_initial_deployments_config, + }, + }, + consts::AMOUNT_FOR_DISTRIBUTION_TO_WALLETS, + forge_utils::{check_the_balance, fill_forge_private_key}, +}; pub async fn run(args: EcosystemInitArgs, shell: &Shell) -> anyhow::Result<()> { let ecosystem_config = EcosystemConfig::from_file(shell)?; diff --git a/zk_toolbox/crates/zk_inception/src/commands/server.rs b/zk_toolbox/crates/zk_inception/src/commands/server.rs index 608ca0a6fc02..49452af47b31 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/server.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/server.rs @@ -1,12 +1,12 @@ use anyhow::Context; use common::{config::global_config, logger}; +use config::{ChainConfig, EcosystemConfig}; use xshell::Shell; use crate::{ commands::args::RunServerArgs, server::{RunServer, ServerMode}, }; -use config::{ChainConfig, EcosystemConfig}; pub fn run(shell: &Shell, args: RunServerArgs) -> anyhow::Result<()> { let ecosystem_config = EcosystemConfig::from_file(shell)?; diff --git a/zk_toolbox/crates/zk_inception/src/config_manipulations.rs b/zk_toolbox/crates/zk_inception/src/config_manipulations.rs index 03eb85403e52..a5edcb7bde4a 100644 --- a/zk_toolbox/crates/zk_inception/src/config_manipulations.rs +++ b/zk_toolbox/crates/zk_inception/src/config_manipulations.rs @@ -1,6 +1,3 @@ -use xshell::Shell; - -use crate::defaults::{ROCKS_DB_STATE_KEEPER, ROCKS_DB_TREE}; use config::{ forge_interface::{ initialize_bridges::output::InitializeBridgeOutput, paymaster::DeployPaymasterOutput, @@ -10,6 +7,9 @@ use config::{ ChainConfig, ContractsConfig, DatabasesConfig, GeneralConfig, GenesisConfig, SecretsConfig, }; use types::ProverMode; +use xshell::Shell; + +use crate::defaults::{ROCKS_DB_STATE_KEEPER, ROCKS_DB_TREE}; pub(crate) fn update_genesis(shell: &Shell, config: &ChainConfig) -> anyhow::Result<()> { let mut genesis = GenesisConfig::read_with_base_path(shell, &config.configs)?; diff --git a/zk_toolbox/crates/zk_inception/src/forge_utils.rs b/zk_toolbox/crates/zk_inception/src/forge_utils.rs index 29929ddab917..5e16ef6d2814 100644 --- a/zk_toolbox/crates/zk_inception/src/forge_utils.rs +++ b/zk_toolbox/crates/zk_inception/src/forge_utils.rs @@ -1,8 +1,9 @@ -use crate::consts::MINIMUM_BALANCE_FOR_WALLET; use anyhow::anyhow; use common::forge::ForgeScript; use ethers::types::{H256, U256}; +use crate::consts::MINIMUM_BALANCE_FOR_WALLET; + pub fn fill_forge_private_key( mut forge: ForgeScript, private_key: Option, diff --git a/zk_toolbox/crates/zk_inception/src/main.rs b/zk_toolbox/crates/zk_inception/src/main.rs index 73054e42f6d2..fb815a16b15d 100644 --- a/zk_toolbox/crates/zk_inception/src/main.rs +++ b/zk_toolbox/crates/zk_inception/src/main.rs @@ -4,10 +4,10 @@ use common::{ config::{global_config, init_global_config, GlobalConfig}, init_prompt_theme, logger, }; +use config::EcosystemConfig; use xshell::Shell; use crate::commands::{args::RunServerArgs, chain::ChainCommands, ecosystem::EcosystemCommands}; -use config::EcosystemConfig; pub mod accept_ownership; mod commands;