From f56e9c245832f4ca2c94ec923dc93957b59fe776 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Sun, 13 Oct 2024 17:24:34 -0300 Subject: [PATCH 01/38] Migrate server to chain --- .github/workflows/ci-core-reusable.yml | 10 +++++----- zkstack_cli/crates/zkstack/src/commands/args/mod.rs | 2 -- .../crates/zkstack/src/commands/chain/args/mod.rs | 1 + .../src/commands/{ => chain}/args/run_server.rs | 0 zkstack_cli/crates/zkstack/src/commands/chain/mod.rs | 6 +++++- .../crates/zkstack/src/commands/{ => chain}/server.rs | 7 ++++--- zkstack_cli/crates/zkstack/src/commands/mod.rs | 1 - zkstack_cli/crates/zkstack/src/main.rs | 7 ++----- 8 files changed, 17 insertions(+), 17 deletions(-) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/args/run_server.rs (100%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/server.rs (91%) diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index 9aaa476d740d..4b9badd9b672 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -148,7 +148,7 @@ jobs: - name: Run server run: | ci_run zkstack dev config-writer --path ${{ matrix.vm_mode == 'NEW' && 'etc/env/file_based/overrides/tests/loadtest-new.yaml' || 'etc/env/file_based/overrides/tests/loadtest-old.yaml' }} --chain legacy - ci_run zkstack server --uring --chain=legacy --components api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads &>server.log & + ci_run zkstack chain server --uring --chain=legacy --components api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads &>server.log & ci_run sleep 60 - name: Perform loadtest @@ -356,10 +356,10 @@ jobs: - name: Run servers run: | - ci_run zkstack server --ignore-prerequisites --chain era &> ${{ env.SERVER_LOGS_DIR }}/rollup.log & - ci_run zkstack server --ignore-prerequisites --chain validium &> ${{ env.SERVER_LOGS_DIR }}/validium.log & - ci_run zkstack server --ignore-prerequisites --chain custom_token &> ${{ env.SERVER_LOGS_DIR }}/custom_token.log & - ci_run zkstack server --ignore-prerequisites --chain consensus \ + ci_run zkstack chain server --ignore-prerequisites --chain era &> ${{ env.SERVER_LOGS_DIR }}/rollup.log & + ci_run zkstack chain server --ignore-prerequisites --chain validium &> ${{ env.SERVER_LOGS_DIR }}/validium.log & + ci_run zkstack chain server --ignore-prerequisites --chain custom_token &> ${{ env.SERVER_LOGS_DIR }}/custom_token.log & + ci_run zkstack chain server --ignore-prerequisites --chain consensus \ --components=api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads,vm_runner_bwip,vm_playground,da_dispatcher,consensus \ &> ${{ env.SERVER_LOGS_DIR }}/consensus.log & diff --git a/zkstack_cli/crates/zkstack/src/commands/args/mod.rs b/zkstack_cli/crates/zkstack/src/commands/args/mod.rs index d18b05c910e5..1a51d60cd091 100644 --- a/zkstack_cli/crates/zkstack/src/commands/args/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/args/mod.rs @@ -1,7 +1,5 @@ pub use containers::*; -pub use run_server::*; pub use update::*; mod containers; -mod run_server; mod update; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/mod.rs index f2a5f6b8be1f..ab4580a5250f 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/mod.rs @@ -2,3 +2,4 @@ pub mod build_transactions; pub mod create; pub mod genesis; pub mod init; +pub mod run_server; diff --git a/zkstack_cli/crates/zkstack/src/commands/args/run_server.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/run_server.rs similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/args/run_server.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/args/run_server.rs diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs index c9a47616486d..c25d65d31569 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs @@ -1,6 +1,6 @@ use ::common::forge::ForgeScriptArgs; -use args::build_transactions::BuildTransactionsArgs; pub(crate) use args::create::ChainCreateArgsFinal; +use args::{build_transactions::BuildTransactionsArgs, run_server::RunServerArgs}; use clap::{command, Subcommand}; pub(crate) use create::create_chain_inner; use xshell::Shell; @@ -20,6 +20,7 @@ pub mod deploy_paymaster; pub mod genesis; pub mod init; pub mod register_chain; +mod server; mod set_token_multiplier_setter; mod setup_legacy_bridge; @@ -64,6 +65,8 @@ pub enum ChainCommands { DeployPaymaster(ForgeScriptArgs), /// Update Token Multiplier Setter address on L1 UpdateTokenMultiplierSetter(ForgeScriptArgs), + /// Run server + Server(RunServerArgs), } pub(crate) async fn run(shell: &Shell, args: ChainCommands) -> anyhow::Result<()> { @@ -93,5 +96,6 @@ pub(crate) async fn run(shell: &Shell, args: ChainCommands) -> anyhow::Result<() ChainCommands::UpdateTokenMultiplierSetter(args) => { set_token_multiplier_setter::run(args, shell).await } + ChainCommands::Server(args) => server::run(shell, args), } } diff --git a/zkstack_cli/crates/zkstack/src/commands/server.rs b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs similarity index 91% rename from zkstack_cli/crates/zkstack/src/commands/server.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/server.rs index be7a676a8252..8290e81ac3da 100644 --- a/zkstack_cli/crates/zkstack/src/commands/server.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs @@ -9,11 +9,12 @@ use config::{ }; use xshell::Shell; -use crate::{ - commands::args::RunServerArgs, - messages::{MSG_CHAIN_NOT_INITIALIZED, MSG_FAILED_TO_RUN_SERVER_ERR, MSG_STARTING_SERVER}, +use crate::messages::{ + MSG_CHAIN_NOT_INITIALIZED, MSG_FAILED_TO_RUN_SERVER_ERR, MSG_STARTING_SERVER, }; +use super::args::run_server::RunServerArgs; + pub fn run(shell: &Shell, args: RunServerArgs) -> anyhow::Result<()> { let ecosystem_config = EcosystemConfig::from_file(shell)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/mod.rs b/zkstack_cli/crates/zkstack/src/commands/mod.rs index c46400cc8657..4e094a218934 100644 --- a/zkstack_cli/crates/zkstack/src/commands/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/mod.rs @@ -9,5 +9,4 @@ pub mod explorer; pub mod external_node; pub mod portal; pub mod prover; -pub mod server; pub mod update; diff --git a/zkstack_cli/crates/zkstack/src/main.rs b/zkstack_cli/crates/zkstack/src/main.rs index 987de555ecf6..168569b39276 100644 --- a/zkstack_cli/crates/zkstack/src/main.rs +++ b/zkstack_cli/crates/zkstack/src/main.rs @@ -15,8 +15,8 @@ use config::EcosystemConfig; use xshell::Shell; use crate::commands::{ - args::RunServerArgs, chain::ChainCommands, consensus, ecosystem::EcosystemCommands, - explorer::ExplorerCommands, external_node::ExternalNodeCommands, prover::ProverCommands, + chain::ChainCommands, consensus, ecosystem::EcosystemCommands, explorer::ExplorerCommands, + external_node::ExternalNodeCommands, prover::ProverCommands, }; pub mod accept_ownership; @@ -53,8 +53,6 @@ pub enum InceptionSubcommands { /// Prover related commands #[command(subcommand, alias = "p")] Prover(ProverCommands), - /// Run server - Server(RunServerArgs), /// External Node related commands #[command(subcommand, alias = "en")] ExternalNode(ExternalNodeCommands), @@ -129,7 +127,6 @@ async fn run_subcommand(inception_args: Inception, shell: &Shell) -> anyhow::Res InceptionSubcommands::Chain(args) => commands::chain::run(shell, *args).await?, InceptionSubcommands::Dev(args) => commands::dev::run(shell, args).await?, InceptionSubcommands::Prover(args) => commands::prover::run(shell, args).await?, - InceptionSubcommands::Server(args) => commands::server::run(shell, args)?, InceptionSubcommands::Containers(args) => commands::containers::run(shell, args)?, InceptionSubcommands::ExternalNode(args) => { commands::external_node::run(shell, args).await? From 409e768529da5730f0c3ae6eed1a184ff9838822 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Sun, 13 Oct 2024 17:47:48 -0300 Subject: [PATCH 02/38] Migrate contract verifier to chain --- .github/workflows/ci-core-reusable.yml | 4 ++-- .../commands/{ => chain}/contract_verifier/args/init.rs | 0 .../commands/{ => chain}/contract_verifier/args/mod.rs | 0 .../{ => chain}/contract_verifier/args/releases.rs | 0 .../src/commands/{ => chain}/contract_verifier/init.rs | 5 +++-- .../src/commands/{ => chain}/contract_verifier/mod.rs | 8 ++++---- .../src/commands/{ => chain}/contract_verifier/run.rs | 0 zkstack_cli/crates/zkstack/src/commands/chain/mod.rs | 6 ++++++ zkstack_cli/crates/zkstack/src/commands/mod.rs | 1 - zkstack_cli/crates/zkstack/src/main.rs | 7 ------- 10 files changed, 15 insertions(+), 16 deletions(-) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/contract_verifier/args/init.rs (100%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/contract_verifier/args/mod.rs (100%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/contract_verifier/args/releases.rs (100%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/contract_verifier/init.rs (96%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/contract_verifier/mod.rs (90%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/contract_verifier/run.rs (100%) diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index 4b9badd9b672..3108a5476fe8 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -351,8 +351,8 @@ jobs: - name: Initialize Contract verifier run: | - ci_run zkstack contract-verifier init --zksolc-version=v1.5.3 --zkvyper-version=v1.5.4 --solc-version=0.8.26 --vyper-version=v0.3.10 --era-vm-solc-version=0.8.26-1.0.1 --only --chain era - ci_run zkstack contract-verifier run --chain era &> ${{ env.SERVER_LOGS_DIR }}/contract-verifier-rollup.log & + ci_run zkstack chain contract-verifier init --zksolc-version=v1.5.3 --zkvyper-version=v1.5.4 --solc-version=0.8.26 --vyper-version=v0.3.10 --era-vm-solc-version=0.8.26-1.0.1 --only --chain era + ci_run zkstack chain contract-verifier run --chain era &> ${{ env.SERVER_LOGS_DIR }}/contract-verifier-rollup.log & - name: Run servers run: | diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/init.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/args/init.rs similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/init.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/args/init.rs diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/args/mod.rs similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/mod.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/args/mod.rs diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/releases.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/args/releases.rs similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/releases.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/args/releases.rs diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/init.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs similarity index 96% rename from zkstack_cli/crates/zkstack/src/commands/contract_verifier/init.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs index b173ad9bbb7f..56ae459b4dd9 100644 --- a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs @@ -4,10 +4,11 @@ use common::{cmd::Cmd, logger, spinner::Spinner}; use config::EcosystemConfig; use xshell::{cmd, Shell}; -use super::args::{init::InitContractVerifierArgs, releases::Version}; use crate::messages::{msg_binary_already_exists, msg_downloading_binary_spinner}; -pub(crate) async fn run(shell: &Shell, args: InitContractVerifierArgs) -> anyhow::Result<()> { +use super::args::{init::InitContractVerifierArgs, releases::Version}; + +pub(crate) fn run(shell: &Shell, args: InitContractVerifierArgs) -> anyhow::Result<()> { let args = args.fill_values_with_prompt(shell)?; let ecosystem = EcosystemConfig::from_file(shell)?; let link_to_code = ecosystem.link_to_code; diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs similarity index 90% rename from zkstack_cli/crates/zkstack/src/commands/contract_verifier/mod.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs index 78bdc5fae7ec..3e3d9b266e84 100644 --- a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs @@ -2,9 +2,9 @@ use args::init::InitContractVerifierArgs; use clap::Subcommand; use xshell::Shell; -pub mod args; -pub mod init; -pub mod run; +mod args; +mod init; +mod run; #[derive(Subcommand, Debug)] pub enum ContractVerifierCommands { @@ -17,6 +17,6 @@ pub enum ContractVerifierCommands { pub(crate) async fn run(shell: &Shell, args: ContractVerifierCommands) -> anyhow::Result<()> { match args { ContractVerifierCommands::Run => run::run(shell).await, - ContractVerifierCommands::Init(args) => init::run(shell, args).await, + ContractVerifierCommands::Init(args) => init::run(shell, args), } } diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/run.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/contract_verifier/run.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs index c25d65d31569..34961efb235c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs @@ -2,6 +2,7 @@ use ::common::forge::ForgeScriptArgs; pub(crate) use args::create::ChainCreateArgsFinal; use args::{build_transactions::BuildTransactionsArgs, run_server::RunServerArgs}; use clap::{command, Subcommand}; +use contract_verifier::ContractVerifierCommands; pub(crate) use create::create_chain_inner; use xshell::Shell; @@ -14,6 +15,7 @@ mod accept_chain_ownership; pub(crate) mod args; mod build_transactions; mod common; +pub mod contract_verifier; mod create; pub mod deploy_l2_contracts; pub mod deploy_paymaster; @@ -67,6 +69,9 @@ pub enum ChainCommands { UpdateTokenMultiplierSetter(ForgeScriptArgs), /// Run server Server(RunServerArgs), + /// Run contract verifier + #[command(subcommand)] + ContractVerifier(ContractVerifierCommands), } pub(crate) async fn run(shell: &Shell, args: ChainCommands) -> anyhow::Result<()> { @@ -97,5 +102,6 @@ pub(crate) async fn run(shell: &Shell, args: ChainCommands) -> anyhow::Result<() set_token_multiplier_setter::run(args, shell).await } ChainCommands::Server(args) => server::run(shell, args), + ChainCommands::ContractVerifier(args) => contract_verifier::run(shell, args).await, } } diff --git a/zkstack_cli/crates/zkstack/src/commands/mod.rs b/zkstack_cli/crates/zkstack/src/commands/mod.rs index 4e094a218934..c5fcfeb40e39 100644 --- a/zkstack_cli/crates/zkstack/src/commands/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/mod.rs @@ -2,7 +2,6 @@ pub mod args; pub mod chain; pub mod consensus; pub mod containers; -pub mod contract_verifier; pub mod dev; pub mod ecosystem; pub mod explorer; diff --git a/zkstack_cli/crates/zkstack/src/main.rs b/zkstack_cli/crates/zkstack/src/main.rs index 168569b39276..01ce6c22d011 100644 --- a/zkstack_cli/crates/zkstack/src/main.rs +++ b/zkstack_cli/crates/zkstack/src/main.rs @@ -1,7 +1,6 @@ use clap::{command, Parser, Subcommand}; use commands::{ args::{ContainersArgs, UpdateArgs}, - contract_verifier::ContractVerifierCommands, dev::DevCommands, }; use common::{ @@ -59,9 +58,6 @@ pub enum InceptionSubcommands { /// Run containers for local development #[command(alias = "up")] Containers(ContainersArgs), - /// Run contract verifier - #[command(subcommand)] - ContractVerifier(ContractVerifierCommands), /// Run dapp-portal Portal, /// Run block-explorer @@ -131,9 +127,6 @@ async fn run_subcommand(inception_args: Inception, shell: &Shell) -> anyhow::Res InceptionSubcommands::ExternalNode(args) => { commands::external_node::run(shell, args).await? } - InceptionSubcommands::ContractVerifier(args) => { - commands::contract_verifier::run(shell, args).await? - } InceptionSubcommands::Explorer(args) => commands::explorer::run(shell, args).await?, InceptionSubcommands::Consensus(cmd) => cmd.run(shell).await?, InceptionSubcommands::Portal => commands::portal::run(shell).await?, From 2d4f8fc4bc20971dfefe1621d7c5996931ee5b57 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Sun, 13 Oct 2024 18:08:46 -0300 Subject: [PATCH 03/38] Migrate consensus to chain --- .github/workflows/ci-core-reusable.yml | 2 +- zkstack_cli/crates/zkstack/build.rs | 2 +- .../zkstack/src/commands/{ => chain}/consensus/conv.rs | 0 .../zkstack/src/commands/{ => chain}/consensus/mod.rs | 0 .../src/commands/{ => chain}/consensus/proto/mod.proto | 0 .../src/commands/{ => chain}/consensus/proto/mod.rs | 0 .../zkstack/src/commands/{ => chain}/consensus/tests.rs | 0 zkstack_cli/crates/zkstack/src/commands/chain/mod.rs | 8 ++++++-- zkstack_cli/crates/zkstack/src/commands/mod.rs | 1 - zkstack_cli/crates/zkstack/src/main.rs | 5 +---- 10 files changed, 9 insertions(+), 9 deletions(-) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/consensus/conv.rs (100%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/consensus/mod.rs (100%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/consensus/proto/mod.proto (100%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/consensus/proto/mod.rs (100%) rename zkstack_cli/crates/zkstack/src/commands/{ => chain}/consensus/tests.rs (100%) diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index 3108a5476fe8..35bf4d9a390d 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -367,7 +367,7 @@ jobs: - name: Setup attester committee for the consensus chain run: | - ci_run zkstack consensus set-attester-committee --chain consensus --from-genesis &> ${{ env.INTEGRATION_TESTS_LOGS_DIR }}/consensus.log + ci_run zkstack chain consensus set-attester-committee --chain consensus --from-genesis &> ${{ env.INTEGRATION_TESTS_LOGS_DIR }}/consensus.log - name: Run integration tests run: | diff --git a/zkstack_cli/crates/zkstack/build.rs b/zkstack_cli/crates/zkstack/build.rs index 92f34a542b7f..17a5c6e6fe23 100644 --- a/zkstack_cli/crates/zkstack/build.rs +++ b/zkstack_cli/crates/zkstack/build.rs @@ -9,7 +9,7 @@ fn main() -> eyre::Result<()> { .write_to_file(outdir.join("consensus_registry_abi.rs"))?; zksync_protobuf_build::Config { - input_root: "src/commands/consensus/proto".into(), + input_root: "src/commands/chain/consensus/proto".into(), proto_root: "zksync/toolbox/consensus".into(), dependencies: vec!["::zksync_protobuf_config::proto".parse().unwrap()], protobuf_crate: "::zksync_protobuf".parse().unwrap(), diff --git a/zkstack_cli/crates/zkstack/src/commands/consensus/conv.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/conv.rs similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/consensus/conv.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/consensus/conv.rs diff --git a/zkstack_cli/crates/zkstack/src/commands/consensus/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/consensus/mod.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs diff --git a/zkstack_cli/crates/zkstack/src/commands/consensus/proto/mod.proto b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/proto/mod.proto similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/consensus/proto/mod.proto rename to zkstack_cli/crates/zkstack/src/commands/chain/consensus/proto/mod.proto diff --git a/zkstack_cli/crates/zkstack/src/commands/consensus/proto/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/proto/mod.rs similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/consensus/proto/mod.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/consensus/proto/mod.rs diff --git a/zkstack_cli/crates/zkstack/src/commands/consensus/tests.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/tests.rs similarity index 100% rename from zkstack_cli/crates/zkstack/src/commands/consensus/tests.rs rename to zkstack_cli/crates/zkstack/src/commands/chain/consensus/tests.rs diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs index 34961efb235c..e99d76d56bd5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs @@ -15,6 +15,7 @@ mod accept_chain_ownership; pub(crate) mod args; mod build_transactions; mod common; +mod consensus; pub mod contract_verifier; mod create; pub mod deploy_l2_contracts; @@ -72,10 +73,12 @@ pub enum ChainCommands { /// Run contract verifier #[command(subcommand)] ContractVerifier(ContractVerifierCommands), + #[command(subcommand)] + Consensus(consensus::Command), } -pub(crate) async fn run(shell: &Shell, args: ChainCommands) -> anyhow::Result<()> { - match args { +pub(crate) async fn run(shell: &Shell, cmd: ChainCommands) -> anyhow::Result<()> { + match cmd { ChainCommands::Create(args) => create::run(args, shell), ChainCommands::Init(args) => init::run(*args, shell).await, ChainCommands::BuildTransactions(args) => build_transactions::run(args, shell).await, @@ -103,5 +106,6 @@ pub(crate) async fn run(shell: &Shell, args: ChainCommands) -> anyhow::Result<() } ChainCommands::Server(args) => server::run(shell, args), ChainCommands::ContractVerifier(args) => contract_verifier::run(shell, args).await, + ChainCommands::Consensus(cmd) => cmd.run(shell).await, } } diff --git a/zkstack_cli/crates/zkstack/src/commands/mod.rs b/zkstack_cli/crates/zkstack/src/commands/mod.rs index c5fcfeb40e39..ac751ddcf91d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/mod.rs @@ -1,6 +1,5 @@ pub mod args; pub mod chain; -pub mod consensus; pub mod containers; pub mod dev; pub mod ecosystem; diff --git a/zkstack_cli/crates/zkstack/src/main.rs b/zkstack_cli/crates/zkstack/src/main.rs index 01ce6c22d011..e45c5a3afe85 100644 --- a/zkstack_cli/crates/zkstack/src/main.rs +++ b/zkstack_cli/crates/zkstack/src/main.rs @@ -14,7 +14,7 @@ use config::EcosystemConfig; use xshell::Shell; use crate::commands::{ - chain::ChainCommands, consensus, ecosystem::EcosystemCommands, explorer::ExplorerCommands, + chain::ChainCommands, ecosystem::EcosystemCommands, explorer::ExplorerCommands, external_node::ExternalNodeCommands, prover::ProverCommands, }; @@ -64,8 +64,6 @@ pub enum InceptionSubcommands { #[command(subcommand)] Explorer(ExplorerCommands), /// Update ZKsync - #[command(subcommand)] - Consensus(consensus::Command), #[command(alias = "u")] Update(UpdateArgs), #[command(hide = true)] @@ -128,7 +126,6 @@ async fn run_subcommand(inception_args: Inception, shell: &Shell) -> anyhow::Res commands::external_node::run(shell, args).await? } InceptionSubcommands::Explorer(args) => commands::explorer::run(shell, args).await?, - InceptionSubcommands::Consensus(cmd) => cmd.run(shell).await?, InceptionSubcommands::Portal => commands::portal::run(shell).await?, InceptionSubcommands::Update(args) => commands::update::run(shell, args).await?, InceptionSubcommands::Markdown => { From ba8b707c6a54622a28082ad4a03cb770f1530eb0 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Sun, 13 Oct 2024 18:13:00 -0300 Subject: [PATCH 04/38] fmt --- .../zkstack/src/commands/chain/contract_verifier/init.rs | 3 +-- zkstack_cli/crates/zkstack/src/commands/chain/server.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs index 56ae459b4dd9..823f31551713 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs @@ -4,9 +4,8 @@ use common::{cmd::Cmd, logger, spinner::Spinner}; use config::EcosystemConfig; use xshell::{cmd, Shell}; -use crate::messages::{msg_binary_already_exists, msg_downloading_binary_spinner}; - use super::args::{init::InitContractVerifierArgs, releases::Version}; +use crate::messages::{msg_binary_already_exists, msg_downloading_binary_spinner}; pub(crate) fn run(shell: &Shell, args: InitContractVerifierArgs) -> anyhow::Result<()> { let args = args.fill_values_with_prompt(shell)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/server.rs b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs index 8290e81ac3da..51e994844eba 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/server.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs @@ -9,12 +9,11 @@ use config::{ }; use xshell::Shell; +use super::args::run_server::RunServerArgs; use crate::messages::{ MSG_CHAIN_NOT_INITIALIZED, MSG_FAILED_TO_RUN_SERVER_ERR, MSG_STARTING_SERVER, }; -use super::args::run_server::RunServerArgs; - pub fn run(shell: &Shell, args: RunServerArgs) -> anyhow::Result<()> { let ecosystem_config = EcosystemConfig::from_file(shell)?; From 8d238d5907310c01fef47579068294cb38ad9cd9 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Sun, 13 Oct 2024 19:37:09 -0300 Subject: [PATCH 05/38] Fix consensus proto --- .../crates/zkstack/src/commands/chain/consensus/proto/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/proto/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/proto/mod.rs index 61a0a047f0a9..1fe69ac251cb 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/proto/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/proto/mod.rs @@ -2,5 +2,5 @@ include!(concat!( env!("OUT_DIR"), - "/src/commands/consensus/proto/gen.rs" + "/src/commands/chain/consensus/proto/gen.rs" )); From 5b314a63871a4afbf049a582a30f8870d6e095fa Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 15 Oct 2024 10:00:58 -0300 Subject: [PATCH 06/38] Fix consensus command --- .../zkstack/src/commands/chain/consensus/mod.rs | 13 +++++++------ .../crates/zkstack/src/commands/chain/mod.rs | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs index 1855a5943dc7..8e8a6ec0e4e9 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs @@ -3,6 +3,7 @@ use std::{borrow::Borrow, collections::HashMap, path::PathBuf, sync::Arc}; /// Consensus registry contract operations. /// Includes code duplicated from `zksync_node_consensus::registry::abi`. use anyhow::Context as _; +use clap::Parser; use common::{logger, wallets::Wallet}; use config::EcosystemConfig; use conv::*; @@ -71,9 +72,9 @@ fn encode_validator_pop(pop: &validator::ProofOfPossession) -> abi::Bls12381Sign } } -#[derive(clap::Args, Debug)] +#[derive(Debug, Clone, Parser, Default)] #[group(required = true, multiple = false)] -pub struct SetAttesterCommitteeCommand { +pub struct SetAttesterCommitteeArgs { /// Sets the attester committee in the consensus registry contract to /// `consensus.genesis_spec.attesters` in general.yaml. #[clap(long)] @@ -86,10 +87,10 @@ pub struct SetAttesterCommitteeCommand { } #[derive(clap::Subcommand, Debug)] -pub enum Command { +pub enum ConsensusCommand { /// Sets the attester committee in the consensus registry contract to /// `consensus.genesis_spec.attesters` in general.yaml. - SetAttesterCommittee(SetAttesterCommitteeCommand), + SetAttesterCommittee(SetAttesterCommitteeArgs), /// Fetches the attester committee from the consensus registry contract. GetAttesterCommittee, } @@ -249,7 +250,7 @@ impl Setup { fn read_attester_committee( &self, - opts: &SetAttesterCommitteeCommand, + opts: &SetAttesterCommitteeArgs, ) -> anyhow::Result { // Fetch the desired state. if let Some(path) = &opts.from_file { @@ -390,7 +391,7 @@ impl Setup { } } -impl Command { +impl ConsensusCommand { pub(crate) async fn run(self, shell: &Shell) -> anyhow::Result<()> { let setup = Setup::new(shell).context("Setup::new()")?; match self { diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs index e99d76d56bd5..60129f850e03 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs @@ -2,6 +2,7 @@ use ::common::forge::ForgeScriptArgs; pub(crate) use args::create::ChainCreateArgsFinal; use args::{build_transactions::BuildTransactionsArgs, run_server::RunServerArgs}; use clap::{command, Subcommand}; +use consensus::ConsensusCommand; use contract_verifier::ContractVerifierCommands; pub(crate) use create::create_chain_inner; use xshell::Shell; @@ -55,7 +56,6 @@ pub enum ChainCommands { #[command(alias = "bridge")] InitializeBridges(ForgeScriptArgs), /// Deploy L2 consensus registry - #[command(alias = "consensus")] DeployConsensusRegistry(ForgeScriptArgs), /// Deploy L2 multicall3 #[command(alias = "multicall3")] @@ -74,7 +74,7 @@ pub enum ChainCommands { #[command(subcommand)] ContractVerifier(ContractVerifierCommands), #[command(subcommand)] - Consensus(consensus::Command), + Consensus(ConsensusCommand), } pub(crate) async fn run(shell: &Shell, cmd: ChainCommands) -> anyhow::Result<()> { From 8f7d9f7c5a29aef9e5b87644b13f0a60c0fb355a Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 15 Oct 2024 20:19:54 -0300 Subject: [PATCH 07/38] Add ZkStackConfig enum --- zkstack_cli/crates/config/src/chain.rs | 28 ++++++++++++++++++- zkstack_cli/crates/config/src/ecosystem.rs | 15 +--------- zkstack_cli/crates/config/src/lib.rs | 2 ++ zkstack_cli/crates/config/src/utils.rs | 17 +++++++++++ .../crates/config/src/zkstack_config.rs | 19 +++++++++++++ 5 files changed, 66 insertions(+), 15 deletions(-) create mode 100644 zkstack_cli/crates/config/src/utils.rs create mode 100644 zkstack_cli/crates/config/src/zkstack_config.rs diff --git a/zkstack_cli/crates/config/src/chain.rs b/zkstack_cli/crates/config/src/chain.rs index 6c82d6ef3c37..75fe18dd86b0 100644 --- a/zkstack_cli/crates/config/src/chain.rs +++ b/zkstack_cli/crates/config/src/chain.rs @@ -3,6 +3,7 @@ use std::{ path::{Path, PathBuf}, }; +use anyhow::bail; use serde::{Deserialize, Serialize, Serializer}; use types::{BaseToken, L1BatchCommitmentMode, L1Network, ProverMode, WalletCreation}; use xshell::Shell; @@ -18,7 +19,8 @@ use crate::{ FileConfigWithDefaultName, ReadConfig, ReadConfigWithBasePath, SaveConfig, SaveConfigWithBasePath, ZkStackConfig, }, - ContractsConfig, GeneralConfig, GenesisConfig, SecretsConfig, WalletsConfig, + utils::find_file, + ContractsConfig, EcosystemConfig, GeneralConfig, GenesisConfig, SecretsConfig, WalletsConfig, }; /// Chain configuration file. This file is created in the chain @@ -33,6 +35,7 @@ pub struct ChainConfigInternal { pub prover_version: ProverMode, pub configs: PathBuf, pub rocks_db_path: PathBuf, + pub l1_network: Option, pub external_node_config_path: Option, pub artifacts_path: Option, pub l1_batch_commit_data_generator_mode: L1BatchCommitmentMode, @@ -153,6 +156,7 @@ impl ChainConfig { rocks_db_path: self.rocks_db_path.clone(), external_node_config_path: self.external_node_config_path.clone(), artifacts_path: Some(self.artifacts.clone()), + l1_network: Some(self.l1_network), l1_batch_commit_data_generator_mode: self.l1_batch_commit_data_generator_mode, base_token: self.base_token.clone(), wallet_creation: self.wallet_creation, @@ -161,6 +165,28 @@ impl ChainConfig { } } +impl ChainConfigInternal { + pub fn from_file(shell: &Shell) -> anyhow::Result { + let Ok(path) = find_file(shell, shell.current_dir(), CONFIG_NAME) else { + bail!("Chain config not found") + }; + + shell.change_dir(&path); + + match ChainConfigInternal::read(shell, CONFIG_NAME) { + Ok(config) => Ok(config), + Err(err) => { + if let Ok(ecosystem) = EcosystemConfig::read(shell, CONFIG_NAME) { + let chain = ecosystem.load_current_chain()?; + Ok(chain.get_internal()) + } else { + Err(err) + } + } + } + } +} + impl FileConfigWithDefaultName for ChainConfigInternal { const FILE_NAME: &'static str = CONFIG_NAME; } diff --git a/zkstack_cli/crates/config/src/ecosystem.rs b/zkstack_cli/crates/config/src/ecosystem.rs index 79cb1c4ea27d..510b9e3101ab 100644 --- a/zkstack_cli/crates/config/src/ecosystem.rs +++ b/zkstack_cli/crates/config/src/ecosystem.rs @@ -22,6 +22,7 @@ use crate::{ output::{ERC20Tokens, Erc20Token}, }, traits::{FileConfigWithDefaultName, ReadConfig, SaveConfig, ZkStackConfig}, + utils::find_file, ChainConfig, ChainConfigInternal, ContractsConfig, WalletsConfig, }; @@ -282,20 +283,6 @@ pub fn get_default_era_chain_id() -> L2ChainId { L2ChainId::from(ERA_CHAIN_ID) } -// Find file in all parents repository and return necessary path or an empty error if nothing has been found -fn find_file(shell: &Shell, path_buf: PathBuf, file_name: &str) -> Result { - let _dir = shell.push_dir(path_buf); - if shell.path_exists(file_name) { - Ok(shell.current_dir()) - } else { - let current_dir = shell.current_dir(); - let Some(path) = current_dir.parent() else { - return Err(()); - }; - find_file(shell, path.to_path_buf(), file_name) - } -} - pub fn get_link_to_prover(config: &EcosystemConfig) -> PathBuf { let link_to_code = config.link_to_code.clone(); let mut link_to_prover = link_to_code.into_os_string(); diff --git a/zkstack_cli/crates/config/src/lib.rs b/zkstack_cli/crates/config/src/lib.rs index b449aefe3a26..2c3fb70776e8 100644 --- a/zkstack_cli/crates/config/src/lib.rs +++ b/zkstack_cli/crates/config/src/lib.rs @@ -22,8 +22,10 @@ mod general; mod genesis; mod manipulations; mod secrets; +mod utils; mod wallet_creation; mod wallets; +mod zkstack_config; pub mod consensus_config; pub mod consensus_secrets; diff --git a/zkstack_cli/crates/config/src/utils.rs b/zkstack_cli/crates/config/src/utils.rs new file mode 100644 index 000000000000..63cf2cf601f5 --- /dev/null +++ b/zkstack_cli/crates/config/src/utils.rs @@ -0,0 +1,17 @@ +use std::path::PathBuf; + +use xshell::Shell; + +// Find file in all parents repository and return necessary path or an empty error if nothing has been found +pub fn find_file(shell: &Shell, path_buf: PathBuf, file_name: &str) -> Result { + let _dir = shell.push_dir(path_buf); + if shell.path_exists(file_name) { + Ok(shell.current_dir()) + } else { + let current_dir = shell.current_dir(); + let Some(path) = current_dir.parent() else { + return Err(()); + }; + find_file(shell, path.to_path_buf(), file_name) + } +} diff --git a/zkstack_cli/crates/config/src/zkstack_config.rs b/zkstack_cli/crates/config/src/zkstack_config.rs new file mode 100644 index 000000000000..3b4a38e07481 --- /dev/null +++ b/zkstack_cli/crates/config/src/zkstack_config.rs @@ -0,0 +1,19 @@ +use xshell::Shell; + +use crate::{ChainConfigInternal, EcosystemConfig}; + +pub enum ZkStackConfig { + EcosystemConfig(EcosystemConfig), + ChainConfig(ChainConfigInternal), +} + +impl ZkStackConfig { + pub fn from_file(shell: &Shell) -> anyhow::Result { + if let Ok(ecosystem) = EcosystemConfig::from_file(shell) { + Ok(ZkStackConfig::EcosystemConfig(ecosystem)) + } else { + let chain = ChainConfigInternal::from_file(shell)?; + Ok(ZkStackConfig::ChainConfig(chain)) + } + } +} From ca2f0e8a5b559881521f492efac256e3690fa256 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 15 Oct 2024 20:21:56 -0300 Subject: [PATCH 08/38] fmt --- zkstack_cli/crates/config/src/chain.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zkstack_cli/crates/config/src/chain.rs b/zkstack_cli/crates/config/src/chain.rs index 75fe18dd86b0..134e625370b0 100644 --- a/zkstack_cli/crates/config/src/chain.rs +++ b/zkstack_cli/crates/config/src/chain.rs @@ -100,6 +100,7 @@ impl ChainConfig { } anyhow::bail!("Wallets configs has not been found"); } + pub fn get_contracts_config(&self) -> anyhow::Result { ContractsConfig::read_with_base_path(self.get_shell(), &self.configs) } From 8f046fd049a8ff0a21bb74a46a2a888cfa9b3ba3 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 17 Oct 2024 10:26:17 -0300 Subject: [PATCH 09/38] Refactor deploy paymaster --- zkstack_cli/crates/config/src/chain.rs | 2 + zkstack_cli/crates/config/src/lib.rs | 2 +- .../crates/config/src/zkstack_config.rs | 47 +++++++++++++++++-- .../src/commands/chain/deploy_paymaster.rs | 9 ++-- 4 files changed, 50 insertions(+), 10 deletions(-) diff --git a/zkstack_cli/crates/config/src/chain.rs b/zkstack_cli/crates/config/src/chain.rs index 134e625370b0..f1983fd92ecc 100644 --- a/zkstack_cli/crates/config/src/chain.rs +++ b/zkstack_cli/crates/config/src/chain.rs @@ -36,6 +36,7 @@ pub struct ChainConfigInternal { pub configs: PathBuf, pub rocks_db_path: PathBuf, pub l1_network: Option, + pub link_to_code: Option, pub external_node_config_path: Option, pub artifacts_path: Option, pub l1_batch_commit_data_generator_mode: L1BatchCommitmentMode, @@ -158,6 +159,7 @@ impl ChainConfig { external_node_config_path: self.external_node_config_path.clone(), artifacts_path: Some(self.artifacts.clone()), l1_network: Some(self.l1_network), + link_to_code: Some(self.link_to_code.clone()), l1_batch_commit_data_generator_mode: self.l1_batch_commit_data_generator_mode, base_token: self.base_token.clone(), wallet_creation: self.wallet_creation, diff --git a/zkstack_cli/crates/config/src/lib.rs b/zkstack_cli/crates/config/src/lib.rs index 2c3fb70776e8..f3001fd55f8d 100644 --- a/zkstack_cli/crates/config/src/lib.rs +++ b/zkstack_cli/crates/config/src/lib.rs @@ -25,7 +25,6 @@ mod secrets; mod utils; mod wallet_creation; mod wallets; -mod zkstack_config; pub mod consensus_config; pub mod consensus_secrets; @@ -36,3 +35,4 @@ pub mod external_node; pub mod forge_interface; pub mod portal; pub mod traits; +pub mod zkstack_config; diff --git a/zkstack_cli/crates/config/src/zkstack_config.rs b/zkstack_cli/crates/config/src/zkstack_config.rs index 3b4a38e07481..60136721e3e0 100644 --- a/zkstack_cli/crates/config/src/zkstack_config.rs +++ b/zkstack_cli/crates/config/src/zkstack_config.rs @@ -1,19 +1,58 @@ +use anyhow::Context; use xshell::Shell; -use crate::{ChainConfigInternal, EcosystemConfig}; +use crate::{ChainConfig, ChainConfigInternal, EcosystemConfig}; pub enum ZkStackConfig { EcosystemConfig(EcosystemConfig), - ChainConfig(ChainConfigInternal), + ChainConfig(ChainConfig), } impl ZkStackConfig { - pub fn from_file(shell: &Shell) -> anyhow::Result { + fn from_file(shell: &Shell) -> anyhow::Result { if let Ok(ecosystem) = EcosystemConfig::from_file(shell) { Ok(ZkStackConfig::EcosystemConfig(ecosystem)) } else { - let chain = ChainConfigInternal::from_file(shell)?; + let chain_internal = ChainConfigInternal::from_file(shell)?; + + let l1_network = chain_internal.l1_network.context("L1 Network not found")?; + let link_to_code = chain_internal + .link_to_code + .context("Link to code not found")?; + let artifacts = chain_internal + .artifacts_path + .context("Artifacts path not found")?; + + let chain = ChainConfig { + id: chain_internal.id, + name: chain_internal.name, + chain_id: chain_internal.chain_id, + prover_version: chain_internal.prover_version, + configs: chain_internal.configs, + rocks_db_path: chain_internal.rocks_db_path, + external_node_config_path: chain_internal.external_node_config_path, + l1_network, + l1_batch_commit_data_generator_mode: chain_internal + .l1_batch_commit_data_generator_mode, + base_token: chain_internal.base_token, + wallet_creation: chain_internal.wallet_creation, + legacy_bridge: chain_internal.legacy_bridge, + link_to_code, + artifacts, + shell: shell.clone().into(), + }; + Ok(ZkStackConfig::ChainConfig(chain)) } } + + pub fn load_current_chain(shell: &Shell) -> anyhow::Result { + match ZkStackConfig::from_file(shell)? { + ZkStackConfig::EcosystemConfig(ecosystem) => { + let chain_name = ecosystem.current_chain(); + ecosystem.load_chain(Some(chain_name.to_string())) + } + ZkStackConfig::ChainConfig(chain) => Ok(chain), + } + } } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs index 4a93fcc089f8..e2dd32c46e16 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs @@ -6,7 +6,8 @@ use config::{ script_params::DEPLOY_PAYMASTER_SCRIPT_PARAMS, }, traits::{ReadConfig, SaveConfig, SaveConfigWithBasePath}, - ChainConfig, ContractsConfig, EcosystemConfig, + zkstack_config::ZkStackConfig, + ChainConfig, ContractsConfig, }; use xshell::Shell; @@ -16,10 +17,8 @@ use crate::{ }; pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; - let chain_config = ecosystem_config - .load_current_chain() - .context(MSG_CHAIN_NOT_INITIALIZED)?; + let chain_config = + ZkStackConfig::load_current_chain(shell).context(MSG_CHAIN_NOT_INITIALIZED)?; let mut contracts = chain_config.get_contracts_config()?; deploy_paymaster(shell, &chain_config, &mut contracts, args, None, true).await?; contracts.save_with_base_path(shell, chain_config.configs) From 62e69be5f6a16d3f28c3d88d2046f5178895ac91 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 17 Oct 2024 11:04:38 -0300 Subject: [PATCH 10/38] Refactor chain commands --- .../zkstack/src/commands/chain/consensus/mod.rs | 13 ++++++------- .../src/commands/chain/contract_verifier/init.rs | 6 +++--- .../src/commands/chain/contract_verifier/run.rs | 10 ++++------ .../zkstack/src/commands/chain/genesis/database.rs | 12 ++++-------- .../zkstack/src/commands/chain/genesis/mod.rs | 12 ++++-------- .../zkstack/src/commands/chain/genesis/server.rs | 10 +++------- .../crates/zkstack/src/commands/chain/server.rs | 12 +++--------- 7 files changed, 27 insertions(+), 48 deletions(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs index 8e8a6ec0e4e9..4894f0b2551a 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs @@ -5,7 +5,7 @@ use std::{borrow::Borrow, collections::HashMap, path::PathBuf, sync::Arc}; use anyhow::Context as _; use clap::Parser; use common::{logger, wallets::Wallet}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use conv::*; use ethers::{ abi::Detokenize, @@ -19,7 +19,10 @@ use xshell::Shell; use zksync_consensus_crypto::ByteFmt; use zksync_consensus_roles::{attester, validator}; -use crate::{messages, utils::consensus::parse_attester_committee}; +use crate::{ + messages::{self}, + utils::consensus::parse_attester_committee, +}; mod conv; mod proto; @@ -193,11 +196,7 @@ impl Setup { } fn new(shell: &Shell) -> anyhow::Result { - let ecosystem_config = - EcosystemConfig::from_file(shell).context("EcosystemConfig::from_file()")?; - let chain = ecosystem_config - .load_current_chain() - .context(messages::MSG_CHAIN_NOT_INITIALIZED)?; + let chain = ZkStackConfig::load_current_chain(shell)?; let contracts = chain .get_contracts_config() .context("get_contracts_config()")?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs index 823f31551713..ffa2bfd470b8 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs @@ -1,7 +1,7 @@ use std::path::{Path, PathBuf}; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use super::args::{init::InitContractVerifierArgs, releases::Version}; @@ -9,8 +9,8 @@ use crate::messages::{msg_binary_already_exists, msg_downloading_binary_spinner} pub(crate) fn run(shell: &Shell, args: InitContractVerifierArgs) -> anyhow::Result<()> { let args = args.fill_values_with_prompt(shell)?; - let ecosystem = EcosystemConfig::from_file(shell)?; - let link_to_code = ecosystem.link_to_code; + let chain = ZkStackConfig::load_current_chain(shell)?; + let link_to_code = chain.link_to_code; download_binaries( shell, diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs index 9913ec817e90..ea3245a2e51d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs @@ -1,17 +1,15 @@ use anyhow::Context; use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use crate::messages::{ - MSG_CHAIN_NOT_FOUND_ERR, MSG_FAILED_TO_RUN_CONTRACT_VERIFIER_ERR, MSG_RUNNING_CONTRACT_VERIFIER, + MSG_CHAIN_NOT_INITIALIZED, MSG_FAILED_TO_RUN_CONTRACT_VERIFIER_ERR, + MSG_RUNNING_CONTRACT_VERIFIER, }; pub(crate) async fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem = EcosystemConfig::from_file(shell)?; - let chain = ecosystem - .load_current_chain() - .context(MSG_CHAIN_NOT_FOUND_ERR)?; + let chain = ZkStackConfig::load_current_chain(shell).context(MSG_CHAIN_NOT_INITIALIZED)?; let config_path = chain.path_to_general_config(); let secrets_path = chain.path_to_secrets_config(); diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs index edf480946be1..22ba6e1c3556 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs @@ -8,7 +8,7 @@ use common::{ }; use config::{ override_config, set_file_artifacts, set_rocks_db_config, set_server_database, - traits::SaveConfigWithBasePath, ChainConfig, EcosystemConfig, FileArtifacts, + traits::SaveConfigWithBasePath, zkstack_config::ZkStackConfig, ChainConfig, FileArtifacts, }; use types::ProverMode; use xshell::Shell; @@ -21,18 +21,14 @@ use crate::{ SERVER_MIGRATIONS, }, messages::{ - MSG_CHAIN_NOT_INITIALIZED, MSG_FAILED_TO_DROP_SERVER_DATABASE_ERR, - MSG_GENESIS_DATABASES_INITIALIZED, MSG_INITIALIZING_SERVER_DATABASE, - MSG_RECREATE_ROCKS_DB_ERRROR, + MSG_FAILED_TO_DROP_SERVER_DATABASE_ERR, MSG_GENESIS_DATABASES_INITIALIZED, + MSG_INITIALIZING_SERVER_DATABASE, MSG_RECREATE_ROCKS_DB_ERRROR, }, utils::rocks_db::{recreate_rocksdb_dirs, RocksDBDirOption}, }; pub async fn run(args: GenesisArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; - let chain_config = ecosystem_config - .load_current_chain() - .context(MSG_CHAIN_NOT_INITIALIZED)?; + let chain_config = ZkStackConfig::load_current_chain(shell)?; let mut secrets = chain_config.get_secrets_config()?; let args = args.fill_values_with_secrets(&chain_config)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs index c1cc03174aeb..388c8a239fa6 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs @@ -1,7 +1,6 @@ -use anyhow::Context; use clap::{command, Parser, Subcommand}; use common::{logger, spinner::Spinner}; -use config::{ChainConfig, EcosystemConfig}; +use config::{zkstack_config::ZkStackConfig, ChainConfig}; use xshell::Shell; use crate::{ @@ -10,8 +9,8 @@ use crate::{ genesis::{self, database::initialize_server_database, server::run_server_genesis}, }, messages::{ - MSG_CHAIN_NOT_INITIALIZED, MSG_GENESIS_COMPLETED, MSG_INITIALIZING_DATABASES_SPINNER, - MSG_SELECTED_CONFIG, MSG_STARTING_GENESIS, MSG_STARTING_GENESIS_SPINNER, + MSG_GENESIS_COMPLETED, MSG_INITIALIZING_DATABASES_SPINNER, MSG_SELECTED_CONFIG, + MSG_STARTING_GENESIS, MSG_STARTING_GENESIS_SPINNER, }, }; @@ -46,10 +45,7 @@ pub(crate) async fn run(args: GenesisCommand, shell: &Shell) -> anyhow::Result<( } pub async fn run_genesis(args: GenesisArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; - let chain_config = ecosystem_config - .load_current_chain() - .context(MSG_CHAIN_NOT_INITIALIZED)?; + let chain_config = ZkStackConfig::load_current_chain(shell)?; let args = args.fill_values_with_prompt(&chain_config); genesis(args, shell, &chain_config).await?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs index 50a74b7ea9e4..c1e6e4e0d5ab 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs @@ -5,21 +5,17 @@ use common::{ spinner::Spinner, }; use config::{ - traits::FileConfigWithDefaultName, ChainConfig, ContractsConfig, EcosystemConfig, + traits::FileConfigWithDefaultName, zkstack_config::ZkStackConfig, ChainConfig, ContractsConfig, GeneralConfig, GenesisConfig, SecretsConfig, WalletsConfig, }; use xshell::Shell; use crate::messages::{ - MSG_CHAIN_NOT_INITIALIZED, MSG_FAILED_TO_RUN_SERVER_ERR, MSG_GENESIS_COMPLETED, - MSG_STARTING_GENESIS_SPINNER, + MSG_FAILED_TO_RUN_SERVER_ERR, MSG_GENESIS_COMPLETED, MSG_STARTING_GENESIS_SPINNER, }; pub async fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; - let chain_config = ecosystem_config - .load_current_chain() - .context(MSG_CHAIN_NOT_INITIALIZED)?; + let chain_config = ZkStackConfig::load_current_chain(shell)?; let spinner = Spinner::new(MSG_STARTING_GENESIS_SPINNER); run_server_genesis(&chain_config, shell)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/server.rs b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs index 51e994844eba..d01d00a1b7f7 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/server.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs @@ -4,22 +4,16 @@ use common::{ server::{Server, ServerMode}, }; use config::{ - traits::FileConfigWithDefaultName, ChainConfig, ContractsConfig, EcosystemConfig, + traits::FileConfigWithDefaultName, zkstack_config::ZkStackConfig, ChainConfig, ContractsConfig, GeneralConfig, GenesisConfig, SecretsConfig, WalletsConfig, }; use xshell::Shell; use super::args::run_server::RunServerArgs; -use crate::messages::{ - MSG_CHAIN_NOT_INITIALIZED, MSG_FAILED_TO_RUN_SERVER_ERR, MSG_STARTING_SERVER, -}; +use crate::messages::{MSG_FAILED_TO_RUN_SERVER_ERR, MSG_STARTING_SERVER}; pub fn run(shell: &Shell, args: RunServerArgs) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; - - let chain_config = ecosystem_config - .load_current_chain() - .context(MSG_CHAIN_NOT_INITIALIZED)?; + let chain_config = ZkStackConfig::load_current_chain(shell)?; logger::info(MSG_STARTING_SERVER); From 06ddc2c3d00bee28c28dac1c88485fb724810c4d Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 17 Oct 2024 11:57:18 -0300 Subject: [PATCH 11/38] rollback consensus --- .../crates/zkstack/src/commands/chain/consensus/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs index 4894f0b2551a..f66daa0fd87a 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs @@ -5,7 +5,7 @@ use std::{borrow::Borrow, collections::HashMap, path::PathBuf, sync::Arc}; use anyhow::Context as _; use clap::Parser; use common::{logger, wallets::Wallet}; -use config::zkstack_config::ZkStackConfig; +use config::EcosystemConfig; use conv::*; use ethers::{ abi::Detokenize, @@ -196,7 +196,11 @@ impl Setup { } fn new(shell: &Shell) -> anyhow::Result { - let chain = ZkStackConfig::load_current_chain(shell)?; + let ecosystem_config = + EcosystemConfig::from_file(shell).context("EcosystemConfig::from_file()")?; + let chain = ecosystem_config + .load_current_chain() + .context(messages::MSG_CHAIN_NOT_INITIALIZED)?; let contracts = chain .get_contracts_config() .context("get_contracts_config()")?; From 1b12e6e43950c6f78446166b31fd3fd2c5dfa6dc Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 17 Oct 2024 22:01:40 -0300 Subject: [PATCH 12/38] Refactor chain consensus setup --- zkstack_cli/crates/config/src/zkstack_config.rs | 5 +---- .../crates/zkstack/src/commands/chain/consensus/mod.rs | 8 ++------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/zkstack_cli/crates/config/src/zkstack_config.rs b/zkstack_cli/crates/config/src/zkstack_config.rs index 60136721e3e0..e2b9585a17f6 100644 --- a/zkstack_cli/crates/config/src/zkstack_config.rs +++ b/zkstack_cli/crates/config/src/zkstack_config.rs @@ -48,10 +48,7 @@ impl ZkStackConfig { pub fn load_current_chain(shell: &Shell) -> anyhow::Result { match ZkStackConfig::from_file(shell)? { - ZkStackConfig::EcosystemConfig(ecosystem) => { - let chain_name = ecosystem.current_chain(); - ecosystem.load_chain(Some(chain_name.to_string())) - } + ZkStackConfig::EcosystemConfig(ecosystem) => ecosystem.load_current_chain(), ZkStackConfig::ChainConfig(chain) => Ok(chain), } } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs index f66daa0fd87a..4894f0b2551a 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs @@ -5,7 +5,7 @@ use std::{borrow::Borrow, collections::HashMap, path::PathBuf, sync::Arc}; use anyhow::Context as _; use clap::Parser; use common::{logger, wallets::Wallet}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use conv::*; use ethers::{ abi::Detokenize, @@ -196,11 +196,7 @@ impl Setup { } fn new(shell: &Shell) -> anyhow::Result { - let ecosystem_config = - EcosystemConfig::from_file(shell).context("EcosystemConfig::from_file()")?; - let chain = ecosystem_config - .load_current_chain() - .context(messages::MSG_CHAIN_NOT_INITIALIZED)?; + let chain = ZkStackConfig::load_current_chain(shell)?; let contracts = chain .get_contracts_config() .context("get_contracts_config()")?; From cb00b8d69e160c3ef30ac894c372f4ad3ab85ea6 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 30 Oct 2024 12:50:18 -0300 Subject: [PATCH 13/38] Update tests --- .github/workflows/ci-prover-e2e.yml | 2 +- core/tests/revert-test/tests/utils.ts | 18 +++++++++--------- core/tests/ts-integration/src/utils.ts | 6 +++--- core/tests/upgrade-test/tests/utils.ts | 2 +- zkstack_cli/README.md | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-prover-e2e.yml b/.github/workflows/ci-prover-e2e.yml index b0b9caf888fc..f06835591df1 100644 --- a/.github/workflows/ci-prover-e2e.yml +++ b/.github/workflows/ci-prover-e2e.yml @@ -65,7 +65,7 @@ jobs: ci_run zkstack prover setup-keys --mode=download --region=us --verbose - name: Run server run: | - ci_run zkstack server --uring --chain=proving_chain --components=api,tree,eth,state_keeper,commitment_generator,proof_data_handler,vm_runner_protective_reads,vm_runner_bwip &>prover_logs/server.log & + ci_run zkstack chain server --uring --chain=proving_chain --components=api,tree,eth,state_keeper,commitment_generator,proof_data_handler,vm_runner_protective_reads,vm_runner_bwip &>prover_logs/server.log & - name: Run Gateway run: | ci_run zkstack prover run --component=gateway --docker=false &>prover_logs/gateway.log & diff --git a/core/tests/revert-test/tests/utils.ts b/core/tests/revert-test/tests/utils.ts index fe5cb40799a4..cdee120df93a 100644 --- a/core/tests/revert-test/tests/utils.ts +++ b/core/tests/revert-test/tests/utils.ts @@ -63,7 +63,7 @@ export function runServerInBackground({ }): ChildProcessWithoutNullStreams { let command = ''; if (useZkStack) { - command = 'zkstack server'; + command = 'zkstack chain server'; if (chain) { command += ` --chain ${chain}`; } @@ -153,12 +153,12 @@ async function runBlockReverter( const options = env ? { - cwd: env.ZKSYNC_HOME, - env: { - ...env, - PATH: process.env.PATH - } - } + cwd: env.ZKSYNC_HOME, + env: { + ...env, + PATH: process.env.PATH + } + } : {}; const executedProcess = await exec(cmd, options); return executedProcess.stdout; @@ -229,7 +229,7 @@ export class Node { public readonly tester: Tester, private readonly proc: ChildProcessWithoutNullStreams, private readonly type: TYPE - ) {} + ) { } public async terminate() { try { @@ -308,7 +308,7 @@ export class NodeSpawner { private readonly fileConfig: FileConfig, private readonly options: MainNodeSpawnOptions, private readonly env?: ProcessEnvOptions['env'] - ) {} + ) { } public async spawnMainNode(enableExecute: boolean): Promise> { const env = this.env ?? process.env; diff --git a/core/tests/ts-integration/src/utils.ts b/core/tests/ts-integration/src/utils.ts index bb6fa93757ee..85f19c4ab1c8 100644 --- a/core/tests/ts-integration/src/utils.ts +++ b/core/tests/ts-integration/src/utils.ts @@ -34,7 +34,7 @@ export function runServerInBackground({ }): ChildProcessWithoutNullStreams { let command = ''; if (useZkStack) { - command = 'zkstack server'; + command = 'zkstack chain server'; if (chain) { command += ` --chain ${chain}`; } @@ -62,7 +62,7 @@ export enum NodeType { } export class Node { - constructor(public proc: ChildProcessWithoutNullStreams, public l2NodeUrl: string, private readonly type: TYPE) {} + constructor(public proc: ChildProcessWithoutNullStreams, public l2NodeUrl: string, private readonly type: TYPE) { } public async terminate() { try { @@ -112,7 +112,7 @@ export class NodeSpawner { private readonly fileConfig: FileConfig, private readonly options: MainNodeSpawnOptions, private env?: ProcessEnvOptions['env'] - ) {} + ) { } public async spawnMainNode(newL1GasPrice?: string, newPubdataPrice?: string): Promise> { const env = this.env ?? process.env; diff --git a/core/tests/upgrade-test/tests/utils.ts b/core/tests/upgrade-test/tests/utils.ts index 2972f8411f5f..c9cb4663a917 100644 --- a/core/tests/upgrade-test/tests/utils.ts +++ b/core/tests/upgrade-test/tests/utils.ts @@ -19,7 +19,7 @@ export function runServerInBackground({ let command = ''; if (useZkStack) { - command = 'zkstack server'; + command = 'zkstack chain server'; command += chain ? ` --chain ${chain}` : ''; } else { command = 'cd $ZKSYNC_HOME && cargo run --bin zksync_server --release --'; diff --git a/zkstack_cli/README.md b/zkstack_cli/README.md index e81165088218..7700e1a98983 100644 --- a/zkstack_cli/README.md +++ b/zkstack_cli/README.md @@ -166,7 +166,7 @@ by a third party). To run the chain: ```bash -zkstack server +zkstack chain server ``` You can specify the component you want to run using `--components` flag From 3252224f0cedca806c75f2e07e828dd8f96e80bc Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 30 Oct 2024 12:52:05 -0300 Subject: [PATCH 14/38] fmt --- core/tests/revert-test/tests/utils.ts | 16 ++++++++-------- core/tests/ts-integration/src/utils.ts | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/tests/revert-test/tests/utils.ts b/core/tests/revert-test/tests/utils.ts index cdee120df93a..e2a68ea4a8f4 100644 --- a/core/tests/revert-test/tests/utils.ts +++ b/core/tests/revert-test/tests/utils.ts @@ -153,12 +153,12 @@ async function runBlockReverter( const options = env ? { - cwd: env.ZKSYNC_HOME, - env: { - ...env, - PATH: process.env.PATH - } - } + cwd: env.ZKSYNC_HOME, + env: { + ...env, + PATH: process.env.PATH + } + } : {}; const executedProcess = await exec(cmd, options); return executedProcess.stdout; @@ -229,7 +229,7 @@ export class Node { public readonly tester: Tester, private readonly proc: ChildProcessWithoutNullStreams, private readonly type: TYPE - ) { } + ) {} public async terminate() { try { @@ -308,7 +308,7 @@ export class NodeSpawner { private readonly fileConfig: FileConfig, private readonly options: MainNodeSpawnOptions, private readonly env?: ProcessEnvOptions['env'] - ) { } + ) {} public async spawnMainNode(enableExecute: boolean): Promise> { const env = this.env ?? process.env; diff --git a/core/tests/ts-integration/src/utils.ts b/core/tests/ts-integration/src/utils.ts index 85f19c4ab1c8..91b57073d3c9 100644 --- a/core/tests/ts-integration/src/utils.ts +++ b/core/tests/ts-integration/src/utils.ts @@ -62,7 +62,7 @@ export enum NodeType { } export class Node { - constructor(public proc: ChildProcessWithoutNullStreams, public l2NodeUrl: string, private readonly type: TYPE) { } + constructor(public proc: ChildProcessWithoutNullStreams, public l2NodeUrl: string, private readonly type: TYPE) {} public async terminate() { try { @@ -112,7 +112,7 @@ export class NodeSpawner { private readonly fileConfig: FileConfig, private readonly options: MainNodeSpawnOptions, private env?: ProcessEnvOptions['env'] - ) { } + ) {} public async spawnMainNode(newL1GasPrice?: string, newPubdataPrice?: string): Promise> { const env = this.env ?? process.env; From e5978a424ac78310b8393c0f5a092caced5d46bd Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 30 Oct 2024 13:19:31 -0300 Subject: [PATCH 15/38] fmt --- core/tests/ts-integration/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tests/ts-integration/src/utils.ts b/core/tests/ts-integration/src/utils.ts index 0cb4fcba0993..044f1a9cab85 100644 --- a/core/tests/ts-integration/src/utils.ts +++ b/core/tests/ts-integration/src/utils.ts @@ -57,7 +57,7 @@ export enum NodeType { } export class Node { - constructor(public proc: ChildProcessWithoutNullStreams, public l2NodeUrl: string, private readonly type: TYPE) { } + constructor(public proc: ChildProcessWithoutNullStreams, public l2NodeUrl: string, private readonly type: TYPE) {} public async terminate() { try { From 88c2e9960633bb474e91c40e0b01f7c259104e95 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 30 Oct 2024 13:45:56 -0300 Subject: [PATCH 16/38] generate autocompletion --- zkstack_cli/_zkstack.zsh | 5092 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 5092 insertions(+) create mode 100644 zkstack_cli/_zkstack.zsh diff --git a/zkstack_cli/_zkstack.zsh b/zkstack_cli/_zkstack.zsh new file mode 100644 index 000000000000..ba9feb654106 --- /dev/null +++ b/zkstack_cli/_zkstack.zsh @@ -0,0 +1,5092 @@ +#compdef zkstack + +autoload -U is-at-least + +_zkstack() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + _arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_zkstack_commands" \ +"*::: :->zkstack" \ +&& ret=0 + case $state in + (zkstack) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-command-$line[1]:" + case $line[1] in + (autocomplete) +_arguments "${_arguments_options[@]}" : \ +'--generate=[The shell to generate the autocomplete script for]:GENERATOR:(bash elvish fish powershell zsh)' \ +'-o+[The out directory to write the autocomplete script to]:OUT:_files' \ +'--out=[The out directory to write the autocomplete script to]:OUT:_files' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(ecosystem) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__ecosystem_commands" \ +"*::: :->ecosystem" \ +&& ret=0 + + case $state in + (ecosystem) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-ecosystem-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +'--ecosystem-name=[]:ECOSYSTEM_NAME:_default' \ +'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ +'--link-to-code=[Code link]:LINK_TO_CODE:_files -/' \ +'--chain-name=[]:CHAIN_NAME:_default' \ +'--chain-id=[Chain ID]:CHAIN_ID:_default' \ +'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ +'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" +random\:"Generate random wallets" +empty\:"Generate placeholder wallets" +in-file\:"Specify file with wallets"))' \ +'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ +'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ +'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ +'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ +'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ +'--set-as-default=[Set as default chain]' \ +'--evm-emulator=[Enable EVM emulator]' \ +'--start-containers=[Start reth and postgres containers after creation]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--legacy-bridge[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +'--sender=[Address of the transaction sender]:SENDER:_default' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'-o+[Output directory for the generated files]:OUT:_files' \ +'--out=[Output directory for the generated files]:OUT:_files' \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--deploy-erc20=[Deploy ERC20 contracts]' \ +'--deploy-ecosystem=[Deploy ecosystem contracts]' \ +'--ecosystem-contracts-path=[Path to ecosystem contracts]:ECOSYSTEM_CONTRACTS_PATH:_files' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--deploy-paymaster=[Deploy Paymaster contract]' \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'-o+[Enable Grafana]' \ +'--observability=[Enable Grafana]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-d[]' \ +'--dont-drop[]' \ +'--ecosystem-only[Initialize ecosystem only and skip chain initialization (chain can be initialized later with \`chain init\` subcommand)]' \ +'--dev[Use defaults for all options and flags. Suitable for local development]' \ +'--no-port-reallocation[Do not reallocate ports]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(change-default-chain) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::name:_default' \ +&& ret=0 +;; +(setup-observability) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__ecosystem__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-ecosystem-help-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(change-default-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-observability) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(chain) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain_commands" \ +"*::: :->chain" \ +&& ret=0 + + case $state in + (chain) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +'--chain-name=[]:CHAIN_NAME:_default' \ +'--chain-id=[Chain ID]:CHAIN_ID:_default' \ +'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ +'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" +random\:"Generate random wallets" +empty\:"Generate placeholder wallets" +in-file\:"Specify file with wallets"))' \ +'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ +'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ +'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ +'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ +'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ +'--set-as-default=[Set as default chain]' \ +'--evm-emulator=[Enable EVM emulator]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--legacy-bridge[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +'-o+[Output directory for the generated files]:OUT:_files' \ +'--out=[Output directory for the generated files]:OUT:_files' \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--deploy-paymaster=[]' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-d[]' \ +'--dont-drop[]' \ +'--no-port-reallocation[Do not reallocate ports]' \ +'--dev[Use defaults for all options and flags. Suitable for local development]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +":: :_zkstack__chain__init_commands" \ +"*::: :->init" \ +&& ret=0 + + case $state in + (init) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-init-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-d[Use default database urls and names]' \ +'--dev[Use default database urls and names]' \ +'-d[]' \ +'--dont-drop[]' \ +'--no-port-reallocation[Do not reallocate ports]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__init__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-init-help-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(genesis) +_arguments "${_arguments_options[@]}" : \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-d[Use default database urls and names]' \ +'--dev[Use default database urls and names]' \ +'-d[]' \ +'--dont-drop[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__genesis_commands" \ +"*::: :->genesis" \ +&& ret=0 + + case $state in + (genesis) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-genesis-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-d[Use default database urls and names]' \ +'--dev[Use default database urls and names]' \ +'-d[]' \ +'--dont-drop[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__genesis__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-genesis-help-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(register-chain) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-multicall3) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-upgrader) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-paymaster) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(update-token-multiplier-setter) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +'*--components=[Components of server to run]:COMPONENTS:_default' \ +'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--genesis[Run server in genesis mode]' \ +'--build[Build server but don'\''t run it]' \ +'--uring[Enables uring support for RocksDB]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--zksolc-version=[Version of zksolc to install]:ZKSOLC_VERSION:_default' \ +'--zkvyper-version=[Version of zkvyper to install]:ZKVYPER_VERSION:_default' \ +'--solc-version=[Version of solc to install]:SOLC_VERSION:_default' \ +'--era-vm-solc-version=[Version of era vm solc to install]:ERA_VM_SOLC_VERSION:_default' \ +'--vyper-version=[Version of vyper to install]:VYPER_VERSION:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--only[Install only provided compilers]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__contract-verifier__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-help-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +'--from-file=[Sets the attester committee in the consensus registry contract to the committee in the yaml file. File format is definied in \`commands/consensus/proto/mod.proto\`]:FROM_FILE:_files' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--from-genesis[Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__consensus__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-consensus-help-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__init_commands" \ +"*::: :->init" \ +&& ret=0 + + case $state in + (init) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-init-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(genesis) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__genesis_commands" \ +"*::: :->genesis" \ +&& ret=0 + + case $state in + (genesis) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-genesis-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(register-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-multicall3) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-upgrader) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-paymaster) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(update-token-multiplier-setter) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-contract-verifier-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(dev) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev_commands" \ +"*::: :->dev" \ +&& ret=0 + + case $state in + (dev) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-command-$line[1]:" + case $line[1] in + (database) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-database-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +'--database=[Database to create new migration for]:DATABASE:(prover core)' \ +'--name=[Migration name]:NAME:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__database__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-database-help-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(test) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__test_commands" \ +"*::: :->test" \ +&& ret=0 + + case $state in + (test) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-test-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +'-t+[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ +'--test-pattern=[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-e[Run tests for external node]' \ +'--external-node[Run tests for external node]' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'--no-kill[The test will not kill all the nodes during execution]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--enable-consensus[Enable consensus]' \ +'-e[Run tests for external node]' \ +'--external-node[Run tests for external node]' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'--no-kill[The test will not kill all the nodes during execution]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-s[Run recovery from a snapshot instead of genesis]' \ +'--snapshot[Run recovery from a snapshot instead of genesis]' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'--no-kill[The test will not kill all the nodes during execution]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +'--options=[Cargo test flags]:OPTIONS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__test__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-test-help-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(clean) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__clean_commands" \ +"*::: :->clean" \ +&& ret=0 + + case $state in + (clean) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-clean-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__clean__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-clean-help-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(snapshot) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__snapshot_commands" \ +"*::: :->snapshot" \ +&& ret=0 + + case $state in + (snapshot) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__snapshot__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-help-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(lint) +_arguments "${_arguments_options[@]}" : \ +'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ +'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-c[]' \ +'--check[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-c[]' \ +'--check[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__fmt_commands" \ +"*::: :->fmt" \ +&& ret=0 + + case $state in + (fmt) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-fmt-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ +'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__fmt__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-fmt-help-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-prover-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +'--number=[]:NUMBER:_default' \ +'--version=[]:VERSION:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--default[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +'--version=[]:VERSION:_default' \ +'--snark-wrapper=[]:SNARK_WRAPPER:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--default[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__prover__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-prover-help-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(contracts) +_arguments "${_arguments_options[@]}" : \ +'--l1-contracts=[Build L1 contracts]' \ +'--l2-contracts=[Build L2 contracts]' \ +'--system-contracts=[Build system contracts]' \ +'--test-contracts=[Build test contracts]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(config-writer) +_arguments "${_arguments_options[@]}" : \ +'-p+[Path to the config file to override]:PATH:_default' \ +'--path=[Path to the config file to override]:PATH:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(send-transactions) +_arguments "${_arguments_options[@]}" : \ +'--file=[]:FILE:_files' \ +'--private-key=[]:PRIVATE_KEY:_default' \ +'--l1-rpc-url=[]:L1_RPC_URL:_default' \ +'--confirmations=[]:CONFIRMATIONS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" : \ +'-u+[URL of the health check endpoint]:URL:_default' \ +'--url=[URL of the health check endpoint]:URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__status_commands" \ +"*::: :->status" \ +&& ret=0 + + case $state in + (status) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-status-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__status__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-status-help-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(generate-genesis) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-command-$line[1]:" + case $line[1] in + (database) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-database-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(test) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__test_commands" \ +"*::: :->test" \ +&& ret=0 + + case $state in + (test) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-test-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(clean) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__clean_commands" \ +"*::: :->clean" \ +&& ret=0 + + case $state in + (clean) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-clean-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(snapshot) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__snapshot_commands" \ +"*::: :->snapshot" \ +&& ret=0 + + case $state in + (snapshot) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-snapshot-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(lint) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__fmt_commands" \ +"*::: :->fmt" \ +&& ret=0 + + case $state in + (fmt) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-fmt-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-prover-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(config-writer) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(send-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__status_commands" \ +"*::: :->status" \ +&& ret=0 + + case $state in + (status) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-status-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(generate-genesis) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-prover-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +'--proof-store-dir=[]:PROOF_STORE_DIR:_default' \ +'--bucket-base-url=[]:BUCKET_BASE_URL:_default' \ +'--credentials-file=[]:CREDENTIALS_FILE:_default' \ +'--bucket-name=[]:BUCKET_NAME:_default' \ +'--location=[]:LOCATION:_default' \ +'--project-id=[]:PROJECT_ID:_default' \ +'--shall-save-to-public-bucket=[]:SHALL_SAVE_TO_PUBLIC_BUCKET:(true false)' \ +'--public-store-dir=[]:PUBLIC_STORE_DIR:_default' \ +'--public-bucket-base-url=[]:PUBLIC_BUCKET_BASE_URL:_default' \ +'--public-credentials-file=[]:PUBLIC_CREDENTIALS_FILE:_default' \ +'--public-bucket-name=[]:PUBLIC_BUCKET_NAME:_default' \ +'--public-location=[]:PUBLIC_LOCATION:_default' \ +'--public-project-id=[]:PUBLIC_PROJECT_ID:_default' \ +'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ +'--bellman-cuda=[]' \ +'--setup-compressor-key=[]' \ +'--path=[]:PATH:_default' \ +'--region=[]:REGION:(us europe asia)' \ +'--mode=[]:MODE:(download generate)' \ +'--setup-keys=[]' \ +'--setup-database=[]:SETUP_DATABASE:(true false)' \ +'--prover-db-url=[Prover database url without database name]:PROVER_DB_URL:_default' \ +'--prover-db-name=[Prover database name]:PROVER_DB_NAME:_default' \ +'-u+[Use default database urls and names]:USE_DEFAULT:(true false)' \ +'--use-default=[Use default database urls and names]:USE_DEFAULT:(true false)' \ +'-d+[]:DONT_DROP:(true false)' \ +'--dont-drop=[]:DONT_DROP:(true false)' \ +'--cloud-type=[]:CLOUD_TYPE:(gcp local)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--dev[]' \ +'(--bellman-cuda-dir)--clone[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(setup-keys) +_arguments "${_arguments_options[@]}" : \ +'--region=[]:REGION:(us europe asia)' \ +'--mode=[]:MODE:(download generate)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'--component=[]:COMPONENT:(gateway witness-generator witness-vector-generator prover circuit-prover compressor prover-job-monitor)' \ +'--round=[]:ROUND:(all-rounds basic-circuits leaf-aggregation node-aggregation recursion-tip scheduler)' \ +'--threads=[]:THREADS:_default' \ +'--max-allocation=[Memory allocation limit in bytes (for prover component)]:MAX_ALLOCATION:_default' \ +'--witness-vector-generator-count=[]:WITNESS_VECTOR_GENERATOR_COUNT:_default' \ +'--max-allocation=[]:MAX_ALLOCATION:_default' \ +'--docker=[]:DOCKER:(true false)' \ +'--tag=[]:TAG:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init-bellman-cuda) +_arguments "${_arguments_options[@]}" : \ +'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'(--bellman-cuda-dir)--clone[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(compressor-keys) +_arguments "${_arguments_options[@]}" : \ +'--path=[]:PATH:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__prover__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-prover-help-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init-bellman-cuda) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(compressor-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(external-node) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__external-node_commands" \ +"*::: :->external-node" \ +&& ret=0 + + case $state in + (external-node) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-external-node-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +'--db-url=[]:DB_URL:_default' \ +'--db-name=[]:DB_NAME:_default' \ +'--l1-rpc-url=[]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-u[Use default database urls and names]' \ +'--use-default[Use default database urls and names]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'*--components=[Components of server to run]:COMPONENTS:_default' \ +'--enable-consensus=[Enable consensus]' \ +'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--reinit[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__external-node__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-external-node-help-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +'-o+[Enable Grafana]' \ +'--observability=[Enable Grafana]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(portal) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(explorer) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__explorer_commands" \ +"*::: :->explorer" \ +&& ret=0 + + case $state in + (explorer) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-explorer-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run-backend) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__explorer__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-explorer-help-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run-backend) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(update) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-c[Update only the config files]' \ +'--only-config[Update only the config files]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(markdown) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-command-$line[1]:" + case $line[1] in + (autocomplete) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(ecosystem) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__ecosystem_commands" \ +"*::: :->ecosystem" \ +&& ret=0 + + case $state in + (ecosystem) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-ecosystem-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(change-default-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-observability) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(chain) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain_commands" \ +"*::: :->chain" \ +&& ret=0 + + case $state in + (chain) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__init_commands" \ +"*::: :->init" \ +&& ret=0 + + case $state in + (init) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-init-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(genesis) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__genesis_commands" \ +"*::: :->genesis" \ +&& ret=0 + + case $state in + (genesis) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-genesis-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(register-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-multicall3) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-upgrader) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-paymaster) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(update-token-multiplier-setter) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-contract-verifier-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(dev) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev_commands" \ +"*::: :->dev" \ +&& ret=0 + + case $state in + (dev) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-command-$line[1]:" + case $line[1] in + (database) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-database-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(test) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__test_commands" \ +"*::: :->test" \ +&& ret=0 + + case $state in + (test) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-test-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(clean) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__clean_commands" \ +"*::: :->clean" \ +&& ret=0 + + case $state in + (clean) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-clean-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(snapshot) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__snapshot_commands" \ +"*::: :->snapshot" \ +&& ret=0 + + case $state in + (snapshot) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-snapshot-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(lint) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__fmt_commands" \ +"*::: :->fmt" \ +&& ret=0 + + case $state in + (fmt) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-fmt-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-prover-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(config-writer) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(send-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__status_commands" \ +"*::: :->status" \ +&& ret=0 + + case $state in + (status) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-status-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(generate-genesis) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-prover-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init-bellman-cuda) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(compressor-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(external-node) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__external-node_commands" \ +"*::: :->external-node" \ +&& ret=0 + + case $state in + (external-node) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-external-node-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(portal) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(explorer) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__explorer_commands" \ +"*::: :->explorer" \ +&& ret=0 + + case $state in + (explorer) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-explorer-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run-backend) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(update) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(markdown) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +} + +(( $+functions[_zkstack_commands] )) || +_zkstack_commands() { + local commands; commands=( +'autocomplete:Create shell autocompletion files' \ +'ecosystem:Ecosystem related commands' \ +'chain:Chain related commands' \ +'dev:Supervisor related commands' \ +'prover:Prover related commands' \ +'external-node:External Node related commands' \ +'containers:Run containers for local development' \ +'portal:Run dapp-portal' \ +'explorer:Run block-explorer' \ +'update:Update ZKsync' \ +'markdown:Print markdown help' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack commands' commands "$@" +} +(( $+functions[_zkstack__autocomplete_commands] )) || +_zkstack__autocomplete_commands() { + local commands; commands=() + _describe -t commands 'zkstack autocomplete commands' commands "$@" +} +(( $+functions[_zkstack__chain_commands] )) || +_zkstack__chain_commands() { + local commands; commands=( +'create:Create a new chain, setting the necessary configurations for later initialization' \ +'build-transactions:Create unsigned transactions for chain deployment' \ +'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ +'genesis:Run server genesis' \ +'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ +'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ +'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ +'initialize-bridges:Initialize bridges on L2' \ +'deploy-consensus-registry:Deploy L2 consensus registry' \ +'deploy-multicall3:Deploy L2 multicall3' \ +'deploy-upgrader:Deploy Default Upgrader' \ +'deploy-paymaster:Deploy paymaster smart contract' \ +'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain commands' commands "$@" +} +(( $+functions[_zkstack__chain__accept-chain-ownership_commands] )) || +_zkstack__chain__accept-chain-ownership_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain accept-chain-ownership commands' commands "$@" +} +(( $+functions[_zkstack__chain__build-transactions_commands] )) || +_zkstack__chain__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus_commands] )) || +_zkstack__chain__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain consensus commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__get-attester-committee_commands] )) || +_zkstack__chain__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help_commands] )) || +_zkstack__chain__consensus__help_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain consensus help commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__get-attester-committee_commands] )) || +_zkstack__chain__consensus__help__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__help_commands] )) || +_zkstack__chain__consensus__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__set-attester-committee_commands] )) || +_zkstack__chain__consensus__help__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__set-attester-committee_commands] )) || +_zkstack__chain__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier_commands] )) || +_zkstack__chain__contract-verifier_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help_commands] )) || +_zkstack__chain__contract-verifier__help_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain contract-verifier help commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__help_commands] )) || +_zkstack__chain__contract-verifier__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__init_commands] )) || +_zkstack__chain__contract-verifier__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help init commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__run_commands] )) || +_zkstack__chain__contract-verifier__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help run commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__init_commands] )) || +_zkstack__chain__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__run_commands] )) || +_zkstack__chain__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier run commands' commands "$@" +} +(( $+functions[_zkstack__chain__create_commands] )) || +_zkstack__chain__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain create commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-consensus-registry_commands] )) || +_zkstack__chain__deploy-consensus-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-consensus-registry commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-l2-contracts_commands] )) || +_zkstack__chain__deploy-l2-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-l2-contracts commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-multicall3_commands] )) || +_zkstack__chain__deploy-multicall3_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-multicall3 commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-paymaster_commands] )) || +_zkstack__chain__deploy-paymaster_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-paymaster commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-upgrader_commands] )) || +_zkstack__chain__deploy-upgrader_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-upgrader commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis_commands] )) || +_zkstack__chain__genesis_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain genesis commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help_commands] )) || +_zkstack__chain__genesis__help_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain genesis help commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help__help_commands] )) || +_zkstack__chain__genesis__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help__init-database_commands] )) || +_zkstack__chain__genesis__help__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis help init-database commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help__server_commands] )) || +_zkstack__chain__genesis__help__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis help server commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__init-database_commands] )) || +_zkstack__chain__genesis__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis init-database commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__server_commands] )) || +_zkstack__chain__genesis__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis server commands' commands "$@" +} +(( $+functions[_zkstack__chain__help_commands] )) || +_zkstack__chain__help_commands() { + local commands; commands=( +'create:Create a new chain, setting the necessary configurations for later initialization' \ +'build-transactions:Create unsigned transactions for chain deployment' \ +'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ +'genesis:Run server genesis' \ +'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ +'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ +'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ +'initialize-bridges:Initialize bridges on L2' \ +'deploy-consensus-registry:Deploy L2 consensus registry' \ +'deploy-multicall3:Deploy L2 multicall3' \ +'deploy-upgrader:Deploy Default Upgrader' \ +'deploy-paymaster:Deploy paymaster smart contract' \ +'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain help commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__accept-chain-ownership_commands] )) || +_zkstack__chain__help__accept-chain-ownership_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help accept-chain-ownership commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__build-transactions_commands] )) || +_zkstack__chain__help__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus_commands] )) || +_zkstack__chain__help__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ + ) + _describe -t commands 'zkstack chain help consensus commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus__get-attester-committee_commands] )) || +_zkstack__chain__help__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus__set-attester-committee_commands] )) || +_zkstack__chain__help__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier_commands] )) || +_zkstack__chain__help__contract-verifier_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ + ) + _describe -t commands 'zkstack chain help contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__init_commands] )) || +_zkstack__chain__help__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__run_commands] )) || +_zkstack__chain__help__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier run commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__create_commands] )) || +_zkstack__chain__help__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help create commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-consensus-registry_commands] )) || +_zkstack__chain__help__deploy-consensus-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-consensus-registry commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-l2-contracts_commands] )) || +_zkstack__chain__help__deploy-l2-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-l2-contracts commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-multicall3_commands] )) || +_zkstack__chain__help__deploy-multicall3_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-multicall3 commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-paymaster_commands] )) || +_zkstack__chain__help__deploy-paymaster_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-paymaster commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-upgrader_commands] )) || +_zkstack__chain__help__deploy-upgrader_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-upgrader commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__genesis_commands] )) || +_zkstack__chain__help__genesis_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ + ) + _describe -t commands 'zkstack chain help genesis commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__genesis__init-database_commands] )) || +_zkstack__chain__help__genesis__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help genesis init-database commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__genesis__server_commands] )) || +_zkstack__chain__help__genesis__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help genesis server commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__help_commands] )) || +_zkstack__chain__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__init_commands] )) || +_zkstack__chain__help__init_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ + ) + _describe -t commands 'zkstack chain help init commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__init__configs_commands] )) || +_zkstack__chain__help__init__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help init configs commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__initialize-bridges_commands] )) || +_zkstack__chain__help__initialize-bridges_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help initialize-bridges commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__register-chain_commands] )) || +_zkstack__chain__help__register-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help register-chain commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__server_commands] )) || +_zkstack__chain__help__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help server commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__update-token-multiplier-setter_commands] )) || +_zkstack__chain__help__update-token-multiplier-setter_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help update-token-multiplier-setter commands' commands "$@" +} +(( $+functions[_zkstack__chain__init_commands] )) || +_zkstack__chain__init_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain init commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__configs_commands] )) || +_zkstack__chain__init__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain init configs commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__help_commands] )) || +_zkstack__chain__init__help_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain init help commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__help__configs_commands] )) || +_zkstack__chain__init__help__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain init help configs commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__help__help_commands] )) || +_zkstack__chain__init__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain init help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__initialize-bridges_commands] )) || +_zkstack__chain__initialize-bridges_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain initialize-bridges commands' commands "$@" +} +(( $+functions[_zkstack__chain__register-chain_commands] )) || +_zkstack__chain__register-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain register-chain commands' commands "$@" +} +(( $+functions[_zkstack__chain__server_commands] )) || +_zkstack__chain__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server commands' commands "$@" +} +(( $+functions[_zkstack__chain__update-token-multiplier-setter_commands] )) || +_zkstack__chain__update-token-multiplier-setter_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain update-token-multiplier-setter commands' commands "$@" +} +(( $+functions[_zkstack__containers_commands] )) || +_zkstack__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack containers commands' commands "$@" +} +(( $+functions[_zkstack__dev_commands] )) || +_zkstack__dev_commands() { + local commands; commands=( +'database:Database related commands' \ +'test:Run tests' \ +'clean:Clean artifacts' \ +'snapshot:Snapshots creator' \ +'lint:Lint code' \ +'fmt:Format code' \ +'prover:Protocol version used by provers' \ +'contracts:Build contracts' \ +'config-writer:Overwrite general config' \ +'send-transactions:Send transactions from file' \ +'status:Get status of the server' \ +'generate-genesis:Generate new genesis file based on current contracts' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean_commands] )) || +_zkstack__dev__clean_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev clean commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__all_commands] )) || +_zkstack__dev__clean__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean all commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__containers_commands] )) || +_zkstack__dev__clean__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean containers commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__contracts-cache_commands] )) || +_zkstack__dev__clean__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help_commands] )) || +_zkstack__dev__clean__help_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev clean help commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__all_commands] )) || +_zkstack__dev__clean__help__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help all commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__containers_commands] )) || +_zkstack__dev__clean__help__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help containers commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__contracts-cache_commands] )) || +_zkstack__dev__clean__help__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__help_commands] )) || +_zkstack__dev__clean__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__config-writer_commands] )) || +_zkstack__dev__config-writer_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev config-writer commands' commands "$@" +} +(( $+functions[_zkstack__dev__contracts_commands] )) || +_zkstack__dev__contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__database_commands] )) || +_zkstack__dev__database_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev database commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__check-sqlx-data_commands] )) || +_zkstack__dev__database__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__drop_commands] )) || +_zkstack__dev__database__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database drop commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help_commands] )) || +_zkstack__dev__database__help_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev database help commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__check-sqlx-data_commands] )) || +_zkstack__dev__database__help__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__drop_commands] )) || +_zkstack__dev__database__help__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help drop commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__help_commands] )) || +_zkstack__dev__database__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__migrate_commands] )) || +_zkstack__dev__database__help__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help migrate commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__new-migration_commands] )) || +_zkstack__dev__database__help__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help new-migration commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__prepare_commands] )) || +_zkstack__dev__database__help__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help prepare commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__reset_commands] )) || +_zkstack__dev__database__help__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help reset commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__setup_commands] )) || +_zkstack__dev__database__help__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help setup commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__migrate_commands] )) || +_zkstack__dev__database__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database migrate commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__new-migration_commands] )) || +_zkstack__dev__database__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database new-migration commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__prepare_commands] )) || +_zkstack__dev__database__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database prepare commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__reset_commands] )) || +_zkstack__dev__database__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database reset commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__setup_commands] )) || +_zkstack__dev__database__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database setup commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt_commands] )) || +_zkstack__dev__fmt_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev fmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__contract_commands] )) || +_zkstack__dev__fmt__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt contract commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help_commands] )) || +_zkstack__dev__fmt__help_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev fmt help commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__contract_commands] )) || +_zkstack__dev__fmt__help__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help contract commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__help_commands] )) || +_zkstack__dev__fmt__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__prettier_commands] )) || +_zkstack__dev__fmt__help__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help prettier commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__rustfmt_commands] )) || +_zkstack__dev__fmt__help__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__prettier_commands] )) || +_zkstack__dev__fmt__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt prettier commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__rustfmt_commands] )) || +_zkstack__dev__fmt__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__generate-genesis_commands] )) || +_zkstack__dev__generate-genesis_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev generate-genesis commands' commands "$@" +} +(( $+functions[_zkstack__dev__help_commands] )) || +_zkstack__dev__help_commands() { + local commands; commands=( +'database:Database related commands' \ +'test:Run tests' \ +'clean:Clean artifacts' \ +'snapshot:Snapshots creator' \ +'lint:Lint code' \ +'fmt:Format code' \ +'prover:Protocol version used by provers' \ +'contracts:Build contracts' \ +'config-writer:Overwrite general config' \ +'send-transactions:Send transactions from file' \ +'status:Get status of the server' \ +'generate-genesis:Generate new genesis file based on current contracts' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev help commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean_commands] )) || +_zkstack__dev__help__clean_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ + ) + _describe -t commands 'zkstack dev help clean commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean__all_commands] )) || +_zkstack__dev__help__clean__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help clean all commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean__containers_commands] )) || +_zkstack__dev__help__clean__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help clean containers commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean__contracts-cache_commands] )) || +_zkstack__dev__help__clean__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help clean contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__config-writer_commands] )) || +_zkstack__dev__help__config-writer_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help config-writer commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__contracts_commands] )) || +_zkstack__dev__help__contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database_commands] )) || +_zkstack__dev__help__database_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ + ) + _describe -t commands 'zkstack dev help database commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__check-sqlx-data_commands] )) || +_zkstack__dev__help__database__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__drop_commands] )) || +_zkstack__dev__help__database__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database drop commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__migrate_commands] )) || +_zkstack__dev__help__database__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database migrate commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__new-migration_commands] )) || +_zkstack__dev__help__database__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database new-migration commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__prepare_commands] )) || +_zkstack__dev__help__database__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database prepare commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__reset_commands] )) || +_zkstack__dev__help__database__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database reset commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__setup_commands] )) || +_zkstack__dev__help__database__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database setup commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt_commands] )) || +_zkstack__dev__help__fmt_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ + ) + _describe -t commands 'zkstack dev help fmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt__contract_commands] )) || +_zkstack__dev__help__fmt__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help fmt contract commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt__prettier_commands] )) || +_zkstack__dev__help__fmt__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help fmt prettier commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt__rustfmt_commands] )) || +_zkstack__dev__help__fmt__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help fmt rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__generate-genesis_commands] )) || +_zkstack__dev__help__generate-genesis_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help generate-genesis commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__help_commands] )) || +_zkstack__dev__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__lint_commands] )) || +_zkstack__dev__help__lint_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help lint commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover_commands] )) || +_zkstack__dev__help__prover_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ + ) + _describe -t commands 'zkstack dev help prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover__info_commands] )) || +_zkstack__dev__help__prover__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help prover info commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover__insert-batch_commands] )) || +_zkstack__dev__help__prover__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help prover insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover__insert-version_commands] )) || +_zkstack__dev__help__prover__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help prover insert-version commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__send-transactions_commands] )) || +_zkstack__dev__help__send-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help send-transactions commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__snapshot_commands] )) || +_zkstack__dev__help__snapshot_commands() { + local commands; commands=( +'create:' \ + ) + _describe -t commands 'zkstack dev help snapshot commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__snapshot__create_commands] )) || +_zkstack__dev__help__snapshot__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help snapshot create commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__status_commands] )) || +_zkstack__dev__help__status_commands() { + local commands; commands=( +'ports:Show used ports' \ + ) + _describe -t commands 'zkstack dev help status commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__status__ports_commands] )) || +_zkstack__dev__help__status__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help status ports commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test_commands] )) || +_zkstack__dev__help__test_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ + ) + _describe -t commands 'zkstack dev help test commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__build_commands] )) || +_zkstack__dev__help__test__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test build commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__fees_commands] )) || +_zkstack__dev__help__test__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test fees commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__integration_commands] )) || +_zkstack__dev__help__test__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test integration commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__l1-contracts_commands] )) || +_zkstack__dev__help__test__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__loadtest_commands] )) || +_zkstack__dev__help__test__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test loadtest commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__prover_commands] )) || +_zkstack__dev__help__test__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__recovery_commands] )) || +_zkstack__dev__help__test__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test recovery commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__revert_commands] )) || +_zkstack__dev__help__test__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test revert commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__rust_commands] )) || +_zkstack__dev__help__test__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test rust commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__upgrade_commands] )) || +_zkstack__dev__help__test__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test upgrade commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__wallet_commands] )) || +_zkstack__dev__help__test__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test wallet commands' commands "$@" +} +(( $+functions[_zkstack__dev__lint_commands] )) || +_zkstack__dev__lint_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev lint commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover_commands] )) || +_zkstack__dev__prover_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help_commands] )) || +_zkstack__dev__prover__help_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev prover help commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__help_commands] )) || +_zkstack__dev__prover__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__info_commands] )) || +_zkstack__dev__prover__help__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help info commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__insert-batch_commands] )) || +_zkstack__dev__prover__help__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__insert-version_commands] )) || +_zkstack__dev__prover__help__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help insert-version commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__info_commands] )) || +_zkstack__dev__prover__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover info commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__insert-batch_commands] )) || +_zkstack__dev__prover__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__insert-version_commands] )) || +_zkstack__dev__prover__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover insert-version commands' commands "$@" +} +(( $+functions[_zkstack__dev__send-transactions_commands] )) || +_zkstack__dev__send-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev send-transactions commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot_commands] )) || +_zkstack__dev__snapshot_commands() { + local commands; commands=( +'create:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev snapshot commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__create_commands] )) || +_zkstack__dev__snapshot__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev snapshot create commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__help_commands] )) || +_zkstack__dev__snapshot__help_commands() { + local commands; commands=( +'create:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev snapshot help commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__help__create_commands] )) || +_zkstack__dev__snapshot__help__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev snapshot help create commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__help__help_commands] )) || +_zkstack__dev__snapshot__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev snapshot help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__status_commands] )) || +_zkstack__dev__status_commands() { + local commands; commands=( +'ports:Show used ports' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev status commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__help_commands] )) || +_zkstack__dev__status__help_commands() { + local commands; commands=( +'ports:Show used ports' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev status help commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__help__help_commands] )) || +_zkstack__dev__status__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev status help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__help__ports_commands] )) || +_zkstack__dev__status__help__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev status help ports commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__ports_commands] )) || +_zkstack__dev__status__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev status ports commands' commands "$@" +} +(( $+functions[_zkstack__dev__test_commands] )) || +_zkstack__dev__test_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev test commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__build_commands] )) || +_zkstack__dev__test__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test build commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__fees_commands] )) || +_zkstack__dev__test__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test fees commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help_commands] )) || +_zkstack__dev__test__help_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev test help commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__build_commands] )) || +_zkstack__dev__test__help__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help build commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__fees_commands] )) || +_zkstack__dev__test__help__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help fees commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__help_commands] )) || +_zkstack__dev__test__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__integration_commands] )) || +_zkstack__dev__test__help__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help integration commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__l1-contracts_commands] )) || +_zkstack__dev__test__help__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__loadtest_commands] )) || +_zkstack__dev__test__help__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help loadtest commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__prover_commands] )) || +_zkstack__dev__test__help__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__recovery_commands] )) || +_zkstack__dev__test__help__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help recovery commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__revert_commands] )) || +_zkstack__dev__test__help__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help revert commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__rust_commands] )) || +_zkstack__dev__test__help__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help rust commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__upgrade_commands] )) || +_zkstack__dev__test__help__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help upgrade commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__wallet_commands] )) || +_zkstack__dev__test__help__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help wallet commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__integration_commands] )) || +_zkstack__dev__test__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test integration commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__l1-contracts_commands] )) || +_zkstack__dev__test__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__loadtest_commands] )) || +_zkstack__dev__test__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test loadtest commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__prover_commands] )) || +_zkstack__dev__test__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__recovery_commands] )) || +_zkstack__dev__test__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test recovery commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__revert_commands] )) || +_zkstack__dev__test__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test revert commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__rust_commands] )) || +_zkstack__dev__test__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test rust commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__upgrade_commands] )) || +_zkstack__dev__test__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test upgrade commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__wallet_commands] )) || +_zkstack__dev__test__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test wallet commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem_commands] )) || +_zkstack__ecosystem_commands() { + local commands; commands=( +'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ +'build-transactions:Create transactions to build ecosystem contracts' \ +'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ +'change-default-chain:Change the default chain' \ +'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack ecosystem commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__build-transactions_commands] )) || +_zkstack__ecosystem__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__change-default-chain_commands] )) || +_zkstack__ecosystem__change-default-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem change-default-chain commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__create_commands] )) || +_zkstack__ecosystem__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem create commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help_commands] )) || +_zkstack__ecosystem__help_commands() { + local commands; commands=( +'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ +'build-transactions:Create transactions to build ecosystem contracts' \ +'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ +'change-default-chain:Change the default chain' \ +'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack ecosystem help commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__build-transactions_commands] )) || +_zkstack__ecosystem__help__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__change-default-chain_commands] )) || +_zkstack__ecosystem__help__change-default-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help change-default-chain commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__create_commands] )) || +_zkstack__ecosystem__help__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help create commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__help_commands] )) || +_zkstack__ecosystem__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help help commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__init_commands] )) || +_zkstack__ecosystem__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help init commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__setup-observability_commands] )) || +_zkstack__ecosystem__help__setup-observability_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help setup-observability commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__init_commands] )) || +_zkstack__ecosystem__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem init commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__setup-observability_commands] )) || +_zkstack__ecosystem__setup-observability_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem setup-observability commands' commands "$@" +} +(( $+functions[_zkstack__explorer_commands] )) || +_zkstack__explorer_commands() { + local commands; commands=( +'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ +'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ +'run:Run explorer app' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack explorer commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help_commands] )) || +_zkstack__explorer__help_commands() { + local commands; commands=( +'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ +'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ +'run:Run explorer app' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack explorer help commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__help_commands] )) || +_zkstack__explorer__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help help commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__init_commands] )) || +_zkstack__explorer__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help init commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__run_commands] )) || +_zkstack__explorer__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help run commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__run-backend_commands] )) || +_zkstack__explorer__help__run-backend_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help run-backend commands' commands "$@" +} +(( $+functions[_zkstack__explorer__init_commands] )) || +_zkstack__explorer__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer init commands' commands "$@" +} +(( $+functions[_zkstack__explorer__run_commands] )) || +_zkstack__explorer__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer run commands' commands "$@" +} +(( $+functions[_zkstack__explorer__run-backend_commands] )) || +_zkstack__explorer__run-backend_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer run-backend commands' commands "$@" +} +(( $+functions[_zkstack__external-node_commands] )) || +_zkstack__external-node_commands() { + local commands; commands=( +'configs:Prepare configs for EN' \ +'init:Init databases' \ +'run:Run external node' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack external-node commands' commands "$@" +} +(( $+functions[_zkstack__external-node__configs_commands] )) || +_zkstack__external-node__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node configs commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help_commands] )) || +_zkstack__external-node__help_commands() { + local commands; commands=( +'configs:Prepare configs for EN' \ +'init:Init databases' \ +'run:Run external node' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack external-node help commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__configs_commands] )) || +_zkstack__external-node__help__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help configs commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__help_commands] )) || +_zkstack__external-node__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help help commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__init_commands] )) || +_zkstack__external-node__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help init commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__run_commands] )) || +_zkstack__external-node__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help run commands' commands "$@" +} +(( $+functions[_zkstack__external-node__init_commands] )) || +_zkstack__external-node__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node init commands' commands "$@" +} +(( $+functions[_zkstack__external-node__run_commands] )) || +_zkstack__external-node__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node run commands' commands "$@" +} +(( $+functions[_zkstack__help_commands] )) || +_zkstack__help_commands() { + local commands; commands=( +'autocomplete:Create shell autocompletion files' \ +'ecosystem:Ecosystem related commands' \ +'chain:Chain related commands' \ +'dev:Supervisor related commands' \ +'prover:Prover related commands' \ +'external-node:External Node related commands' \ +'containers:Run containers for local development' \ +'portal:Run dapp-portal' \ +'explorer:Run block-explorer' \ +'update:Update ZKsync' \ +'markdown:Print markdown help' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack help commands' commands "$@" +} +(( $+functions[_zkstack__help__autocomplete_commands] )) || +_zkstack__help__autocomplete_commands() { + local commands; commands=() + _describe -t commands 'zkstack help autocomplete commands' commands "$@" +} +(( $+functions[_zkstack__help__chain_commands] )) || +_zkstack__help__chain_commands() { + local commands; commands=( +'create:Create a new chain, setting the necessary configurations for later initialization' \ +'build-transactions:Create unsigned transactions for chain deployment' \ +'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ +'genesis:Run server genesis' \ +'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ +'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ +'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ +'initialize-bridges:Initialize bridges on L2' \ +'deploy-consensus-registry:Deploy L2 consensus registry' \ +'deploy-multicall3:Deploy L2 multicall3' \ +'deploy-upgrader:Deploy Default Upgrader' \ +'deploy-paymaster:Deploy paymaster smart contract' \ +'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ + ) + _describe -t commands 'zkstack help chain commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__accept-chain-ownership_commands] )) || +_zkstack__help__chain__accept-chain-ownership_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain accept-chain-ownership commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__build-transactions_commands] )) || +_zkstack__help__chain__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus_commands] )) || +_zkstack__help__chain__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ + ) + _describe -t commands 'zkstack help chain consensus commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus__get-attester-committee_commands] )) || +_zkstack__help__chain__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus__set-attester-committee_commands] )) || +_zkstack__help__chain__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier_commands] )) || +_zkstack__help__chain__contract-verifier_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ + ) + _describe -t commands 'zkstack help chain contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__init_commands] )) || +_zkstack__help__chain__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__run_commands] )) || +_zkstack__help__chain__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier run commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__create_commands] )) || +_zkstack__help__chain__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain create commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-consensus-registry_commands] )) || +_zkstack__help__chain__deploy-consensus-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-consensus-registry commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-l2-contracts_commands] )) || +_zkstack__help__chain__deploy-l2-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-l2-contracts commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-multicall3_commands] )) || +_zkstack__help__chain__deploy-multicall3_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-multicall3 commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-paymaster_commands] )) || +_zkstack__help__chain__deploy-paymaster_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-paymaster commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-upgrader_commands] )) || +_zkstack__help__chain__deploy-upgrader_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-upgrader commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__genesis_commands] )) || +_zkstack__help__chain__genesis_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ + ) + _describe -t commands 'zkstack help chain genesis commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__genesis__init-database_commands] )) || +_zkstack__help__chain__genesis__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain genesis init-database commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__genesis__server_commands] )) || +_zkstack__help__chain__genesis__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain genesis server commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__init_commands] )) || +_zkstack__help__chain__init_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ + ) + _describe -t commands 'zkstack help chain init commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__init__configs_commands] )) || +_zkstack__help__chain__init__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain init configs commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__initialize-bridges_commands] )) || +_zkstack__help__chain__initialize-bridges_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain initialize-bridges commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__register-chain_commands] )) || +_zkstack__help__chain__register-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain register-chain commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__server_commands] )) || +_zkstack__help__chain__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain server commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__update-token-multiplier-setter_commands] )) || +_zkstack__help__chain__update-token-multiplier-setter_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain update-token-multiplier-setter commands' commands "$@" +} +(( $+functions[_zkstack__help__containers_commands] )) || +_zkstack__help__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack help containers commands' commands "$@" +} +(( $+functions[_zkstack__help__dev_commands] )) || +_zkstack__help__dev_commands() { + local commands; commands=( +'database:Database related commands' \ +'test:Run tests' \ +'clean:Clean artifacts' \ +'snapshot:Snapshots creator' \ +'lint:Lint code' \ +'fmt:Format code' \ +'prover:Protocol version used by provers' \ +'contracts:Build contracts' \ +'config-writer:Overwrite general config' \ +'send-transactions:Send transactions from file' \ +'status:Get status of the server' \ +'generate-genesis:Generate new genesis file based on current contracts' \ + ) + _describe -t commands 'zkstack help dev commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean_commands] )) || +_zkstack__help__dev__clean_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ + ) + _describe -t commands 'zkstack help dev clean commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean__all_commands] )) || +_zkstack__help__dev__clean__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev clean all commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean__containers_commands] )) || +_zkstack__help__dev__clean__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev clean containers commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean__contracts-cache_commands] )) || +_zkstack__help__dev__clean__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev clean contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__config-writer_commands] )) || +_zkstack__help__dev__config-writer_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev config-writer commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__contracts_commands] )) || +_zkstack__help__dev__contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev contracts commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database_commands] )) || +_zkstack__help__dev__database_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ + ) + _describe -t commands 'zkstack help dev database commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__check-sqlx-data_commands] )) || +_zkstack__help__dev__database__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__drop_commands] )) || +_zkstack__help__dev__database__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database drop commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__migrate_commands] )) || +_zkstack__help__dev__database__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database migrate commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__new-migration_commands] )) || +_zkstack__help__dev__database__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database new-migration commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__prepare_commands] )) || +_zkstack__help__dev__database__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database prepare commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__reset_commands] )) || +_zkstack__help__dev__database__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database reset commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__setup_commands] )) || +_zkstack__help__dev__database__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database setup commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt_commands] )) || +_zkstack__help__dev__fmt_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ + ) + _describe -t commands 'zkstack help dev fmt commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt__contract_commands] )) || +_zkstack__help__dev__fmt__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev fmt contract commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt__prettier_commands] )) || +_zkstack__help__dev__fmt__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev fmt prettier commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt__rustfmt_commands] )) || +_zkstack__help__dev__fmt__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev fmt rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__generate-genesis_commands] )) || +_zkstack__help__dev__generate-genesis_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev generate-genesis commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__lint_commands] )) || +_zkstack__help__dev__lint_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev lint commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover_commands] )) || +_zkstack__help__dev__prover_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ + ) + _describe -t commands 'zkstack help dev prover commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover__info_commands] )) || +_zkstack__help__dev__prover__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev prover info commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover__insert-batch_commands] )) || +_zkstack__help__dev__prover__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev prover insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover__insert-version_commands] )) || +_zkstack__help__dev__prover__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev prover insert-version commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__send-transactions_commands] )) || +_zkstack__help__dev__send-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev send-transactions commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__snapshot_commands] )) || +_zkstack__help__dev__snapshot_commands() { + local commands; commands=( +'create:' \ + ) + _describe -t commands 'zkstack help dev snapshot commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__snapshot__create_commands] )) || +_zkstack__help__dev__snapshot__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev snapshot create commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__status_commands] )) || +_zkstack__help__dev__status_commands() { + local commands; commands=( +'ports:Show used ports' \ + ) + _describe -t commands 'zkstack help dev status commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__status__ports_commands] )) || +_zkstack__help__dev__status__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev status ports commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test_commands] )) || +_zkstack__help__dev__test_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ + ) + _describe -t commands 'zkstack help dev test commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__build_commands] )) || +_zkstack__help__dev__test__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test build commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__fees_commands] )) || +_zkstack__help__dev__test__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test fees commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__integration_commands] )) || +_zkstack__help__dev__test__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test integration commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__l1-contracts_commands] )) || +_zkstack__help__dev__test__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__loadtest_commands] )) || +_zkstack__help__dev__test__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test loadtest commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__prover_commands] )) || +_zkstack__help__dev__test__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test prover commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__recovery_commands] )) || +_zkstack__help__dev__test__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test recovery commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__revert_commands] )) || +_zkstack__help__dev__test__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test revert commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__rust_commands] )) || +_zkstack__help__dev__test__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test rust commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__upgrade_commands] )) || +_zkstack__help__dev__test__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test upgrade commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__wallet_commands] )) || +_zkstack__help__dev__test__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test wallet commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem_commands] )) || +_zkstack__help__ecosystem_commands() { + local commands; commands=( +'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ +'build-transactions:Create transactions to build ecosystem contracts' \ +'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ +'change-default-chain:Change the default chain' \ +'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ + ) + _describe -t commands 'zkstack help ecosystem commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__build-transactions_commands] )) || +_zkstack__help__ecosystem__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__change-default-chain_commands] )) || +_zkstack__help__ecosystem__change-default-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem change-default-chain commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__create_commands] )) || +_zkstack__help__ecosystem__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem create commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__init_commands] )) || +_zkstack__help__ecosystem__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem init commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__setup-observability_commands] )) || +_zkstack__help__ecosystem__setup-observability_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem setup-observability commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer_commands] )) || +_zkstack__help__explorer_commands() { + local commands; commands=( +'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ +'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ +'run:Run explorer app' \ + ) + _describe -t commands 'zkstack help explorer commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer__init_commands] )) || +_zkstack__help__explorer__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help explorer init commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer__run_commands] )) || +_zkstack__help__explorer__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help explorer run commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer__run-backend_commands] )) || +_zkstack__help__explorer__run-backend_commands() { + local commands; commands=() + _describe -t commands 'zkstack help explorer run-backend commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node_commands] )) || +_zkstack__help__external-node_commands() { + local commands; commands=( +'configs:Prepare configs for EN' \ +'init:Init databases' \ +'run:Run external node' \ + ) + _describe -t commands 'zkstack help external-node commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__configs_commands] )) || +_zkstack__help__external-node__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node configs commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__init_commands] )) || +_zkstack__help__external-node__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node init commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__run_commands] )) || +_zkstack__help__external-node__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node run commands' commands "$@" +} +(( $+functions[_zkstack__help__help_commands] )) || +_zkstack__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack help help commands' commands "$@" +} +(( $+functions[_zkstack__help__markdown_commands] )) || +_zkstack__help__markdown_commands() { + local commands; commands=() + _describe -t commands 'zkstack help markdown commands' commands "$@" +} +(( $+functions[_zkstack__help__portal_commands] )) || +_zkstack__help__portal_commands() { + local commands; commands=() + _describe -t commands 'zkstack help portal commands' commands "$@" +} +(( $+functions[_zkstack__help__prover_commands] )) || +_zkstack__help__prover_commands() { + local commands; commands=( +'init:Initialize prover' \ +'setup-keys:Generate setup keys' \ +'run:Run prover' \ +'init-bellman-cuda:Initialize bellman-cuda' \ +'compressor-keys:Download compressor keys' \ + ) + _describe -t commands 'zkstack help prover commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__compressor-keys_commands] )) || +_zkstack__help__prover__compressor-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover compressor-keys commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__init_commands] )) || +_zkstack__help__prover__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover init commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__init-bellman-cuda_commands] )) || +_zkstack__help__prover__init-bellman-cuda_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover init-bellman-cuda commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__run_commands] )) || +_zkstack__help__prover__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover run commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__setup-keys_commands] )) || +_zkstack__help__prover__setup-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover setup-keys commands' commands "$@" +} +(( $+functions[_zkstack__help__update_commands] )) || +_zkstack__help__update_commands() { + local commands; commands=() + _describe -t commands 'zkstack help update commands' commands "$@" +} +(( $+functions[_zkstack__markdown_commands] )) || +_zkstack__markdown_commands() { + local commands; commands=() + _describe -t commands 'zkstack markdown commands' commands "$@" +} +(( $+functions[_zkstack__portal_commands] )) || +_zkstack__portal_commands() { + local commands; commands=() + _describe -t commands 'zkstack portal commands' commands "$@" +} +(( $+functions[_zkstack__prover_commands] )) || +_zkstack__prover_commands() { + local commands; commands=( +'init:Initialize prover' \ +'setup-keys:Generate setup keys' \ +'run:Run prover' \ +'init-bellman-cuda:Initialize bellman-cuda' \ +'compressor-keys:Download compressor keys' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack prover commands' commands "$@" +} +(( $+functions[_zkstack__prover__compressor-keys_commands] )) || +_zkstack__prover__compressor-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover compressor-keys commands' commands "$@" +} +(( $+functions[_zkstack__prover__help_commands] )) || +_zkstack__prover__help_commands() { + local commands; commands=( +'init:Initialize prover' \ +'setup-keys:Generate setup keys' \ +'run:Run prover' \ +'init-bellman-cuda:Initialize bellman-cuda' \ +'compressor-keys:Download compressor keys' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack prover help commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__compressor-keys_commands] )) || +_zkstack__prover__help__compressor-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help compressor-keys commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__help_commands] )) || +_zkstack__prover__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help help commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__init_commands] )) || +_zkstack__prover__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help init commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__init-bellman-cuda_commands] )) || +_zkstack__prover__help__init-bellman-cuda_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help init-bellman-cuda commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__run_commands] )) || +_zkstack__prover__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help run commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__setup-keys_commands] )) || +_zkstack__prover__help__setup-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help setup-keys commands' commands "$@" +} +(( $+functions[_zkstack__prover__init_commands] )) || +_zkstack__prover__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover init commands' commands "$@" +} +(( $+functions[_zkstack__prover__init-bellman-cuda_commands] )) || +_zkstack__prover__init-bellman-cuda_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover init-bellman-cuda commands' commands "$@" +} +(( $+functions[_zkstack__prover__run_commands] )) || +_zkstack__prover__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover run commands' commands "$@" +} +(( $+functions[_zkstack__prover__setup-keys_commands] )) || +_zkstack__prover__setup-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover setup-keys commands' commands "$@" +} +(( $+functions[_zkstack__update_commands] )) || +_zkstack__update_commands() { + local commands; commands=() + _describe -t commands 'zkstack update commands' commands "$@" +} + +if [ "$funcstack[1]" = "_zkstack" ]; then + _zkstack "$@" +else + compdef _zkstack zkstack +fi From 88bdf4d2f40f80e9d6df21f198736eec8ee7461d Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 31 Oct 2024 10:45:47 -0300 Subject: [PATCH 17/38] lint autocomplete --- .../crates/zkstack/completion/_zkstack.zsh | 824 +++++----- .../crates/zkstack/completion/zkstack.fish | 157 +- .../crates/zkstack/completion/zkstack.sh | 1403 +++++++++-------- 3 files changed, 1290 insertions(+), 1094 deletions(-) diff --git a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh index f1cfc9946731..0c812a5f5b32 100644 --- a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh +++ b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh @@ -82,6 +82,7 @@ in-file\:"Specify file with wallets"))' \ '--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ '--set-as-default=[Set as default chain]' \ '--evm-emulator=[Enable EVM emulator]' \ +'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ '--start-containers=[Start reth and postgres containers after creation]' \ '--chain=[Chain to use]:CHAIN:_default' \ '--legacy-bridge[]' \ @@ -243,6 +244,7 @@ in-file\:"Specify file with wallets"))' \ '--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ '--set-as-default=[Set as default chain]' \ '--evm-emulator=[Enable EVM emulator]' \ +'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ '--chain=[Chain to use]:CHAIN:_default' \ '--legacy-bridge[]' \ '-v[Verbose mode]' \ @@ -586,6 +588,170 @@ _arguments "${_arguments_options[@]}" : \ '--help[Print help (see more with '\''--help'\'')]' \ && ret=0 ;; +(server) +_arguments "${_arguments_options[@]}" : \ +'*--components=[Components of server to run]:COMPONENTS:_default' \ +'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--genesis[Run server in genesis mode]' \ +'--build[Build server but don'\''t run it]' \ +'--uring[Enables uring support for RocksDB]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--zksolc-version=[Version of zksolc to install]:ZKSOLC_VERSION:_default' \ +'--zkvyper-version=[Version of zkvyper to install]:ZKVYPER_VERSION:_default' \ +'--solc-version=[Version of solc to install]:SOLC_VERSION:_default' \ +'--era-vm-solc-version=[Version of era vm solc to install]:ERA_VM_SOLC_VERSION:_default' \ +'--vyper-version=[Version of vyper to install]:VYPER_VERSION:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--only[Install only provided compilers]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__contract-verifier__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-help-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +'--from-file=[Sets the attester committee in the consensus registry contract to the committee in the yaml file. File format is definied in \`commands/consensus/proto/mod.proto\`]:FROM_FILE:_files' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--from-genesis[Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__consensus__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-consensus-help-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; (help) _arguments "${_arguments_options[@]}" : \ ":: :_zkstack__chain__help_commands" \ @@ -686,6 +852,58 @@ _arguments "${_arguments_options[@]}" : \ _arguments "${_arguments_options[@]}" : \ && ret=0 ;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-contract-verifier-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; (help) _arguments "${_arguments_options[@]}" : \ && ret=0 @@ -1980,22 +2198,6 @@ esac ;; esac ;; -(server) -_arguments "${_arguments_options[@]}" : \ -'*--components=[Components of server to run]:COMPONENTS:_default' \ -'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--genesis[Run server in genesis mode]' \ -'--build[Build server but don'\''t run it]' \ -'--uring[Enables uring support for RocksDB]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; (external-node) _arguments "${_arguments_options[@]}" : \ '--chain=[Chain to use]:CHAIN:_default' \ @@ -2102,82 +2304,6 @@ _arguments "${_arguments_options[@]}" : \ '--help[Print help]' \ && ret=0 ;; -(contract-verifier) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__contract-verifier_commands" \ -"*::: :->contract-verifier" \ -&& ret=0 - - case $state in - (contract-verifier) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-contract-verifier-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'--zksolc-version=[Version of zksolc to install]:ZKSOLC_VERSION:_default' \ -'--zkvyper-version=[Version of zkvyper to install]:ZKVYPER_VERSION:_default' \ -'--solc-version=[Version of solc to install]:SOLC_VERSION:_default' \ -'--era-vm-solc-version=[Version of era vm solc to install]:ERA_VM_SOLC_VERSION:_default' \ -'--vyper-version=[Version of vyper to install]:VYPER_VERSION:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--only[Install only provided compilers]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__contract-verifier__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-contract-verifier-help-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; (portal) _arguments "${_arguments_options[@]}" : \ '--chain=[Chain to use]:CHAIN:_default' \ @@ -2272,78 +2398,6 @@ esac ;; esac ;; -(consensus) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__consensus_commands" \ -"*::: :->consensus" \ -&& ret=0 - - case $state in - (consensus) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-consensus-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -'--from-file=[Sets the attester committee in the consensus registry contract to the committee in the yaml file. File format is definied in \`commands/consensus/proto/mod.proto\`]:FROM_FILE:_files' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--from-genesis[Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__consensus__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-consensus-help-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; (update) _arguments "${_arguments_options[@]}" : \ '--chain=[Chain to use]:CHAIN:_default' \ @@ -2482,45 +2536,97 @@ _arguments "${_arguments_options[@]}" : \ ;; esac ;; -(register-chain) +(register-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-multicall3) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; -(deploy-l2-contracts) +(deploy-upgrader) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; -(accept-chain-ownership) +(deploy-paymaster) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; -(initialize-bridges) +(update-token-multiplier-setter) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; -(deploy-consensus-registry) +(server) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; -(deploy-multicall3) +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-contract-verifier-command-$line[1]:" + case $line[1] in + (run) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; -(deploy-upgrader) +(init) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; -(deploy-paymaster) + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; -(update-token-multiplier-setter) +(get-attester-committee) _arguments "${_arguments_options[@]}" : \ && ret=0 ;; esac ;; esac +;; + esac + ;; +esac ;; (dev) _arguments "${_arguments_options[@]}" : \ @@ -2822,10 +2928,6 @@ _arguments "${_arguments_options[@]}" : \ ;; esac ;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; (external-node) _arguments "${_arguments_options[@]}" : \ ":: :_zkstack__help__external-node_commands" \ @@ -2858,30 +2960,6 @@ esac _arguments "${_arguments_options[@]}" : \ && ret=0 ;; -(contract-verifier) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__contract-verifier_commands" \ -"*::: :->contract-verifier" \ -&& ret=0 - - case $state in - (contract-verifier) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-contract-verifier-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; (portal) _arguments "${_arguments_options[@]}" : \ && ret=0 @@ -2914,30 +2992,6 @@ _arguments "${_arguments_options[@]}" : \ ;; esac ;; -(consensus) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__consensus_commands" \ -"*::: :->consensus" \ -&& ret=0 - - case $state in - (consensus) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-consensus-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; (update) _arguments "${_arguments_options[@]}" : \ && ret=0 @@ -2967,13 +3021,10 @@ _zkstack_commands() { 'chain:Chain related commands' \ 'dev:Supervisor related commands' \ 'prover:Prover related commands' \ -'server:Run server' \ 'external-node:External Node related commands' \ 'containers:Run containers for local development' \ -'contract-verifier:Run contract verifier' \ 'portal:Run dapp-portal' \ 'explorer:Run block-explorer' \ -'consensus:Consensus utilities' \ 'update:Update ZKsync' \ 'markdown:Print markdown help' \ 'help:Print this message or the help of the given subcommand(s)' \ @@ -3001,6 +3052,9 @@ _zkstack__chain_commands() { 'deploy-upgrader:Deploy Default Upgrader' \ 'deploy-paymaster:Deploy paymaster smart contract' \ 'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'zkstack chain commands' commands "$@" @@ -3015,6 +3069,92 @@ _zkstack__chain__build-transactions_commands() { local commands; commands=() _describe -t commands 'zkstack chain build-transactions commands' commands "$@" } +(( $+functions[_zkstack__chain__consensus_commands] )) || +_zkstack__chain__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain consensus commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__get-attester-committee_commands] )) || +_zkstack__chain__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help_commands] )) || +_zkstack__chain__consensus__help_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain consensus help commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__get-attester-committee_commands] )) || +_zkstack__chain__consensus__help__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__help_commands] )) || +_zkstack__chain__consensus__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__set-attester-committee_commands] )) || +_zkstack__chain__consensus__help__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__set-attester-committee_commands] )) || +_zkstack__chain__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier_commands] )) || +_zkstack__chain__contract-verifier_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help_commands] )) || +_zkstack__chain__contract-verifier__help_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain contract-verifier help commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__help_commands] )) || +_zkstack__chain__contract-verifier__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__init_commands] )) || +_zkstack__chain__contract-verifier__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help init commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__run_commands] )) || +_zkstack__chain__contract-verifier__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help run commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__init_commands] )) || +_zkstack__chain__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__run_commands] )) || +_zkstack__chain__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier run commands' commands "$@" +} (( $+functions[_zkstack__chain__create_commands] )) || _zkstack__chain__create_commands() { local commands; commands=() @@ -3104,6 +3244,9 @@ _zkstack__chain__help_commands() { 'deploy-upgrader:Deploy Default Upgrader' \ 'deploy-paymaster:Deploy paymaster smart contract' \ 'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'zkstack chain help commands' commands "$@" @@ -3118,6 +3261,42 @@ _zkstack__chain__help__build-transactions_commands() { local commands; commands=() _describe -t commands 'zkstack chain help build-transactions commands' commands "$@" } +(( $+functions[_zkstack__chain__help__consensus_commands] )) || +_zkstack__chain__help__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ + ) + _describe -t commands 'zkstack chain help consensus commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus__get-attester-committee_commands] )) || +_zkstack__chain__help__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus__set-attester-committee_commands] )) || +_zkstack__chain__help__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier_commands] )) || +_zkstack__chain__help__contract-verifier_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ + ) + _describe -t commands 'zkstack chain help contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__init_commands] )) || +_zkstack__chain__help__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__run_commands] )) || +_zkstack__chain__help__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier run commands' commands "$@" +} (( $+functions[_zkstack__chain__help__create_commands] )) || _zkstack__chain__help__create_commands() { local commands; commands=() @@ -3193,6 +3372,11 @@ _zkstack__chain__help__register-chain_commands() { local commands; commands=() _describe -t commands 'zkstack chain help register-chain commands' commands "$@" } +(( $+functions[_zkstack__chain__help__server_commands] )) || +_zkstack__chain__help__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help server commands' commands "$@" +} (( $+functions[_zkstack__chain__help__update-token-multiplier-setter_commands] )) || _zkstack__chain__help__update-token-multiplier-setter_commands() { local commands; commands=() @@ -3239,102 +3423,21 @@ _zkstack__chain__register-chain_commands() { local commands; commands=() _describe -t commands 'zkstack chain register-chain commands' commands "$@" } +(( $+functions[_zkstack__chain__server_commands] )) || +_zkstack__chain__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server commands' commands "$@" +} (( $+functions[_zkstack__chain__update-token-multiplier-setter_commands] )) || _zkstack__chain__update-token-multiplier-setter_commands() { local commands; commands=() _describe -t commands 'zkstack chain update-token-multiplier-setter commands' commands "$@" } -(( $+functions[_zkstack__consensus_commands] )) || -_zkstack__consensus_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack consensus commands' commands "$@" -} -(( $+functions[_zkstack__consensus__get-attester-committee_commands] )) || -_zkstack__consensus__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack consensus get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__consensus__help_commands] )) || -_zkstack__consensus__help_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack consensus help commands' commands "$@" -} -(( $+functions[_zkstack__consensus__help__get-attester-committee_commands] )) || -_zkstack__consensus__help__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack consensus help get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__consensus__help__help_commands] )) || -_zkstack__consensus__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack consensus help help commands' commands "$@" -} -(( $+functions[_zkstack__consensus__help__set-attester-committee_commands] )) || -_zkstack__consensus__help__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack consensus help set-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__consensus__set-attester-committee_commands] )) || -_zkstack__consensus__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack consensus set-attester-committee commands' commands "$@" -} (( $+functions[_zkstack__containers_commands] )) || _zkstack__containers_commands() { local commands; commands=() _describe -t commands 'zkstack containers commands' commands "$@" } -(( $+functions[_zkstack__contract-verifier_commands] )) || -_zkstack__contract-verifier_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack contract-verifier commands' commands "$@" -} -(( $+functions[_zkstack__contract-verifier__help_commands] )) || -_zkstack__contract-verifier__help_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack contract-verifier help commands' commands "$@" -} -(( $+functions[_zkstack__contract-verifier__help__help_commands] )) || -_zkstack__contract-verifier__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack contract-verifier help help commands' commands "$@" -} -(( $+functions[_zkstack__contract-verifier__help__init_commands] )) || -_zkstack__contract-verifier__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack contract-verifier help init commands' commands "$@" -} -(( $+functions[_zkstack__contract-verifier__help__run_commands] )) || -_zkstack__contract-verifier__help__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack contract-verifier help run commands' commands "$@" -} -(( $+functions[_zkstack__contract-verifier__init_commands] )) || -_zkstack__contract-verifier__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack contract-verifier init commands' commands "$@" -} -(( $+functions[_zkstack__contract-verifier__run_commands] )) || -_zkstack__contract-verifier__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack contract-verifier run commands' commands "$@" -} (( $+functions[_zkstack__dev_commands] )) || _zkstack__dev_commands() { local commands; commands=( @@ -4322,13 +4425,10 @@ _zkstack__help_commands() { 'chain:Chain related commands' \ 'dev:Supervisor related commands' \ 'prover:Prover related commands' \ -'server:Run server' \ 'external-node:External Node related commands' \ 'containers:Run containers for local development' \ -'contract-verifier:Run contract verifier' \ 'portal:Run dapp-portal' \ 'explorer:Run block-explorer' \ -'consensus:Consensus utilities' \ 'update:Update ZKsync' \ 'markdown:Print markdown help' \ 'help:Print this message or the help of the given subcommand(s)' \ @@ -4356,6 +4456,9 @@ _zkstack__help__chain_commands() { 'deploy-upgrader:Deploy Default Upgrader' \ 'deploy-paymaster:Deploy paymaster smart contract' \ 'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ ) _describe -t commands 'zkstack help chain commands' commands "$@" } @@ -4369,6 +4472,42 @@ _zkstack__help__chain__build-transactions_commands() { local commands; commands=() _describe -t commands 'zkstack help chain build-transactions commands' commands "$@" } +(( $+functions[_zkstack__help__chain__consensus_commands] )) || +_zkstack__help__chain__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ + ) + _describe -t commands 'zkstack help chain consensus commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus__get-attester-committee_commands] )) || +_zkstack__help__chain__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus__set-attester-committee_commands] )) || +_zkstack__help__chain__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier_commands] )) || +_zkstack__help__chain__contract-verifier_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ + ) + _describe -t commands 'zkstack help chain contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__init_commands] )) || +_zkstack__help__chain__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__run_commands] )) || +_zkstack__help__chain__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier run commands' commands "$@" +} (( $+functions[_zkstack__help__chain__create_commands] )) || _zkstack__help__chain__create_commands() { local commands; commands=() @@ -4439,52 +4578,21 @@ _zkstack__help__chain__register-chain_commands() { local commands; commands=() _describe -t commands 'zkstack help chain register-chain commands' commands "$@" } +(( $+functions[_zkstack__help__chain__server_commands] )) || +_zkstack__help__chain__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain server commands' commands "$@" +} (( $+functions[_zkstack__help__chain__update-token-multiplier-setter_commands] )) || _zkstack__help__chain__update-token-multiplier-setter_commands() { local commands; commands=() _describe -t commands 'zkstack help chain update-token-multiplier-setter commands' commands "$@" } -(( $+functions[_zkstack__help__consensus_commands] )) || -_zkstack__help__consensus_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ - ) - _describe -t commands 'zkstack help consensus commands' commands "$@" -} -(( $+functions[_zkstack__help__consensus__get-attester-committee_commands] )) || -_zkstack__help__consensus__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack help consensus get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__help__consensus__set-attester-committee_commands] )) || -_zkstack__help__consensus__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack help consensus set-attester-committee commands' commands "$@" -} (( $+functions[_zkstack__help__containers_commands] )) || _zkstack__help__containers_commands() { local commands; commands=() _describe -t commands 'zkstack help containers commands' commands "$@" } -(( $+functions[_zkstack__help__contract-verifier_commands] )) || -_zkstack__help__contract-verifier_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ - ) - _describe -t commands 'zkstack help contract-verifier commands' commands "$@" -} -(( $+functions[_zkstack__help__contract-verifier__init_commands] )) || -_zkstack__help__contract-verifier__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help contract-verifier init commands' commands "$@" -} -(( $+functions[_zkstack__help__contract-verifier__run_commands] )) || -_zkstack__help__contract-verifier__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack help contract-verifier run commands' commands "$@" -} (( $+functions[_zkstack__help__dev_commands] )) || _zkstack__help__dev_commands() { local commands; commands=( @@ -4879,11 +4987,6 @@ _zkstack__help__prover__setup-keys_commands() { local commands; commands=() _describe -t commands 'zkstack help prover setup-keys commands' commands "$@" } -(( $+functions[_zkstack__help__server_commands] )) || -_zkstack__help__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack help server commands' commands "$@" -} (( $+functions[_zkstack__help__update_commands] )) || _zkstack__help__update_commands() { local commands; commands=() @@ -4978,11 +5081,6 @@ _zkstack__prover__setup-keys_commands() { local commands; commands=() _describe -t commands 'zkstack prover setup-keys commands' commands "$@" } -(( $+functions[_zkstack__server_commands] )) || -_zkstack__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack server commands' commands "$@" -} (( $+functions[_zkstack__update_commands] )) || _zkstack__update_commands() { local commands; commands=() diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.fish b/zkstack_cli/crates/zkstack/completion/zkstack.fish index a1261082e6f0..488d28f27b59 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.fish +++ b/zkstack_cli/crates/zkstack/completion/zkstack.fish @@ -34,13 +34,10 @@ complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "ecosystem" -d 'Ecos complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "chain" -d 'Chain related commands' complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "dev" -d 'Supervisor related commands' complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "prover" -d 'Prover related commands' -complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "server" -d 'Run server' complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "external-node" -d 'External Node related commands' complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "containers" -d 'Run containers for local development' -complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "contract-verifier" -d 'Run contract verifier' complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "portal" -d 'Run dapp-portal' complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "explorer" -d 'Run block-explorer' -complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "consensus" -d 'Consensus utilities' complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "update" -d 'Update ZKsync' complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "markdown" -d 'Print markdown help' complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' @@ -74,6 +71,7 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_se complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l base-token-price-denominator -d 'Base token denominator' -r complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l set-as-default -d 'Set as default chain' -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l evm-emulator -d 'Enable EVM emulator' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l l1-network -d 'L1 Network' -r -f -a "{localhost\t'',sepolia\t'',holesky\t'',mainnet\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l start-containers -d 'Start reth and postgres containers after creation' -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l legacy-bridge @@ -129,24 +127,27 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_se complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from help" -f -a "change-default-chain" -d 'Change the default chain' complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from help" -f -a "setup-observability" -d 'Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -l chain -d 'Chain to use' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -s v -l verbose -d 'Verbose mode' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -l ignore-prerequisites -d 'Ignores prerequisites checks' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "create" -d 'Create a new chain, setting the necessary configurations for later initialization' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "build-transactions" -d 'Create unsigned transactions for chain deployment' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "init" -d 'Initialize chain, deploying necessary contracts and performing on-chain operations' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "genesis" -d 'Run server genesis' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "register-chain" -d 'Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note: After completion, L2 governor can accept ownership by running `accept-chain-ownership`' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "deploy-l2-contracts" -d 'Deploy all L2 contracts (executed by L1 governor)' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "accept-chain-ownership" -d 'Accept ownership of L2 chain (executed by L2 governor). This command should be run after `register-chain` to accept ownership of newly created DiamondProxy contract' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "initialize-bridges" -d 'Initialize bridges on L2' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "deploy-consensus-registry" -d 'Deploy L2 consensus registry' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "deploy-multicall3" -d 'Deploy L2 multicall3' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "deploy-upgrader" -d 'Deploy Default Upgrader' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "deploy-paymaster" -d 'Deploy paymaster smart contract' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "update-token-multiplier-setter" -d 'Update Token Multiplier Setter address on L1' -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "create" -d 'Create a new chain, setting the necessary configurations for later initialization' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "build-transactions" -d 'Create unsigned transactions for chain deployment' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "init" -d 'Initialize chain, deploying necessary contracts and performing on-chain operations' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "genesis" -d 'Run server genesis' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "register-chain" -d 'Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note: After completion, L2 governor can accept ownership by running `accept-chain-ownership`' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-l2-contracts" -d 'Deploy all L2 contracts (executed by L1 governor)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "accept-chain-ownership" -d 'Accept ownership of L2 chain (executed by L2 governor). This command should be run after `register-chain` to accept ownership of newly created DiamondProxy contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "initialize-bridges" -d 'Initialize bridges on L2' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-consensus-registry" -d 'Deploy L2 consensus registry' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-multicall3" -d 'Deploy L2 multicall3' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-upgrader" -d 'Deploy Default Upgrader' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-paymaster" -d 'Deploy paymaster smart contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "update-token-multiplier-setter" -d 'Update Token Multiplier Setter address on L1' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "server" -d 'Run server' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "contract-verifier" -d 'Run contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "consensus" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l chain-name -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l chain-id -d 'Chain ID' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l prover-mode -d 'Prover options' -r -f -a "{no-proofs\t'',gpu\t''}" @@ -158,6 +159,7 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_s complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l base-token-price-denominator -d 'Base token denominator' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l set-as-default -d 'Set as default chain' -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l evm-emulator -d 'Enable EVM emulator' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l l1-network -d 'L1 Network' -r -f -a "{localhost\t'',sepolia\t'',holesky\t'',mainnet\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l legacy-bridge complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -s v -l verbose -d 'Verbose mode' @@ -295,6 +297,29 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_s complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -s v -l verbose -d 'Verbose mode' complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -l ignore-prerequisites -d 'Ignores prerequisites checks' complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l components -d 'Components of server to run' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -s a -l additional-args -d 'Additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l genesis -d 'Run server in genesis mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l build -d 'Build server but don\'t run it' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l uring -d 'Enables uring support for RocksDB' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -f -a "run" -d 'Run contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -f -a "init" -d 'Download required binaries for contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -f -a "set-attester-committee" -d 'Sets the attester committee in the consensus registry contract to `consensus.genesis_spec.attesters` in general.yaml' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -f -a "get-attester-committee" -d 'Fetches the attester committee from the consensus registry contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "create" -d 'Create a new chain, setting the necessary configurations for later initialization' complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "build-transactions" -d 'Create unsigned transactions for chain deployment' complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "init" -d 'Initialize chain, deploying necessary contracts and performing on-chain operations' @@ -308,6 +333,9 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_s complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "deploy-upgrader" -d 'Deploy Default Upgrader' complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "deploy-paymaster" -d 'Deploy paymaster smart contract' complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "update-token-multiplier-setter" -d 'Update Token Multiplier Setter address on L1' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "server" -d 'Run server' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "contract-verifier" -d 'Run contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "consensus" complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -s v -l verbose -d 'Verbose mode' @@ -513,15 +541,6 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_ complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from help" -f -a "init-bellman-cuda" -d 'Initialize bellman-cuda' complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from help" -f -a "compressor-keys" -d 'Download compressor keys' complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c zkstack -n "__fish_zkstack_using_subcommand server" -l components -d 'Components of server to run' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand server" -s a -l additional-args -d 'Additional arguments that can be passed through the CLI' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand server" -l chain -d 'Chain to use' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand server" -l genesis -d 'Run server in genesis mode' -complete -c zkstack -n "__fish_zkstack_using_subcommand server" -l build -d 'Build server but don\'t run it' -complete -c zkstack -n "__fish_zkstack_using_subcommand server" -l uring -d 'Enables uring support for RocksDB' -complete -c zkstack -n "__fish_zkstack_using_subcommand server" -s v -l verbose -d 'Verbose mode' -complete -c zkstack -n "__fish_zkstack_using_subcommand server" -l ignore-prerequisites -d 'Ignores prerequisites checks' -complete -c zkstack -n "__fish_zkstack_using_subcommand server" -s h -l help -d 'Print help' complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init run help" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init run help" -s v -l verbose -d 'Verbose mode' complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init run help" -l ignore-prerequisites -d 'Ignores prerequisites checks' @@ -559,30 +578,6 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand containers" -l chain -d complete -c zkstack -n "__fish_zkstack_using_subcommand containers" -s v -l verbose -d 'Verbose mode' complete -c zkstack -n "__fish_zkstack_using_subcommand containers" -l ignore-prerequisites -d 'Ignores prerequisites checks' complete -c zkstack -n "__fish_zkstack_using_subcommand containers" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and not __fish_seen_subcommand_from run init help" -l chain -d 'Chain to use' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and not __fish_seen_subcommand_from run init help" -s v -l verbose -d 'Verbose mode' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and not __fish_seen_subcommand_from run init help" -l ignore-prerequisites -d 'Ignores prerequisites checks' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and not __fish_seen_subcommand_from run init help" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and not __fish_seen_subcommand_from run init help" -f -a "run" -d 'Run contract verifier' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and not __fish_seen_subcommand_from run init help" -f -a "init" -d 'Download required binaries for contract verifier' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and not __fish_seen_subcommand_from run init help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from run" -l chain -d 'Chain to use' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from run" -s v -l verbose -d 'Verbose mode' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from run" -l ignore-prerequisites -d 'Ignores prerequisites checks' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from run" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -l zksolc-version -d 'Version of zksolc to install' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -l zkvyper-version -d 'Version of zkvyper to install' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -l solc-version -d 'Version of solc to install' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -l era-vm-solc-version -d 'Version of era vm solc to install' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -l vyper-version -d 'Version of vyper to install' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -l chain -d 'Chain to use' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -l only -d 'Install only provided compilers' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -s v -l verbose -d 'Verbose mode' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -l ignore-prerequisites -d 'Ignores prerequisites checks' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from init" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from help" -f -a "run" -d 'Run contract verifier' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from help" -f -a "init" -d 'Download required binaries for contract verifier' -complete -c zkstack -n "__fish_zkstack_using_subcommand contract-verifier; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c zkstack -n "__fish_zkstack_using_subcommand portal" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand portal" -s v -l verbose -d 'Verbose mode' complete -c zkstack -n "__fish_zkstack_using_subcommand portal" -l ignore-prerequisites -d 'Ignores prerequisites checks' @@ -611,26 +606,6 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_see complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from help" -f -a "run-backend" -d 'Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from help" -f -a "run" -d 'Run explorer app' complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and not __fish_seen_subcommand_from set-attester-committee get-attester-committee help" -l chain -d 'Chain to use' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and not __fish_seen_subcommand_from set-attester-committee get-attester-committee help" -s v -l verbose -d 'Verbose mode' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and not __fish_seen_subcommand_from set-attester-committee get-attester-committee help" -l ignore-prerequisites -d 'Ignores prerequisites checks' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and not __fish_seen_subcommand_from set-attester-committee get-attester-committee help" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and not __fish_seen_subcommand_from set-attester-committee get-attester-committee help" -f -a "set-attester-committee" -d 'Sets the attester committee in the consensus registry contract to `consensus.genesis_spec.attesters` in general.yaml' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and not __fish_seen_subcommand_from set-attester-committee get-attester-committee help" -f -a "get-attester-committee" -d 'Fetches the attester committee from the consensus registry contract' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and not __fish_seen_subcommand_from set-attester-committee get-attester-committee help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from set-attester-committee" -l from-file -d 'Sets the attester committee in the consensus registry contract to the committee in the yaml file. File format is definied in `commands/consensus/proto/mod.proto`' -r -F -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from set-attester-committee" -l chain -d 'Chain to use' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from set-attester-committee" -l from-genesis -d 'Sets the attester committee in the consensus registry contract to `consensus.genesis_spec.attesters` in general.yaml' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from set-attester-committee" -s v -l verbose -d 'Verbose mode' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from set-attester-committee" -l ignore-prerequisites -d 'Ignores prerequisites checks' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from set-attester-committee" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from get-attester-committee" -l chain -d 'Chain to use' -r -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from get-attester-committee" -s v -l verbose -d 'Verbose mode' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from get-attester-committee" -l ignore-prerequisites -d 'Ignores prerequisites checks' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from get-attester-committee" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from help" -f -a "set-attester-committee" -d 'Sets the attester committee in the consensus registry contract to `consensus.genesis_spec.attesters` in general.yaml' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from help" -f -a "get-attester-committee" -d 'Fetches the attester committee from the consensus registry contract' -complete -c zkstack -n "__fish_zkstack_using_subcommand consensus; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c zkstack -n "__fish_zkstack_using_subcommand update" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand update" -s c -l only-config -d 'Update only the config files' complete -c zkstack -n "__fish_zkstack_using_subcommand update" -s v -l verbose -d 'Verbose mode' @@ -640,21 +615,18 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand markdown" -l chain -d 'C complete -c zkstack -n "__fish_zkstack_using_subcommand markdown" -s v -l verbose -d 'Verbose mode' complete -c zkstack -n "__fish_zkstack_using_subcommand markdown" -l ignore-prerequisites -d 'Ignores prerequisites checks' complete -c zkstack -n "__fish_zkstack_using_subcommand markdown" -s h -l help -d 'Print help' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "autocomplete" -d 'Create shell autocompletion files' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "ecosystem" -d 'Ecosystem related commands' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "chain" -d 'Chain related commands' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "dev" -d 'Supervisor related commands' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "prover" -d 'Prover related commands' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "server" -d 'Run server' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "external-node" -d 'External Node related commands' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "containers" -d 'Run containers for local development' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "contract-verifier" -d 'Run contract verifier' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "portal" -d 'Run dapp-portal' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "explorer" -d 'Run block-explorer' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "consensus" -d 'Consensus utilities' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "update" -d 'Update ZKsync' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "markdown" -d 'Print markdown help' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "autocomplete" -d 'Create shell autocompletion files' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "ecosystem" -d 'Ecosystem related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "chain" -d 'Chain related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "dev" -d 'Supervisor related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "prover" -d 'Prover related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "external-node" -d 'External Node related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "containers" -d 'Run containers for local development' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "portal" -d 'Run dapp-portal' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "explorer" -d 'Run block-explorer' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "update" -d 'Update ZKsync' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "markdown" -d 'Print markdown help' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from ecosystem" -f -a "create" -d 'Create a new ecosystem and chain, setting necessary configurations for later initialization' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from ecosystem" -f -a "build-transactions" -d 'Create transactions to build ecosystem contracts' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from ecosystem" -f -a "init" -d 'Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' @@ -673,6 +645,9 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_su complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "deploy-upgrader" -d 'Deploy Default Upgrader' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "deploy-paymaster" -d 'Deploy paymaster smart contract' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "update-token-multiplier-setter" -d 'Update Token Multiplier Setter address on L1' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "server" -d 'Run server' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "contract-verifier" -d 'Run contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "consensus" complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "database" -d 'Database related commands' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "test" -d 'Run tests' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "clean" -d 'Clean artifacts' @@ -693,10 +668,6 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_su complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from external-node" -f -a "configs" -d 'Prepare configs for EN' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from external-node" -f -a "init" -d 'Init databases' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from external-node" -f -a "run" -d 'Run external node' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from contract-verifier" -f -a "run" -d 'Run contract verifier' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from contract-verifier" -f -a "init" -d 'Download required binaries for contract verifier' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from explorer" -f -a "init" -d 'Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from explorer" -f -a "run-backend" -d 'Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from explorer" -f -a "run" -d 'Run explorer app' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from consensus" -f -a "set-attester-committee" -d 'Sets the attester committee in the consensus registry contract to `consensus.genesis_spec.attesters` in general.yaml' -complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from consensus" -f -a "get-attester-committee" -d 'Fetches the attester committee from the consensus registry contract' diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.sh b/zkstack_cli/crates/zkstack/completion/zkstack.sh index 7cdb20ae9aa7..02bb834d07bf 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.sh +++ b/zkstack_cli/crates/zkstack/completion/zkstack.sh @@ -18,15 +18,9 @@ _zkstack() { zkstack,chain) cmd="zkstack__chain" ;; - zkstack,consensus) - cmd="zkstack__consensus" - ;; zkstack,containers) cmd="zkstack__containers" ;; - zkstack,contract-verifier) - cmd="zkstack__contract__verifier" - ;; zkstack,dev) cmd="zkstack__dev" ;; @@ -51,9 +45,6 @@ _zkstack() { zkstack,prover) cmd="zkstack__prover" ;; - zkstack,server) - cmd="zkstack__server" - ;; zkstack,update) cmd="zkstack__update" ;; @@ -63,6 +54,12 @@ _zkstack() { zkstack__chain,build-transactions) cmd="zkstack__chain__build__transactions" ;; + zkstack__chain,consensus) + cmd="zkstack__chain__consensus" + ;; + zkstack__chain,contract-verifier) + cmd="zkstack__chain__contract__verifier" + ;; zkstack__chain,create) cmd="zkstack__chain__create" ;; @@ -96,9 +93,48 @@ _zkstack() { zkstack__chain,register-chain) cmd="zkstack__chain__register__chain" ;; + zkstack__chain,server) + cmd="zkstack__chain__server" + ;; zkstack__chain,update-token-multiplier-setter) cmd="zkstack__chain__update__token__multiplier__setter" ;; + zkstack__chain__consensus,get-attester-committee) + cmd="zkstack__chain__consensus__get__attester__committee" + ;; + zkstack__chain__consensus,help) + cmd="zkstack__chain__consensus__help" + ;; + zkstack__chain__consensus,set-attester-committee) + cmd="zkstack__chain__consensus__set__attester__committee" + ;; + zkstack__chain__consensus__help,get-attester-committee) + cmd="zkstack__chain__consensus__help__get__attester__committee" + ;; + zkstack__chain__consensus__help,help) + cmd="zkstack__chain__consensus__help__help" + ;; + zkstack__chain__consensus__help,set-attester-committee) + cmd="zkstack__chain__consensus__help__set__attester__committee" + ;; + zkstack__chain__contract__verifier,help) + cmd="zkstack__chain__contract__verifier__help" + ;; + zkstack__chain__contract__verifier,init) + cmd="zkstack__chain__contract__verifier__init" + ;; + zkstack__chain__contract__verifier,run) + cmd="zkstack__chain__contract__verifier__run" + ;; + zkstack__chain__contract__verifier__help,help) + cmd="zkstack__chain__contract__verifier__help__help" + ;; + zkstack__chain__contract__verifier__help,init) + cmd="zkstack__chain__contract__verifier__help__init" + ;; + zkstack__chain__contract__verifier__help,run) + cmd="zkstack__chain__contract__verifier__help__run" + ;; zkstack__chain__genesis,help) cmd="zkstack__chain__genesis__help" ;; @@ -123,6 +159,12 @@ _zkstack() { zkstack__chain__help,build-transactions) cmd="zkstack__chain__help__build__transactions" ;; + zkstack__chain__help,consensus) + cmd="zkstack__chain__help__consensus" + ;; + zkstack__chain__help,contract-verifier) + cmd="zkstack__chain__help__contract__verifier" + ;; zkstack__chain__help,create) cmd="zkstack__chain__help__create" ;; @@ -156,9 +198,24 @@ _zkstack() { zkstack__chain__help,register-chain) cmd="zkstack__chain__help__register__chain" ;; + zkstack__chain__help,server) + cmd="zkstack__chain__help__server" + ;; zkstack__chain__help,update-token-multiplier-setter) cmd="zkstack__chain__help__update__token__multiplier__setter" ;; + zkstack__chain__help__consensus,get-attester-committee) + cmd="zkstack__chain__help__consensus__get__attester__committee" + ;; + zkstack__chain__help__consensus,set-attester-committee) + cmd="zkstack__chain__help__consensus__set__attester__committee" + ;; + zkstack__chain__help__contract__verifier,init) + cmd="zkstack__chain__help__contract__verifier__init" + ;; + zkstack__chain__help__contract__verifier,run) + cmd="zkstack__chain__help__contract__verifier__run" + ;; zkstack__chain__help__genesis,init-database) cmd="zkstack__chain__help__genesis__init__database" ;; @@ -180,42 +237,6 @@ _zkstack() { zkstack__chain__init__help,help) cmd="zkstack__chain__init__help__help" ;; - zkstack__consensus,get-attester-committee) - cmd="zkstack__consensus__get__attester__committee" - ;; - zkstack__consensus,help) - cmd="zkstack__consensus__help" - ;; - zkstack__consensus,set-attester-committee) - cmd="zkstack__consensus__set__attester__committee" - ;; - zkstack__consensus__help,get-attester-committee) - cmd="zkstack__consensus__help__get__attester__committee" - ;; - zkstack__consensus__help,help) - cmd="zkstack__consensus__help__help" - ;; - zkstack__consensus__help,set-attester-committee) - cmd="zkstack__consensus__help__set__attester__committee" - ;; - zkstack__contract__verifier,help) - cmd="zkstack__contract__verifier__help" - ;; - zkstack__contract__verifier,init) - cmd="zkstack__contract__verifier__init" - ;; - zkstack__contract__verifier,run) - cmd="zkstack__contract__verifier__run" - ;; - zkstack__contract__verifier__help,help) - cmd="zkstack__contract__verifier__help__help" - ;; - zkstack__contract__verifier__help,init) - cmd="zkstack__contract__verifier__help__init" - ;; - zkstack__contract__verifier__help,run) - cmd="zkstack__contract__verifier__help__run" - ;; zkstack__dev,clean) cmd="zkstack__dev__clean" ;; @@ -687,15 +708,9 @@ _zkstack() { zkstack__help,chain) cmd="zkstack__help__chain" ;; - zkstack__help,consensus) - cmd="zkstack__help__consensus" - ;; zkstack__help,containers) cmd="zkstack__help__containers" ;; - zkstack__help,contract-verifier) - cmd="zkstack__help__contract__verifier" - ;; zkstack__help,dev) cmd="zkstack__help__dev" ;; @@ -720,9 +735,6 @@ _zkstack() { zkstack__help,prover) cmd="zkstack__help__prover" ;; - zkstack__help,server) - cmd="zkstack__help__server" - ;; zkstack__help,update) cmd="zkstack__help__update" ;; @@ -732,6 +744,12 @@ _zkstack() { zkstack__help__chain,build-transactions) cmd="zkstack__help__chain__build__transactions" ;; + zkstack__help__chain,consensus) + cmd="zkstack__help__chain__consensus" + ;; + zkstack__help__chain,contract-verifier) + cmd="zkstack__help__chain__contract__verifier" + ;; zkstack__help__chain,create) cmd="zkstack__help__chain__create" ;; @@ -762,9 +780,24 @@ _zkstack() { zkstack__help__chain,register-chain) cmd="zkstack__help__chain__register__chain" ;; + zkstack__help__chain,server) + cmd="zkstack__help__chain__server" + ;; zkstack__help__chain,update-token-multiplier-setter) cmd="zkstack__help__chain__update__token__multiplier__setter" ;; + zkstack__help__chain__consensus,get-attester-committee) + cmd="zkstack__help__chain__consensus__get__attester__committee" + ;; + zkstack__help__chain__consensus,set-attester-committee) + cmd="zkstack__help__chain__consensus__set__attester__committee" + ;; + zkstack__help__chain__contract__verifier,init) + cmd="zkstack__help__chain__contract__verifier__init" + ;; + zkstack__help__chain__contract__verifier,run) + cmd="zkstack__help__chain__contract__verifier__run" + ;; zkstack__help__chain__genesis,init-database) cmd="zkstack__help__chain__genesis__init__database" ;; @@ -774,18 +807,6 @@ _zkstack() { zkstack__help__chain__init,configs) cmd="zkstack__help__chain__init__configs" ;; - zkstack__help__consensus,get-attester-committee) - cmd="zkstack__help__consensus__get__attester__committee" - ;; - zkstack__help__consensus,set-attester-committee) - cmd="zkstack__help__consensus__set__attester__committee" - ;; - zkstack__help__contract__verifier,init) - cmd="zkstack__help__contract__verifier__init" - ;; - zkstack__help__contract__verifier,run) - cmd="zkstack__help__contract__verifier__run" - ;; zkstack__help__dev,clean) cmd="zkstack__help__dev__clean" ;; @@ -1000,7 +1021,7 @@ _zkstack() { case "${cmd}" in zkstack) - opts="-v -h -V --verbose --chain --ignore-prerequisites --help --version autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" + opts="-v -h -V --verbose --chain --ignore-prerequisites --help --version autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1048,7 +1069,7 @@ _zkstack() { return 0 ;; zkstack__chain) - opts="-v -h --verbose --chain --ignore-prerequisites --help create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" + opts="-v -h --verbose --chain --ignore-prerequisites --help create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1161,68 +1182,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__create) - opts="-v -h --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --verbose --chain --ignore-prerequisites --help" + zkstack__chain__consensus) + opts="-v -h --verbose --chain --ignore-prerequisites --help set-attester-committee get-attester-committee help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --chain-name) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --chain-id) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --prover-mode) - COMPREPLY=($(compgen -W "no-proofs gpu" -- "${cur}")) - return 0 - ;; - --wallet-creation) - COMPREPLY=($(compgen -W "localhost random empty in-file" -- "${cur}")) - return 0 - ;; - --wallet-path) - local oldifs - if [ -n "${IFS+x}" ]; then - oldifs="$IFS" - fi - IFS=$'\n' - COMPREPLY=($(compgen -f "${cur}")) - if [ -n "${oldifs+x}" ]; then - IFS="$oldifs" - fi - if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then - compopt -o filenames - fi - return 0 - ;; - --l1-batch-commit-data-generator-mode) - COMPREPLY=($(compgen -W "rollup validium" -- "${cur}")) - return 0 - ;; - --base-token-address) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --base-token-price-nominator) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --base-token-price-denominator) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --set-as-default) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --evm-emulator) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -1234,37 +1200,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__deploy__consensus__registry) - opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__consensus__get__attester__committee) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --verify) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --verifier) - COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) - return 0 - ;; - --verifier-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --verifier-api-key) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -a) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -1276,41 +1218,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__deploy__l2__contracts) - opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__consensus__help) + opts="set-attester-committee get-attester-committee help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --verify) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --verifier) - COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) - return 0 - ;; - --verifier-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --verifier-api-key) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -a) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; *) COMPREPLY=() ;; @@ -1318,41 +1232,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__deploy__multicall3) - opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__consensus__help__get__attester__committee) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --verify) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --verifier) - COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) - return 0 - ;; - --verifier-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --verifier-api-key) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -a) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; *) COMPREPLY=() ;; @@ -1360,34 +1246,42 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__deploy__paymaster) - opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__consensus__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --verify) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --verifier) - COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) - return 0 - ;; - --verifier-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --verifier-api-key) - COMPREPLY=($(compgen -f "${cur}")) - return 0 + *) + COMPREPLY=() ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__help__set__attester__committee) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() ;; - -a) + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__set__attester__committee) + opts="-v -h --from-genesis --from-file --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --from-file) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -1402,37 +1296,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__deploy__upgrader) - opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + zkstack__chain__contract__verifier) + opts="-v -h --verbose --chain --ignore-prerequisites --help run init help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --verify) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --verifier) - COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) - return 0 - ;; - --verifier-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --verifier-api-key) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -a) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -1444,25 +1314,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__genesis) - opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --verbose --chain --ignore-prerequisites --help init-database server help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__contract__verifier__help) + opts="run init help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --server-db-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --server-db-name) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; *) COMPREPLY=() ;; @@ -1470,9 +1328,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__genesis__help) - opts="init-database server help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + zkstack__chain__contract__verifier__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1484,7 +1342,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__genesis__help__help) + zkstack__chain__contract__verifier__help__init) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -1498,7 +1356,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__genesis__help__init__database) + zkstack__chain__contract__verifier__help__run) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -1512,13 +1370,37 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__genesis__help__server) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + zkstack__chain__contract__verifier__init) + opts="-v -h --zksolc-version --zkvyper-version --solc-version --era-vm-solc-version --vyper-version --only --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --zksolc-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --zkvyper-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --solc-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --era-vm-solc-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --vyper-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1526,19 +1408,88 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__genesis__init__database) - opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --verbose --chain --ignore-prerequisites --help" + zkstack__chain__contract__verifier__run) + opts="-v -h --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --server-db-url) + --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --server-db-name) + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__create) + opts="-v -h --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --l1-network --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --prover-mode) + COMPREPLY=($(compgen -W "no-proofs gpu" -- "${cur}")) + return 0 + ;; + --wallet-creation) + COMPREPLY=($(compgen -W "localhost random empty in-file" -- "${cur}")) + return 0 + ;; + --wallet-path) + local oldifs + if [ -n "${IFS+x}" ]; then + oldifs="$IFS" + fi + IFS=$'\n' COMPREPLY=($(compgen -f "${cur}")) + if [ -n "${oldifs+x}" ]; then + IFS="$oldifs" + fi + if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then + compopt -o filenames + fi + return 0 + ;; + --l1-batch-commit-data-generator-mode) + COMPREPLY=($(compgen -W "rollup validium" -- "${cur}")) + return 0 + ;; + --base-token-address) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --base-token-price-nominator) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --base-token-price-denominator) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --set-as-default) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --evm-emulator) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --l1-network) + COMPREPLY=($(compgen -W "localhost sepolia holesky mainnet" -- "${cur}")) return 0 ;; --chain) @@ -1552,13 +1503,37 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__genesis__server) - opts="-v -h --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + zkstack__chain__deploy__consensus__registry) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -1570,13 +1545,41 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help) - opts="create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter help" + zkstack__chain__deploy__l2__contracts) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1584,13 +1587,83 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__accept__chain__ownership) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + zkstack__chain__deploy__multicall3) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__deploy__paymaster) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1598,13 +1671,41 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__build__transactions) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + zkstack__chain__deploy__upgrader) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1612,13 +1713,25 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__create) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + zkstack__chain__genesis) + opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --verbose --chain --ignore-prerequisites --help init-database server help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --server-db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1626,8 +1739,8 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__deploy__consensus__registry) - opts="" + zkstack__chain__genesis__help) + opts="init-database server help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1640,9 +1753,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__deploy__l2__contracts) + zkstack__chain__genesis__help__help) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1654,9 +1767,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__deploy__multicall3) + zkstack__chain__genesis__help__init__database) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1668,9 +1781,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__deploy__paymaster) + zkstack__chain__genesis__help__server) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1682,13 +1795,25 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__deploy__upgrader) - opts="" + zkstack__chain__genesis__init__database) + opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --server-db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1696,13 +1821,17 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__genesis) - opts="init-database server" + zkstack__chain__genesis__server) + opts="-v -h --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -1710,9 +1839,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__genesis__init__database) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + zkstack__chain__help) + opts="create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1724,9 +1853,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__genesis__server) + zkstack__chain__help__accept__chain__ownership) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1738,7 +1867,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__help) + zkstack__chain__help__build__transactions) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -1752,8 +1881,8 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__init) - opts="configs" + zkstack__chain__help__consensus) + opts="set-attester-committee get-attester-committee" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1766,7 +1895,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__init__configs) + zkstack__chain__help__consensus__get__attester__committee) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -1780,9 +1909,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__initialize__bridges) + zkstack__chain__help__consensus__set__attester__committee) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1794,8 +1923,8 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__register__chain) - opts="" + zkstack__chain__help__contract__verifier) + opts="run init" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1808,9 +1937,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__help__update__token__multiplier__setter) + zkstack__chain__help__contract__verifier__init) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1822,57 +1951,41 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__init) - opts="-a -d -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --server-db-url --server-db-name --dont-drop --deploy-paymaster --l1-rpc-url --no-port-reallocation --dev --verbose --chain --ignore-prerequisites --help configs help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__help__contract__verifier__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --verify) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --verifier) - COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) - return 0 - ;; - --verifier-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --verifier-api-key) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -a) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --server-db-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --server-db-name) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --deploy-paymaster) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --l1-rpc-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 + *) + COMPREPLY=() ;; - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__create) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__deploy__consensus__registry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in *) COMPREPLY=() ;; @@ -1880,29 +1993,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__init__configs) - opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --l1-rpc-url --no-port-reallocation --verbose --chain --ignore-prerequisites --help" + zkstack__chain__help__deploy__l2__contracts) + opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --server-db-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --server-db-name) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --l1-rpc-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; *) COMPREPLY=() ;; @@ -1910,8 +2007,8 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__init__help) - opts="configs help" + zkstack__chain__help__deploy__multicall3) + opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1924,9 +2021,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__init__help__configs) + zkstack__chain__help__deploy__paymaster) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1938,9 +2035,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__init__help__help) + zkstack__chain__help__deploy__upgrader) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -1952,41 +2049,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__initialize__bridges) - opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__help__genesis) + opts="init-database server" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --verify) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --verifier) - COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) - return 0 - ;; - --verifier-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --verifier-api-key) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -a) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; *) COMPREPLY=() ;; @@ -1994,41 +2063,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__register__chain) - opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__help__genesis__init__database) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --verify) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --verifier) - COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) - return 0 - ;; - --verifier-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --verifier-api-key) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -a) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; *) COMPREPLY=() ;; @@ -2036,41 +2077,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__chain__update__token__multiplier__setter) - opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__help__genesis__server) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --verify) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) - return 0 - ;; - --verifier) - COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) - return 0 - ;; - --verifier-url) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --verifier-api-key) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -a) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; *) COMPREPLY=() ;; @@ -2078,17 +2091,13 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__consensus) - opts="-v -h --verbose --chain --ignore-prerequisites --help set-attester-committee get-attester-committee help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + zkstack__chain__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; *) COMPREPLY=() ;; @@ -2096,17 +2105,27 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__consensus__get__attester__committee) - opts="-v -h --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__help__init) + opts="configs" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 + *) + COMPREPLY=() ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__init__configs) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in *) COMPREPLY=() ;; @@ -2114,9 +2133,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__consensus__help) - opts="set-attester-committee get-attester-committee help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__help__initialize__bridges) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -2128,7 +2147,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__consensus__help__get__attester__committee) + zkstack__chain__help__register__chain) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -2142,7 +2161,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__consensus__help__help) + zkstack__chain__help__server) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -2156,7 +2175,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__consensus__help__set__attester__committee) + zkstack__chain__help__update__token__multiplier__setter) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -2170,14 +2189,50 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__consensus__set__attester__committee) - opts="-v -h --from-genesis --from-file --verbose --chain --ignore-prerequisites --help" + zkstack__chain__init) + opts="-a -d -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --server-db-url --server-db-name --dont-drop --deploy-paymaster --l1-rpc-url --no-port-reallocation --dev --verbose --chain --ignore-prerequisites --help configs help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --from-file) + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --deploy-paymaster) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --l1-rpc-url) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -2192,19 +2247,23 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__containers) - opts="-o -v -h --observability --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + zkstack__chain__init__configs) + opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --l1-rpc-url --no-port-reallocation --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --observability) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) + --server-db-url) + COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - -o) - COMPREPLY=($(compgen -W "true false" -- "${cur}")) + --server-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --l1-rpc-url) + COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --chain) @@ -2218,17 +2277,27 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__contract__verifier) - opts="-v -h --verbose --chain --ignore-prerequisites --help run init help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + zkstack__chain__init__help) + opts="configs help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__init__help__configs) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; *) COMPREPLY=() ;; @@ -2236,9 +2305,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__contract__verifier__help) - opts="run init help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__chain__init__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -2250,13 +2319,41 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__contract__verifier__help__help) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + zkstack__chain__initialize__bridges) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -2264,13 +2361,41 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__contract__verifier__help__init) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + zkstack__chain__register__chain) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -2278,13 +2403,29 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__contract__verifier__help__run) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + zkstack__chain__server) + opts="-a -v -h --components --genesis --additional-args --build --uring --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --components) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; @@ -2292,30 +2433,34 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__contract__verifier__init) - opts="-v -h --zksolc-version --zkvyper-version --solc-version --era-vm-solc-version --vyper-version --only --verbose --chain --ignore-prerequisites --help" + zkstack__chain__update__token__multiplier__setter) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in - --zksolc-version) - COMPREPLY=($(compgen -f "${cur}")) + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 ;; - --zkvyper-version) + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --solc-version) + --verifier-api-key) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --era-vm-solc-version) + --additional-args) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --vyper-version) + -a) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -2330,13 +2475,21 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__contract__verifier__run) - opts="-v -h --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__containers) + opts="-o -v -h --observability --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --observability) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -4647,7 +4800,7 @@ _zkstack() { return 0 ;; zkstack__ecosystem__create) - opts="-v -h --ecosystem-name --l1-network --link-to-code --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --start-containers --verbose --chain --ignore-prerequisites --help" + opts="-v -h --ecosystem-name --l1-network --link-to-code --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --l1-network --start-containers --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4723,6 +4876,10 @@ _zkstack() { COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 ;; + --l1-network) + COMPREPLY=($(compgen -W "localhost sepolia holesky mainnet" -- "${cur}")) + return 0 + ;; --start-containers) COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 @@ -5245,7 +5402,7 @@ _zkstack() { return 0 ;; zkstack__help) - opts="autocomplete ecosystem chain dev prover server external-node containers contract-verifier portal explorer consensus update markdown help" + opts="autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5273,7 +5430,7 @@ _zkstack() { return 0 ;; zkstack__help__chain) - opts="create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter" + opts="create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5314,8 +5471,8 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__create) - opts="" + zkstack__help__chain__consensus) + opts="set-attester-committee get-attester-committee" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5328,9 +5485,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__deploy__consensus__registry) + zkstack__help__chain__consensus__get__attester__committee) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5342,8 +5499,22 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__deploy__l2__contracts) + zkstack__help__chain__consensus__set__attester__committee) opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__contract__verifier) + opts="run init" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5356,9 +5527,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__deploy__multicall3) + zkstack__help__chain__contract__verifier__init) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5370,9 +5541,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__deploy__paymaster) + zkstack__help__chain__contract__verifier__run) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5384,7 +5555,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__deploy__upgrader) + zkstack__help__chain__create) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -5398,8 +5569,8 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__genesis) - opts="init-database server" + zkstack__help__chain__deploy__consensus__registry) + opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5412,9 +5583,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__genesis__init__database) + zkstack__help__chain__deploy__l2__contracts) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5426,9 +5597,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__genesis__server) + zkstack__help__chain__deploy__multicall3) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5440,8 +5611,8 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__init) - opts="configs" + zkstack__help__chain__deploy__paymaster) + opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5454,9 +5625,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__init__configs) + zkstack__help__chain__deploy__upgrader) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5468,8 +5639,8 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__initialize__bridges) - opts="" + zkstack__help__chain__genesis) + opts="init-database server" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5482,9 +5653,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__register__chain) + zkstack__help__chain__genesis__init__database) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5496,9 +5667,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__chain__update__token__multiplier__setter) + zkstack__help__chain__genesis__server) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5510,9 +5681,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__consensus) - opts="set-attester-committee get-attester-committee" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__help__chain__init) + opts="configs" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5524,9 +5695,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__consensus__get__attester__committee) + zkstack__help__chain__init__configs) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5538,7 +5709,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__consensus__set__attester__committee) + zkstack__help__chain__initialize__bridges) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -5552,9 +5723,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__containers) + zkstack__help__chain__register__chain) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5566,9 +5737,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__contract__verifier) - opts="run init" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + zkstack__help__chain__server) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -5580,7 +5751,7 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__contract__verifier__init) + zkstack__help__chain__update__token__multiplier__setter) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) @@ -5594,9 +5765,9 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__contract__verifier__run) + zkstack__help__containers) opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi @@ -6518,20 +6689,6 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__help__server) - opts="" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; zkstack__help__update) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then @@ -6948,36 +7105,6 @@ _zkstack() { COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; - zkstack__server) - opts="-a -v -h --components --genesis --additional-args --build --uring --verbose --chain --ignore-prerequisites --help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - fi - case "${prev}" in - --components) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --additional-args) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - -a) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - --chain) - COMPREPLY=($(compgen -f "${cur}")) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) - return 0 - ;; zkstack__update) opts="-c -v -h --only-config --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then From b87969ab6f2879968430d61901a2f64006b3f864 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 31 Oct 2024 12:42:57 -0300 Subject: [PATCH 18/38] generate autocomplete --- _zkstack.zsh | 5094 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 5094 insertions(+) create mode 100644 _zkstack.zsh diff --git a/_zkstack.zsh b/_zkstack.zsh new file mode 100644 index 000000000000..0c812a5f5b32 --- /dev/null +++ b/_zkstack.zsh @@ -0,0 +1,5094 @@ +#compdef zkstack + +autoload -U is-at-least + +_zkstack() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + _arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_zkstack_commands" \ +"*::: :->zkstack" \ +&& ret=0 + case $state in + (zkstack) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-command-$line[1]:" + case $line[1] in + (autocomplete) +_arguments "${_arguments_options[@]}" : \ +'--generate=[The shell to generate the autocomplete script for]:GENERATOR:(bash elvish fish powershell zsh)' \ +'-o+[The out directory to write the autocomplete script to]:OUT:_files' \ +'--out=[The out directory to write the autocomplete script to]:OUT:_files' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(ecosystem) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__ecosystem_commands" \ +"*::: :->ecosystem" \ +&& ret=0 + + case $state in + (ecosystem) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-ecosystem-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +'--ecosystem-name=[]:ECOSYSTEM_NAME:_default' \ +'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ +'--link-to-code=[Code link]:LINK_TO_CODE:_files -/' \ +'--chain-name=[]:CHAIN_NAME:_default' \ +'--chain-id=[Chain ID]:CHAIN_ID:_default' \ +'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ +'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" +random\:"Generate random wallets" +empty\:"Generate placeholder wallets" +in-file\:"Specify file with wallets"))' \ +'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ +'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ +'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ +'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ +'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ +'--set-as-default=[Set as default chain]' \ +'--evm-emulator=[Enable EVM emulator]' \ +'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ +'--start-containers=[Start reth and postgres containers after creation]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--legacy-bridge[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +'--sender=[Address of the transaction sender]:SENDER:_default' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'-o+[Output directory for the generated files]:OUT:_files' \ +'--out=[Output directory for the generated files]:OUT:_files' \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--deploy-erc20=[Deploy ERC20 contracts]' \ +'--deploy-ecosystem=[Deploy ecosystem contracts]' \ +'--ecosystem-contracts-path=[Path to ecosystem contracts]:ECOSYSTEM_CONTRACTS_PATH:_files' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--deploy-paymaster=[Deploy Paymaster contract]' \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'-o+[Enable Grafana]' \ +'--observability=[Enable Grafana]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-d[]' \ +'--dont-drop[]' \ +'--ecosystem-only[Initialize ecosystem only and skip chain initialization (chain can be initialized later with \`chain init\` subcommand)]' \ +'--dev[Use defaults for all options and flags. Suitable for local development]' \ +'--no-port-reallocation[Do not reallocate ports]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(change-default-chain) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::name:_default' \ +&& ret=0 +;; +(setup-observability) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__ecosystem__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-ecosystem-help-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(change-default-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-observability) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(chain) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain_commands" \ +"*::: :->chain" \ +&& ret=0 + + case $state in + (chain) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +'--chain-name=[]:CHAIN_NAME:_default' \ +'--chain-id=[Chain ID]:CHAIN_ID:_default' \ +'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ +'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" +random\:"Generate random wallets" +empty\:"Generate placeholder wallets" +in-file\:"Specify file with wallets"))' \ +'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ +'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ +'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ +'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ +'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ +'--set-as-default=[Set as default chain]' \ +'--evm-emulator=[Enable EVM emulator]' \ +'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--legacy-bridge[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +'-o+[Output directory for the generated files]:OUT:_files' \ +'--out=[Output directory for the generated files]:OUT:_files' \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--deploy-paymaster=[]' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-d[]' \ +'--dont-drop[]' \ +'--no-port-reallocation[Do not reallocate ports]' \ +'--dev[Use defaults for all options and flags. Suitable for local development]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +":: :_zkstack__chain__init_commands" \ +"*::: :->init" \ +&& ret=0 + + case $state in + (init) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-init-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-d[Use default database urls and names]' \ +'--dev[Use default database urls and names]' \ +'-d[]' \ +'--dont-drop[]' \ +'--no-port-reallocation[Do not reallocate ports]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__init__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-init-help-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(genesis) +_arguments "${_arguments_options[@]}" : \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-d[Use default database urls and names]' \ +'--dev[Use default database urls and names]' \ +'-d[]' \ +'--dont-drop[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__genesis_commands" \ +"*::: :->genesis" \ +&& ret=0 + + case $state in + (genesis) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-genesis-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-d[Use default database urls and names]' \ +'--dev[Use default database urls and names]' \ +'-d[]' \ +'--dont-drop[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__genesis__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-genesis-help-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(register-chain) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-multicall3) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-upgrader) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-paymaster) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(update-token-multiplier-setter) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +'*--components=[Components of server to run]:COMPONENTS:_default' \ +'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--genesis[Run server in genesis mode]' \ +'--build[Build server but don'\''t run it]' \ +'--uring[Enables uring support for RocksDB]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--zksolc-version=[Version of zksolc to install]:ZKSOLC_VERSION:_default' \ +'--zkvyper-version=[Version of zkvyper to install]:ZKVYPER_VERSION:_default' \ +'--solc-version=[Version of solc to install]:SOLC_VERSION:_default' \ +'--era-vm-solc-version=[Version of era vm solc to install]:ERA_VM_SOLC_VERSION:_default' \ +'--vyper-version=[Version of vyper to install]:VYPER_VERSION:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--only[Install only provided compilers]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__contract-verifier__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-help-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +'--from-file=[Sets the attester committee in the consensus registry contract to the committee in the yaml file. File format is definied in \`commands/consensus/proto/mod.proto\`]:FROM_FILE:_files' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--from-genesis[Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__consensus__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-consensus-help-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__init_commands" \ +"*::: :->init" \ +&& ret=0 + + case $state in + (init) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-init-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(genesis) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__genesis_commands" \ +"*::: :->genesis" \ +&& ret=0 + + case $state in + (genesis) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-genesis-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(register-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-multicall3) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-upgrader) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-paymaster) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(update-token-multiplier-setter) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-contract-verifier-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(dev) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev_commands" \ +"*::: :->dev" \ +&& ret=0 + + case $state in + (dev) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-command-$line[1]:" + case $line[1] in + (database) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-database-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +'--database=[Database to create new migration for]:DATABASE:(prover core)' \ +'--name=[Migration name]:NAME:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__database__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-database-help-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(test) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__test_commands" \ +"*::: :->test" \ +&& ret=0 + + case $state in + (test) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-test-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +'-t+[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ +'--test-pattern=[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-e[Run tests for external node]' \ +'--external-node[Run tests for external node]' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'--no-kill[The test will not kill all the nodes during execution]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--enable-consensus[Enable consensus]' \ +'-e[Run tests for external node]' \ +'--external-node[Run tests for external node]' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'--no-kill[The test will not kill all the nodes during execution]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-s[Run recovery from a snapshot instead of genesis]' \ +'--snapshot[Run recovery from a snapshot instead of genesis]' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'--no-kill[The test will not kill all the nodes during execution]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +'--options=[Cargo test flags]:OPTIONS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__test__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-test-help-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(clean) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__clean_commands" \ +"*::: :->clean" \ +&& ret=0 + + case $state in + (clean) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-clean-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__clean__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-clean-help-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(snapshot) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__snapshot_commands" \ +"*::: :->snapshot" \ +&& ret=0 + + case $state in + (snapshot) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__snapshot__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-help-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(lint) +_arguments "${_arguments_options[@]}" : \ +'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ +'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-c[]' \ +'--check[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-c[]' \ +'--check[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__fmt_commands" \ +"*::: :->fmt" \ +&& ret=0 + + case $state in + (fmt) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-fmt-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ +'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__fmt__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-fmt-help-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-prover-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +'--number=[]:NUMBER:_default' \ +'--version=[]:VERSION:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--default[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +'--version=[]:VERSION:_default' \ +'--snark-wrapper=[]:SNARK_WRAPPER:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--default[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__prover__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-prover-help-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(contracts) +_arguments "${_arguments_options[@]}" : \ +'--l1-contracts=[Build L1 contracts]' \ +'--l2-contracts=[Build L2 contracts]' \ +'--system-contracts=[Build system contracts]' \ +'--test-contracts=[Build test contracts]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(config-writer) +_arguments "${_arguments_options[@]}" : \ +'-p+[Path to the config file to override]:PATH:_default' \ +'--path=[Path to the config file to override]:PATH:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(send-transactions) +_arguments "${_arguments_options[@]}" : \ +'--file=[]:FILE:_files' \ +'--private-key=[]:PRIVATE_KEY:_default' \ +'--l1-rpc-url=[]:L1_RPC_URL:_default' \ +'--confirmations=[]:CONFIRMATIONS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" : \ +'-u+[URL of the health check endpoint]:URL:_default' \ +'--url=[URL of the health check endpoint]:URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__status_commands" \ +"*::: :->status" \ +&& ret=0 + + case $state in + (status) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-status-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__status__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-status-help-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(generate-genesis) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-command-$line[1]:" + case $line[1] in + (database) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-database-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(test) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__test_commands" \ +"*::: :->test" \ +&& ret=0 + + case $state in + (test) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-test-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(clean) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__clean_commands" \ +"*::: :->clean" \ +&& ret=0 + + case $state in + (clean) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-clean-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(snapshot) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__snapshot_commands" \ +"*::: :->snapshot" \ +&& ret=0 + + case $state in + (snapshot) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-snapshot-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(lint) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__fmt_commands" \ +"*::: :->fmt" \ +&& ret=0 + + case $state in + (fmt) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-fmt-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-prover-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(config-writer) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(send-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__status_commands" \ +"*::: :->status" \ +&& ret=0 + + case $state in + (status) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-status-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(generate-genesis) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-prover-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +'--proof-store-dir=[]:PROOF_STORE_DIR:_default' \ +'--bucket-base-url=[]:BUCKET_BASE_URL:_default' \ +'--credentials-file=[]:CREDENTIALS_FILE:_default' \ +'--bucket-name=[]:BUCKET_NAME:_default' \ +'--location=[]:LOCATION:_default' \ +'--project-id=[]:PROJECT_ID:_default' \ +'--shall-save-to-public-bucket=[]:SHALL_SAVE_TO_PUBLIC_BUCKET:(true false)' \ +'--public-store-dir=[]:PUBLIC_STORE_DIR:_default' \ +'--public-bucket-base-url=[]:PUBLIC_BUCKET_BASE_URL:_default' \ +'--public-credentials-file=[]:PUBLIC_CREDENTIALS_FILE:_default' \ +'--public-bucket-name=[]:PUBLIC_BUCKET_NAME:_default' \ +'--public-location=[]:PUBLIC_LOCATION:_default' \ +'--public-project-id=[]:PUBLIC_PROJECT_ID:_default' \ +'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ +'--bellman-cuda=[]' \ +'--setup-compressor-key=[]' \ +'--path=[]:PATH:_default' \ +'--region=[]:REGION:(us europe asia)' \ +'--mode=[]:MODE:(download generate)' \ +'--setup-keys=[]' \ +'--setup-database=[]:SETUP_DATABASE:(true false)' \ +'--prover-db-url=[Prover database url without database name]:PROVER_DB_URL:_default' \ +'--prover-db-name=[Prover database name]:PROVER_DB_NAME:_default' \ +'-u+[Use default database urls and names]:USE_DEFAULT:(true false)' \ +'--use-default=[Use default database urls and names]:USE_DEFAULT:(true false)' \ +'-d+[]:DONT_DROP:(true false)' \ +'--dont-drop=[]:DONT_DROP:(true false)' \ +'--cloud-type=[]:CLOUD_TYPE:(gcp local)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--dev[]' \ +'(--bellman-cuda-dir)--clone[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(setup-keys) +_arguments "${_arguments_options[@]}" : \ +'--region=[]:REGION:(us europe asia)' \ +'--mode=[]:MODE:(download generate)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'--component=[]:COMPONENT:(gateway witness-generator witness-vector-generator prover circuit-prover compressor prover-job-monitor)' \ +'--round=[]:ROUND:(all-rounds basic-circuits leaf-aggregation node-aggregation recursion-tip scheduler)' \ +'--threads=[]:THREADS:_default' \ +'--max-allocation=[Memory allocation limit in bytes (for prover component)]:MAX_ALLOCATION:_default' \ +'--witness-vector-generator-count=[]:WITNESS_VECTOR_GENERATOR_COUNT:_default' \ +'--max-allocation=[]:MAX_ALLOCATION:_default' \ +'--docker=[]:DOCKER:(true false)' \ +'--tag=[]:TAG:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init-bellman-cuda) +_arguments "${_arguments_options[@]}" : \ +'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'(--bellman-cuda-dir)--clone[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(compressor-keys) +_arguments "${_arguments_options[@]}" : \ +'--path=[]:PATH:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__prover__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-prover-help-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init-bellman-cuda) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(compressor-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(external-node) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__external-node_commands" \ +"*::: :->external-node" \ +&& ret=0 + + case $state in + (external-node) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-external-node-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +'--db-url=[]:DB_URL:_default' \ +'--db-name=[]:DB_NAME:_default' \ +'--l1-rpc-url=[]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-u[Use default database urls and names]' \ +'--use-default[Use default database urls and names]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'*--components=[Components of server to run]:COMPONENTS:_default' \ +'--enable-consensus=[Enable consensus]' \ +'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--reinit[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__external-node__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-external-node-help-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +'-o+[Enable Grafana]' \ +'--observability=[Enable Grafana]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(portal) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(explorer) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__explorer_commands" \ +"*::: :->explorer" \ +&& ret=0 + + case $state in + (explorer) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-explorer-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run-backend) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__explorer__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-explorer-help-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run-backend) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(update) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-c[Update only the config files]' \ +'--only-config[Update only the config files]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(markdown) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-command-$line[1]:" + case $line[1] in + (autocomplete) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(ecosystem) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__ecosystem_commands" \ +"*::: :->ecosystem" \ +&& ret=0 + + case $state in + (ecosystem) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-ecosystem-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(change-default-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-observability) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(chain) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain_commands" \ +"*::: :->chain" \ +&& ret=0 + + case $state in + (chain) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__init_commands" \ +"*::: :->init" \ +&& ret=0 + + case $state in + (init) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-init-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(genesis) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__genesis_commands" \ +"*::: :->genesis" \ +&& ret=0 + + case $state in + (genesis) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-genesis-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(register-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-multicall3) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-upgrader) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-paymaster) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(update-token-multiplier-setter) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-contract-verifier-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(dev) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev_commands" \ +"*::: :->dev" \ +&& ret=0 + + case $state in + (dev) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-command-$line[1]:" + case $line[1] in + (database) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-database-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(test) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__test_commands" \ +"*::: :->test" \ +&& ret=0 + + case $state in + (test) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-test-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(clean) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__clean_commands" \ +"*::: :->clean" \ +&& ret=0 + + case $state in + (clean) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-clean-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(snapshot) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__snapshot_commands" \ +"*::: :->snapshot" \ +&& ret=0 + + case $state in + (snapshot) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-snapshot-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(lint) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__fmt_commands" \ +"*::: :->fmt" \ +&& ret=0 + + case $state in + (fmt) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-fmt-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-prover-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(config-writer) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(send-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__status_commands" \ +"*::: :->status" \ +&& ret=0 + + case $state in + (status) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-status-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(generate-genesis) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-prover-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init-bellman-cuda) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(compressor-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(external-node) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__external-node_commands" \ +"*::: :->external-node" \ +&& ret=0 + + case $state in + (external-node) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-external-node-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(portal) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(explorer) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__explorer_commands" \ +"*::: :->explorer" \ +&& ret=0 + + case $state in + (explorer) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-explorer-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run-backend) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(update) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(markdown) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +} + +(( $+functions[_zkstack_commands] )) || +_zkstack_commands() { + local commands; commands=( +'autocomplete:Create shell autocompletion files' \ +'ecosystem:Ecosystem related commands' \ +'chain:Chain related commands' \ +'dev:Supervisor related commands' \ +'prover:Prover related commands' \ +'external-node:External Node related commands' \ +'containers:Run containers for local development' \ +'portal:Run dapp-portal' \ +'explorer:Run block-explorer' \ +'update:Update ZKsync' \ +'markdown:Print markdown help' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack commands' commands "$@" +} +(( $+functions[_zkstack__autocomplete_commands] )) || +_zkstack__autocomplete_commands() { + local commands; commands=() + _describe -t commands 'zkstack autocomplete commands' commands "$@" +} +(( $+functions[_zkstack__chain_commands] )) || +_zkstack__chain_commands() { + local commands; commands=( +'create:Create a new chain, setting the necessary configurations for later initialization' \ +'build-transactions:Create unsigned transactions for chain deployment' \ +'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ +'genesis:Run server genesis' \ +'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ +'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ +'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ +'initialize-bridges:Initialize bridges on L2' \ +'deploy-consensus-registry:Deploy L2 consensus registry' \ +'deploy-multicall3:Deploy L2 multicall3' \ +'deploy-upgrader:Deploy Default Upgrader' \ +'deploy-paymaster:Deploy paymaster smart contract' \ +'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain commands' commands "$@" +} +(( $+functions[_zkstack__chain__accept-chain-ownership_commands] )) || +_zkstack__chain__accept-chain-ownership_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain accept-chain-ownership commands' commands "$@" +} +(( $+functions[_zkstack__chain__build-transactions_commands] )) || +_zkstack__chain__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus_commands] )) || +_zkstack__chain__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain consensus commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__get-attester-committee_commands] )) || +_zkstack__chain__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help_commands] )) || +_zkstack__chain__consensus__help_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain consensus help commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__get-attester-committee_commands] )) || +_zkstack__chain__consensus__help__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__help_commands] )) || +_zkstack__chain__consensus__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__set-attester-committee_commands] )) || +_zkstack__chain__consensus__help__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__set-attester-committee_commands] )) || +_zkstack__chain__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier_commands] )) || +_zkstack__chain__contract-verifier_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help_commands] )) || +_zkstack__chain__contract-verifier__help_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain contract-verifier help commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__help_commands] )) || +_zkstack__chain__contract-verifier__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__init_commands] )) || +_zkstack__chain__contract-verifier__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help init commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__run_commands] )) || +_zkstack__chain__contract-verifier__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help run commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__init_commands] )) || +_zkstack__chain__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__run_commands] )) || +_zkstack__chain__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier run commands' commands "$@" +} +(( $+functions[_zkstack__chain__create_commands] )) || +_zkstack__chain__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain create commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-consensus-registry_commands] )) || +_zkstack__chain__deploy-consensus-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-consensus-registry commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-l2-contracts_commands] )) || +_zkstack__chain__deploy-l2-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-l2-contracts commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-multicall3_commands] )) || +_zkstack__chain__deploy-multicall3_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-multicall3 commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-paymaster_commands] )) || +_zkstack__chain__deploy-paymaster_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-paymaster commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-upgrader_commands] )) || +_zkstack__chain__deploy-upgrader_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-upgrader commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis_commands] )) || +_zkstack__chain__genesis_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain genesis commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help_commands] )) || +_zkstack__chain__genesis__help_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain genesis help commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help__help_commands] )) || +_zkstack__chain__genesis__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help__init-database_commands] )) || +_zkstack__chain__genesis__help__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis help init-database commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help__server_commands] )) || +_zkstack__chain__genesis__help__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis help server commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__init-database_commands] )) || +_zkstack__chain__genesis__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis init-database commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__server_commands] )) || +_zkstack__chain__genesis__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis server commands' commands "$@" +} +(( $+functions[_zkstack__chain__help_commands] )) || +_zkstack__chain__help_commands() { + local commands; commands=( +'create:Create a new chain, setting the necessary configurations for later initialization' \ +'build-transactions:Create unsigned transactions for chain deployment' \ +'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ +'genesis:Run server genesis' \ +'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ +'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ +'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ +'initialize-bridges:Initialize bridges on L2' \ +'deploy-consensus-registry:Deploy L2 consensus registry' \ +'deploy-multicall3:Deploy L2 multicall3' \ +'deploy-upgrader:Deploy Default Upgrader' \ +'deploy-paymaster:Deploy paymaster smart contract' \ +'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain help commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__accept-chain-ownership_commands] )) || +_zkstack__chain__help__accept-chain-ownership_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help accept-chain-ownership commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__build-transactions_commands] )) || +_zkstack__chain__help__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus_commands] )) || +_zkstack__chain__help__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ + ) + _describe -t commands 'zkstack chain help consensus commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus__get-attester-committee_commands] )) || +_zkstack__chain__help__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus__set-attester-committee_commands] )) || +_zkstack__chain__help__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier_commands] )) || +_zkstack__chain__help__contract-verifier_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ + ) + _describe -t commands 'zkstack chain help contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__init_commands] )) || +_zkstack__chain__help__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__run_commands] )) || +_zkstack__chain__help__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier run commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__create_commands] )) || +_zkstack__chain__help__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help create commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-consensus-registry_commands] )) || +_zkstack__chain__help__deploy-consensus-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-consensus-registry commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-l2-contracts_commands] )) || +_zkstack__chain__help__deploy-l2-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-l2-contracts commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-multicall3_commands] )) || +_zkstack__chain__help__deploy-multicall3_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-multicall3 commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-paymaster_commands] )) || +_zkstack__chain__help__deploy-paymaster_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-paymaster commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-upgrader_commands] )) || +_zkstack__chain__help__deploy-upgrader_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-upgrader commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__genesis_commands] )) || +_zkstack__chain__help__genesis_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ + ) + _describe -t commands 'zkstack chain help genesis commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__genesis__init-database_commands] )) || +_zkstack__chain__help__genesis__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help genesis init-database commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__genesis__server_commands] )) || +_zkstack__chain__help__genesis__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help genesis server commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__help_commands] )) || +_zkstack__chain__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__init_commands] )) || +_zkstack__chain__help__init_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ + ) + _describe -t commands 'zkstack chain help init commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__init__configs_commands] )) || +_zkstack__chain__help__init__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help init configs commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__initialize-bridges_commands] )) || +_zkstack__chain__help__initialize-bridges_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help initialize-bridges commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__register-chain_commands] )) || +_zkstack__chain__help__register-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help register-chain commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__server_commands] )) || +_zkstack__chain__help__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help server commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__update-token-multiplier-setter_commands] )) || +_zkstack__chain__help__update-token-multiplier-setter_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help update-token-multiplier-setter commands' commands "$@" +} +(( $+functions[_zkstack__chain__init_commands] )) || +_zkstack__chain__init_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain init commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__configs_commands] )) || +_zkstack__chain__init__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain init configs commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__help_commands] )) || +_zkstack__chain__init__help_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain init help commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__help__configs_commands] )) || +_zkstack__chain__init__help__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain init help configs commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__help__help_commands] )) || +_zkstack__chain__init__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain init help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__initialize-bridges_commands] )) || +_zkstack__chain__initialize-bridges_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain initialize-bridges commands' commands "$@" +} +(( $+functions[_zkstack__chain__register-chain_commands] )) || +_zkstack__chain__register-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain register-chain commands' commands "$@" +} +(( $+functions[_zkstack__chain__server_commands] )) || +_zkstack__chain__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server commands' commands "$@" +} +(( $+functions[_zkstack__chain__update-token-multiplier-setter_commands] )) || +_zkstack__chain__update-token-multiplier-setter_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain update-token-multiplier-setter commands' commands "$@" +} +(( $+functions[_zkstack__containers_commands] )) || +_zkstack__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack containers commands' commands "$@" +} +(( $+functions[_zkstack__dev_commands] )) || +_zkstack__dev_commands() { + local commands; commands=( +'database:Database related commands' \ +'test:Run tests' \ +'clean:Clean artifacts' \ +'snapshot:Snapshots creator' \ +'lint:Lint code' \ +'fmt:Format code' \ +'prover:Protocol version used by provers' \ +'contracts:Build contracts' \ +'config-writer:Overwrite general config' \ +'send-transactions:Send transactions from file' \ +'status:Get status of the server' \ +'generate-genesis:Generate new genesis file based on current contracts' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean_commands] )) || +_zkstack__dev__clean_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev clean commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__all_commands] )) || +_zkstack__dev__clean__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean all commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__containers_commands] )) || +_zkstack__dev__clean__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean containers commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__contracts-cache_commands] )) || +_zkstack__dev__clean__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help_commands] )) || +_zkstack__dev__clean__help_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev clean help commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__all_commands] )) || +_zkstack__dev__clean__help__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help all commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__containers_commands] )) || +_zkstack__dev__clean__help__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help containers commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__contracts-cache_commands] )) || +_zkstack__dev__clean__help__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__help_commands] )) || +_zkstack__dev__clean__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__config-writer_commands] )) || +_zkstack__dev__config-writer_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev config-writer commands' commands "$@" +} +(( $+functions[_zkstack__dev__contracts_commands] )) || +_zkstack__dev__contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__database_commands] )) || +_zkstack__dev__database_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev database commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__check-sqlx-data_commands] )) || +_zkstack__dev__database__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__drop_commands] )) || +_zkstack__dev__database__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database drop commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help_commands] )) || +_zkstack__dev__database__help_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev database help commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__check-sqlx-data_commands] )) || +_zkstack__dev__database__help__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__drop_commands] )) || +_zkstack__dev__database__help__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help drop commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__help_commands] )) || +_zkstack__dev__database__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__migrate_commands] )) || +_zkstack__dev__database__help__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help migrate commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__new-migration_commands] )) || +_zkstack__dev__database__help__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help new-migration commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__prepare_commands] )) || +_zkstack__dev__database__help__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help prepare commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__reset_commands] )) || +_zkstack__dev__database__help__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help reset commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__setup_commands] )) || +_zkstack__dev__database__help__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help setup commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__migrate_commands] )) || +_zkstack__dev__database__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database migrate commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__new-migration_commands] )) || +_zkstack__dev__database__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database new-migration commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__prepare_commands] )) || +_zkstack__dev__database__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database prepare commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__reset_commands] )) || +_zkstack__dev__database__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database reset commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__setup_commands] )) || +_zkstack__dev__database__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database setup commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt_commands] )) || +_zkstack__dev__fmt_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev fmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__contract_commands] )) || +_zkstack__dev__fmt__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt contract commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help_commands] )) || +_zkstack__dev__fmt__help_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev fmt help commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__contract_commands] )) || +_zkstack__dev__fmt__help__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help contract commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__help_commands] )) || +_zkstack__dev__fmt__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__prettier_commands] )) || +_zkstack__dev__fmt__help__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help prettier commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__rustfmt_commands] )) || +_zkstack__dev__fmt__help__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__prettier_commands] )) || +_zkstack__dev__fmt__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt prettier commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__rustfmt_commands] )) || +_zkstack__dev__fmt__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__generate-genesis_commands] )) || +_zkstack__dev__generate-genesis_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev generate-genesis commands' commands "$@" +} +(( $+functions[_zkstack__dev__help_commands] )) || +_zkstack__dev__help_commands() { + local commands; commands=( +'database:Database related commands' \ +'test:Run tests' \ +'clean:Clean artifacts' \ +'snapshot:Snapshots creator' \ +'lint:Lint code' \ +'fmt:Format code' \ +'prover:Protocol version used by provers' \ +'contracts:Build contracts' \ +'config-writer:Overwrite general config' \ +'send-transactions:Send transactions from file' \ +'status:Get status of the server' \ +'generate-genesis:Generate new genesis file based on current contracts' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev help commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean_commands] )) || +_zkstack__dev__help__clean_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ + ) + _describe -t commands 'zkstack dev help clean commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean__all_commands] )) || +_zkstack__dev__help__clean__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help clean all commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean__containers_commands] )) || +_zkstack__dev__help__clean__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help clean containers commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean__contracts-cache_commands] )) || +_zkstack__dev__help__clean__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help clean contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__config-writer_commands] )) || +_zkstack__dev__help__config-writer_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help config-writer commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__contracts_commands] )) || +_zkstack__dev__help__contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database_commands] )) || +_zkstack__dev__help__database_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ + ) + _describe -t commands 'zkstack dev help database commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__check-sqlx-data_commands] )) || +_zkstack__dev__help__database__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__drop_commands] )) || +_zkstack__dev__help__database__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database drop commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__migrate_commands] )) || +_zkstack__dev__help__database__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database migrate commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__new-migration_commands] )) || +_zkstack__dev__help__database__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database new-migration commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__prepare_commands] )) || +_zkstack__dev__help__database__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database prepare commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__reset_commands] )) || +_zkstack__dev__help__database__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database reset commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__setup_commands] )) || +_zkstack__dev__help__database__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database setup commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt_commands] )) || +_zkstack__dev__help__fmt_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ + ) + _describe -t commands 'zkstack dev help fmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt__contract_commands] )) || +_zkstack__dev__help__fmt__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help fmt contract commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt__prettier_commands] )) || +_zkstack__dev__help__fmt__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help fmt prettier commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt__rustfmt_commands] )) || +_zkstack__dev__help__fmt__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help fmt rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__generate-genesis_commands] )) || +_zkstack__dev__help__generate-genesis_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help generate-genesis commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__help_commands] )) || +_zkstack__dev__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__lint_commands] )) || +_zkstack__dev__help__lint_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help lint commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover_commands] )) || +_zkstack__dev__help__prover_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ + ) + _describe -t commands 'zkstack dev help prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover__info_commands] )) || +_zkstack__dev__help__prover__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help prover info commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover__insert-batch_commands] )) || +_zkstack__dev__help__prover__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help prover insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover__insert-version_commands] )) || +_zkstack__dev__help__prover__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help prover insert-version commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__send-transactions_commands] )) || +_zkstack__dev__help__send-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help send-transactions commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__snapshot_commands] )) || +_zkstack__dev__help__snapshot_commands() { + local commands; commands=( +'create:' \ + ) + _describe -t commands 'zkstack dev help snapshot commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__snapshot__create_commands] )) || +_zkstack__dev__help__snapshot__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help snapshot create commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__status_commands] )) || +_zkstack__dev__help__status_commands() { + local commands; commands=( +'ports:Show used ports' \ + ) + _describe -t commands 'zkstack dev help status commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__status__ports_commands] )) || +_zkstack__dev__help__status__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help status ports commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test_commands] )) || +_zkstack__dev__help__test_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ + ) + _describe -t commands 'zkstack dev help test commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__build_commands] )) || +_zkstack__dev__help__test__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test build commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__fees_commands] )) || +_zkstack__dev__help__test__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test fees commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__integration_commands] )) || +_zkstack__dev__help__test__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test integration commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__l1-contracts_commands] )) || +_zkstack__dev__help__test__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__loadtest_commands] )) || +_zkstack__dev__help__test__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test loadtest commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__prover_commands] )) || +_zkstack__dev__help__test__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__recovery_commands] )) || +_zkstack__dev__help__test__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test recovery commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__revert_commands] )) || +_zkstack__dev__help__test__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test revert commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__rust_commands] )) || +_zkstack__dev__help__test__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test rust commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__upgrade_commands] )) || +_zkstack__dev__help__test__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test upgrade commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__wallet_commands] )) || +_zkstack__dev__help__test__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test wallet commands' commands "$@" +} +(( $+functions[_zkstack__dev__lint_commands] )) || +_zkstack__dev__lint_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev lint commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover_commands] )) || +_zkstack__dev__prover_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help_commands] )) || +_zkstack__dev__prover__help_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev prover help commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__help_commands] )) || +_zkstack__dev__prover__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__info_commands] )) || +_zkstack__dev__prover__help__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help info commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__insert-batch_commands] )) || +_zkstack__dev__prover__help__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__insert-version_commands] )) || +_zkstack__dev__prover__help__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help insert-version commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__info_commands] )) || +_zkstack__dev__prover__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover info commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__insert-batch_commands] )) || +_zkstack__dev__prover__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__insert-version_commands] )) || +_zkstack__dev__prover__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover insert-version commands' commands "$@" +} +(( $+functions[_zkstack__dev__send-transactions_commands] )) || +_zkstack__dev__send-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev send-transactions commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot_commands] )) || +_zkstack__dev__snapshot_commands() { + local commands; commands=( +'create:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev snapshot commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__create_commands] )) || +_zkstack__dev__snapshot__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev snapshot create commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__help_commands] )) || +_zkstack__dev__snapshot__help_commands() { + local commands; commands=( +'create:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev snapshot help commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__help__create_commands] )) || +_zkstack__dev__snapshot__help__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev snapshot help create commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__help__help_commands] )) || +_zkstack__dev__snapshot__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev snapshot help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__status_commands] )) || +_zkstack__dev__status_commands() { + local commands; commands=( +'ports:Show used ports' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev status commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__help_commands] )) || +_zkstack__dev__status__help_commands() { + local commands; commands=( +'ports:Show used ports' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev status help commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__help__help_commands] )) || +_zkstack__dev__status__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev status help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__help__ports_commands] )) || +_zkstack__dev__status__help__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev status help ports commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__ports_commands] )) || +_zkstack__dev__status__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev status ports commands' commands "$@" +} +(( $+functions[_zkstack__dev__test_commands] )) || +_zkstack__dev__test_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev test commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__build_commands] )) || +_zkstack__dev__test__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test build commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__fees_commands] )) || +_zkstack__dev__test__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test fees commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help_commands] )) || +_zkstack__dev__test__help_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev test help commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__build_commands] )) || +_zkstack__dev__test__help__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help build commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__fees_commands] )) || +_zkstack__dev__test__help__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help fees commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__help_commands] )) || +_zkstack__dev__test__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__integration_commands] )) || +_zkstack__dev__test__help__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help integration commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__l1-contracts_commands] )) || +_zkstack__dev__test__help__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__loadtest_commands] )) || +_zkstack__dev__test__help__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help loadtest commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__prover_commands] )) || +_zkstack__dev__test__help__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__recovery_commands] )) || +_zkstack__dev__test__help__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help recovery commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__revert_commands] )) || +_zkstack__dev__test__help__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help revert commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__rust_commands] )) || +_zkstack__dev__test__help__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help rust commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__upgrade_commands] )) || +_zkstack__dev__test__help__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help upgrade commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__wallet_commands] )) || +_zkstack__dev__test__help__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help wallet commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__integration_commands] )) || +_zkstack__dev__test__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test integration commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__l1-contracts_commands] )) || +_zkstack__dev__test__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__loadtest_commands] )) || +_zkstack__dev__test__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test loadtest commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__prover_commands] )) || +_zkstack__dev__test__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__recovery_commands] )) || +_zkstack__dev__test__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test recovery commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__revert_commands] )) || +_zkstack__dev__test__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test revert commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__rust_commands] )) || +_zkstack__dev__test__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test rust commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__upgrade_commands] )) || +_zkstack__dev__test__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test upgrade commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__wallet_commands] )) || +_zkstack__dev__test__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test wallet commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem_commands] )) || +_zkstack__ecosystem_commands() { + local commands; commands=( +'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ +'build-transactions:Create transactions to build ecosystem contracts' \ +'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ +'change-default-chain:Change the default chain' \ +'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack ecosystem commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__build-transactions_commands] )) || +_zkstack__ecosystem__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__change-default-chain_commands] )) || +_zkstack__ecosystem__change-default-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem change-default-chain commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__create_commands] )) || +_zkstack__ecosystem__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem create commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help_commands] )) || +_zkstack__ecosystem__help_commands() { + local commands; commands=( +'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ +'build-transactions:Create transactions to build ecosystem contracts' \ +'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ +'change-default-chain:Change the default chain' \ +'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack ecosystem help commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__build-transactions_commands] )) || +_zkstack__ecosystem__help__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__change-default-chain_commands] )) || +_zkstack__ecosystem__help__change-default-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help change-default-chain commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__create_commands] )) || +_zkstack__ecosystem__help__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help create commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__help_commands] )) || +_zkstack__ecosystem__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help help commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__init_commands] )) || +_zkstack__ecosystem__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help init commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__setup-observability_commands] )) || +_zkstack__ecosystem__help__setup-observability_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help setup-observability commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__init_commands] )) || +_zkstack__ecosystem__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem init commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__setup-observability_commands] )) || +_zkstack__ecosystem__setup-observability_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem setup-observability commands' commands "$@" +} +(( $+functions[_zkstack__explorer_commands] )) || +_zkstack__explorer_commands() { + local commands; commands=( +'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ +'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ +'run:Run explorer app' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack explorer commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help_commands] )) || +_zkstack__explorer__help_commands() { + local commands; commands=( +'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ +'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ +'run:Run explorer app' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack explorer help commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__help_commands] )) || +_zkstack__explorer__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help help commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__init_commands] )) || +_zkstack__explorer__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help init commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__run_commands] )) || +_zkstack__explorer__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help run commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__run-backend_commands] )) || +_zkstack__explorer__help__run-backend_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help run-backend commands' commands "$@" +} +(( $+functions[_zkstack__explorer__init_commands] )) || +_zkstack__explorer__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer init commands' commands "$@" +} +(( $+functions[_zkstack__explorer__run_commands] )) || +_zkstack__explorer__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer run commands' commands "$@" +} +(( $+functions[_zkstack__explorer__run-backend_commands] )) || +_zkstack__explorer__run-backend_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer run-backend commands' commands "$@" +} +(( $+functions[_zkstack__external-node_commands] )) || +_zkstack__external-node_commands() { + local commands; commands=( +'configs:Prepare configs for EN' \ +'init:Init databases' \ +'run:Run external node' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack external-node commands' commands "$@" +} +(( $+functions[_zkstack__external-node__configs_commands] )) || +_zkstack__external-node__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node configs commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help_commands] )) || +_zkstack__external-node__help_commands() { + local commands; commands=( +'configs:Prepare configs for EN' \ +'init:Init databases' \ +'run:Run external node' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack external-node help commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__configs_commands] )) || +_zkstack__external-node__help__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help configs commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__help_commands] )) || +_zkstack__external-node__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help help commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__init_commands] )) || +_zkstack__external-node__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help init commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__run_commands] )) || +_zkstack__external-node__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help run commands' commands "$@" +} +(( $+functions[_zkstack__external-node__init_commands] )) || +_zkstack__external-node__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node init commands' commands "$@" +} +(( $+functions[_zkstack__external-node__run_commands] )) || +_zkstack__external-node__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node run commands' commands "$@" +} +(( $+functions[_zkstack__help_commands] )) || +_zkstack__help_commands() { + local commands; commands=( +'autocomplete:Create shell autocompletion files' \ +'ecosystem:Ecosystem related commands' \ +'chain:Chain related commands' \ +'dev:Supervisor related commands' \ +'prover:Prover related commands' \ +'external-node:External Node related commands' \ +'containers:Run containers for local development' \ +'portal:Run dapp-portal' \ +'explorer:Run block-explorer' \ +'update:Update ZKsync' \ +'markdown:Print markdown help' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack help commands' commands "$@" +} +(( $+functions[_zkstack__help__autocomplete_commands] )) || +_zkstack__help__autocomplete_commands() { + local commands; commands=() + _describe -t commands 'zkstack help autocomplete commands' commands "$@" +} +(( $+functions[_zkstack__help__chain_commands] )) || +_zkstack__help__chain_commands() { + local commands; commands=( +'create:Create a new chain, setting the necessary configurations for later initialization' \ +'build-transactions:Create unsigned transactions for chain deployment' \ +'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ +'genesis:Run server genesis' \ +'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ +'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ +'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ +'initialize-bridges:Initialize bridges on L2' \ +'deploy-consensus-registry:Deploy L2 consensus registry' \ +'deploy-multicall3:Deploy L2 multicall3' \ +'deploy-upgrader:Deploy Default Upgrader' \ +'deploy-paymaster:Deploy paymaster smart contract' \ +'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ + ) + _describe -t commands 'zkstack help chain commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__accept-chain-ownership_commands] )) || +_zkstack__help__chain__accept-chain-ownership_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain accept-chain-ownership commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__build-transactions_commands] )) || +_zkstack__help__chain__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus_commands] )) || +_zkstack__help__chain__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ + ) + _describe -t commands 'zkstack help chain consensus commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus__get-attester-committee_commands] )) || +_zkstack__help__chain__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus__set-attester-committee_commands] )) || +_zkstack__help__chain__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier_commands] )) || +_zkstack__help__chain__contract-verifier_commands() { + local commands; commands=( +'run:Run contract verifier' \ +'init:Download required binaries for contract verifier' \ + ) + _describe -t commands 'zkstack help chain contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__init_commands] )) || +_zkstack__help__chain__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__run_commands] )) || +_zkstack__help__chain__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier run commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__create_commands] )) || +_zkstack__help__chain__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain create commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-consensus-registry_commands] )) || +_zkstack__help__chain__deploy-consensus-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-consensus-registry commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-l2-contracts_commands] )) || +_zkstack__help__chain__deploy-l2-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-l2-contracts commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-multicall3_commands] )) || +_zkstack__help__chain__deploy-multicall3_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-multicall3 commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-paymaster_commands] )) || +_zkstack__help__chain__deploy-paymaster_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-paymaster commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-upgrader_commands] )) || +_zkstack__help__chain__deploy-upgrader_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-upgrader commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__genesis_commands] )) || +_zkstack__help__chain__genesis_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ + ) + _describe -t commands 'zkstack help chain genesis commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__genesis__init-database_commands] )) || +_zkstack__help__chain__genesis__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain genesis init-database commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__genesis__server_commands] )) || +_zkstack__help__chain__genesis__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain genesis server commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__init_commands] )) || +_zkstack__help__chain__init_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ + ) + _describe -t commands 'zkstack help chain init commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__init__configs_commands] )) || +_zkstack__help__chain__init__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain init configs commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__initialize-bridges_commands] )) || +_zkstack__help__chain__initialize-bridges_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain initialize-bridges commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__register-chain_commands] )) || +_zkstack__help__chain__register-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain register-chain commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__server_commands] )) || +_zkstack__help__chain__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain server commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__update-token-multiplier-setter_commands] )) || +_zkstack__help__chain__update-token-multiplier-setter_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain update-token-multiplier-setter commands' commands "$@" +} +(( $+functions[_zkstack__help__containers_commands] )) || +_zkstack__help__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack help containers commands' commands "$@" +} +(( $+functions[_zkstack__help__dev_commands] )) || +_zkstack__help__dev_commands() { + local commands; commands=( +'database:Database related commands' \ +'test:Run tests' \ +'clean:Clean artifacts' \ +'snapshot:Snapshots creator' \ +'lint:Lint code' \ +'fmt:Format code' \ +'prover:Protocol version used by provers' \ +'contracts:Build contracts' \ +'config-writer:Overwrite general config' \ +'send-transactions:Send transactions from file' \ +'status:Get status of the server' \ +'generate-genesis:Generate new genesis file based on current contracts' \ + ) + _describe -t commands 'zkstack help dev commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean_commands] )) || +_zkstack__help__dev__clean_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ + ) + _describe -t commands 'zkstack help dev clean commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean__all_commands] )) || +_zkstack__help__dev__clean__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev clean all commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean__containers_commands] )) || +_zkstack__help__dev__clean__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev clean containers commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean__contracts-cache_commands] )) || +_zkstack__help__dev__clean__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev clean contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__config-writer_commands] )) || +_zkstack__help__dev__config-writer_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev config-writer commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__contracts_commands] )) || +_zkstack__help__dev__contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev contracts commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database_commands] )) || +_zkstack__help__dev__database_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ + ) + _describe -t commands 'zkstack help dev database commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__check-sqlx-data_commands] )) || +_zkstack__help__dev__database__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__drop_commands] )) || +_zkstack__help__dev__database__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database drop commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__migrate_commands] )) || +_zkstack__help__dev__database__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database migrate commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__new-migration_commands] )) || +_zkstack__help__dev__database__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database new-migration commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__prepare_commands] )) || +_zkstack__help__dev__database__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database prepare commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__reset_commands] )) || +_zkstack__help__dev__database__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database reset commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__setup_commands] )) || +_zkstack__help__dev__database__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database setup commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt_commands] )) || +_zkstack__help__dev__fmt_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ + ) + _describe -t commands 'zkstack help dev fmt commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt__contract_commands] )) || +_zkstack__help__dev__fmt__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev fmt contract commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt__prettier_commands] )) || +_zkstack__help__dev__fmt__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev fmt prettier commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt__rustfmt_commands] )) || +_zkstack__help__dev__fmt__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev fmt rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__generate-genesis_commands] )) || +_zkstack__help__dev__generate-genesis_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev generate-genesis commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__lint_commands] )) || +_zkstack__help__dev__lint_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev lint commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover_commands] )) || +_zkstack__help__dev__prover_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ + ) + _describe -t commands 'zkstack help dev prover commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover__info_commands] )) || +_zkstack__help__dev__prover__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev prover info commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover__insert-batch_commands] )) || +_zkstack__help__dev__prover__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev prover insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover__insert-version_commands] )) || +_zkstack__help__dev__prover__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev prover insert-version commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__send-transactions_commands] )) || +_zkstack__help__dev__send-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev send-transactions commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__snapshot_commands] )) || +_zkstack__help__dev__snapshot_commands() { + local commands; commands=( +'create:' \ + ) + _describe -t commands 'zkstack help dev snapshot commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__snapshot__create_commands] )) || +_zkstack__help__dev__snapshot__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev snapshot create commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__status_commands] )) || +_zkstack__help__dev__status_commands() { + local commands; commands=( +'ports:Show used ports' \ + ) + _describe -t commands 'zkstack help dev status commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__status__ports_commands] )) || +_zkstack__help__dev__status__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev status ports commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test_commands] )) || +_zkstack__help__dev__test_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ + ) + _describe -t commands 'zkstack help dev test commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__build_commands] )) || +_zkstack__help__dev__test__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test build commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__fees_commands] )) || +_zkstack__help__dev__test__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test fees commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__integration_commands] )) || +_zkstack__help__dev__test__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test integration commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__l1-contracts_commands] )) || +_zkstack__help__dev__test__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__loadtest_commands] )) || +_zkstack__help__dev__test__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test loadtest commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__prover_commands] )) || +_zkstack__help__dev__test__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test prover commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__recovery_commands] )) || +_zkstack__help__dev__test__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test recovery commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__revert_commands] )) || +_zkstack__help__dev__test__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test revert commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__rust_commands] )) || +_zkstack__help__dev__test__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test rust commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__upgrade_commands] )) || +_zkstack__help__dev__test__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test upgrade commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__wallet_commands] )) || +_zkstack__help__dev__test__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test wallet commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem_commands] )) || +_zkstack__help__ecosystem_commands() { + local commands; commands=( +'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ +'build-transactions:Create transactions to build ecosystem contracts' \ +'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ +'change-default-chain:Change the default chain' \ +'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ + ) + _describe -t commands 'zkstack help ecosystem commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__build-transactions_commands] )) || +_zkstack__help__ecosystem__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__change-default-chain_commands] )) || +_zkstack__help__ecosystem__change-default-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem change-default-chain commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__create_commands] )) || +_zkstack__help__ecosystem__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem create commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__init_commands] )) || +_zkstack__help__ecosystem__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem init commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__setup-observability_commands] )) || +_zkstack__help__ecosystem__setup-observability_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem setup-observability commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer_commands] )) || +_zkstack__help__explorer_commands() { + local commands; commands=( +'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ +'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ +'run:Run explorer app' \ + ) + _describe -t commands 'zkstack help explorer commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer__init_commands] )) || +_zkstack__help__explorer__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help explorer init commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer__run_commands] )) || +_zkstack__help__explorer__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help explorer run commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer__run-backend_commands] )) || +_zkstack__help__explorer__run-backend_commands() { + local commands; commands=() + _describe -t commands 'zkstack help explorer run-backend commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node_commands] )) || +_zkstack__help__external-node_commands() { + local commands; commands=( +'configs:Prepare configs for EN' \ +'init:Init databases' \ +'run:Run external node' \ + ) + _describe -t commands 'zkstack help external-node commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__configs_commands] )) || +_zkstack__help__external-node__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node configs commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__init_commands] )) || +_zkstack__help__external-node__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node init commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__run_commands] )) || +_zkstack__help__external-node__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node run commands' commands "$@" +} +(( $+functions[_zkstack__help__help_commands] )) || +_zkstack__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack help help commands' commands "$@" +} +(( $+functions[_zkstack__help__markdown_commands] )) || +_zkstack__help__markdown_commands() { + local commands; commands=() + _describe -t commands 'zkstack help markdown commands' commands "$@" +} +(( $+functions[_zkstack__help__portal_commands] )) || +_zkstack__help__portal_commands() { + local commands; commands=() + _describe -t commands 'zkstack help portal commands' commands "$@" +} +(( $+functions[_zkstack__help__prover_commands] )) || +_zkstack__help__prover_commands() { + local commands; commands=( +'init:Initialize prover' \ +'setup-keys:Generate setup keys' \ +'run:Run prover' \ +'init-bellman-cuda:Initialize bellman-cuda' \ +'compressor-keys:Download compressor keys' \ + ) + _describe -t commands 'zkstack help prover commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__compressor-keys_commands] )) || +_zkstack__help__prover__compressor-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover compressor-keys commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__init_commands] )) || +_zkstack__help__prover__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover init commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__init-bellman-cuda_commands] )) || +_zkstack__help__prover__init-bellman-cuda_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover init-bellman-cuda commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__run_commands] )) || +_zkstack__help__prover__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover run commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__setup-keys_commands] )) || +_zkstack__help__prover__setup-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover setup-keys commands' commands "$@" +} +(( $+functions[_zkstack__help__update_commands] )) || +_zkstack__help__update_commands() { + local commands; commands=() + _describe -t commands 'zkstack help update commands' commands "$@" +} +(( $+functions[_zkstack__markdown_commands] )) || +_zkstack__markdown_commands() { + local commands; commands=() + _describe -t commands 'zkstack markdown commands' commands "$@" +} +(( $+functions[_zkstack__portal_commands] )) || +_zkstack__portal_commands() { + local commands; commands=() + _describe -t commands 'zkstack portal commands' commands "$@" +} +(( $+functions[_zkstack__prover_commands] )) || +_zkstack__prover_commands() { + local commands; commands=( +'init:Initialize prover' \ +'setup-keys:Generate setup keys' \ +'run:Run prover' \ +'init-bellman-cuda:Initialize bellman-cuda' \ +'compressor-keys:Download compressor keys' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack prover commands' commands "$@" +} +(( $+functions[_zkstack__prover__compressor-keys_commands] )) || +_zkstack__prover__compressor-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover compressor-keys commands' commands "$@" +} +(( $+functions[_zkstack__prover__help_commands] )) || +_zkstack__prover__help_commands() { + local commands; commands=( +'init:Initialize prover' \ +'setup-keys:Generate setup keys' \ +'run:Run prover' \ +'init-bellman-cuda:Initialize bellman-cuda' \ +'compressor-keys:Download compressor keys' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack prover help commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__compressor-keys_commands] )) || +_zkstack__prover__help__compressor-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help compressor-keys commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__help_commands] )) || +_zkstack__prover__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help help commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__init_commands] )) || +_zkstack__prover__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help init commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__init-bellman-cuda_commands] )) || +_zkstack__prover__help__init-bellman-cuda_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help init-bellman-cuda commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__run_commands] )) || +_zkstack__prover__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help run commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__setup-keys_commands] )) || +_zkstack__prover__help__setup-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help setup-keys commands' commands "$@" +} +(( $+functions[_zkstack__prover__init_commands] )) || +_zkstack__prover__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover init commands' commands "$@" +} +(( $+functions[_zkstack__prover__init-bellman-cuda_commands] )) || +_zkstack__prover__init-bellman-cuda_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover init-bellman-cuda commands' commands "$@" +} +(( $+functions[_zkstack__prover__run_commands] )) || +_zkstack__prover__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover run commands' commands "$@" +} +(( $+functions[_zkstack__prover__setup-keys_commands] )) || +_zkstack__prover__setup-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover setup-keys commands' commands "$@" +} +(( $+functions[_zkstack__update_commands] )) || +_zkstack__update_commands() { + local commands; commands=() + _describe -t commands 'zkstack update commands' commands "$@" +} + +if [ "$funcstack[1]" = "_zkstack" ]; then + _zkstack "$@" +else + compdef _zkstack zkstack +fi From 142a327e847a740fede4149f8f7394c19df9b41d Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 31 Oct 2024 13:05:18 -0300 Subject: [PATCH 19/38] lint --- zkstack_cli/crates/zkstack/completion/_zkstack.zsh | 2 -- zkstack_cli/crates/zkstack/completion/zkstack.fish | 2 -- zkstack_cli/crates/zkstack/completion/zkstack.sh | 12 ++---------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh index 0c812a5f5b32..ba9feb654106 100644 --- a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh +++ b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh @@ -82,7 +82,6 @@ in-file\:"Specify file with wallets"))' \ '--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ '--set-as-default=[Set as default chain]' \ '--evm-emulator=[Enable EVM emulator]' \ -'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ '--start-containers=[Start reth and postgres containers after creation]' \ '--chain=[Chain to use]:CHAIN:_default' \ '--legacy-bridge[]' \ @@ -244,7 +243,6 @@ in-file\:"Specify file with wallets"))' \ '--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ '--set-as-default=[Set as default chain]' \ '--evm-emulator=[Enable EVM emulator]' \ -'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ '--chain=[Chain to use]:CHAIN:_default' \ '--legacy-bridge[]' \ '-v[Verbose mode]' \ diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.fish b/zkstack_cli/crates/zkstack/completion/zkstack.fish index 488d28f27b59..81e1db8a61ff 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.fish +++ b/zkstack_cli/crates/zkstack/completion/zkstack.fish @@ -71,7 +71,6 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_se complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l base-token-price-denominator -d 'Base token denominator' -r complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l set-as-default -d 'Set as default chain' -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l evm-emulator -d 'Enable EVM emulator' -r -f -a "{true\t'',false\t''}" -complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l l1-network -d 'L1 Network' -r -f -a "{localhost\t'',sepolia\t'',holesky\t'',mainnet\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l start-containers -d 'Start reth and postgres containers after creation' -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l legacy-bridge @@ -159,7 +158,6 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_s complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l base-token-price-denominator -d 'Base token denominator' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l set-as-default -d 'Set as default chain' -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l evm-emulator -d 'Enable EVM emulator' -r -f -a "{true\t'',false\t''}" -complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l l1-network -d 'L1 Network' -r -f -a "{localhost\t'',sepolia\t'',holesky\t'',mainnet\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l legacy-bridge complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -s v -l verbose -d 'Verbose mode' diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.sh b/zkstack_cli/crates/zkstack/completion/zkstack.sh index 02bb834d07bf..bbb413459ea2 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.sh +++ b/zkstack_cli/crates/zkstack/completion/zkstack.sh @@ -1427,7 +1427,7 @@ _zkstack() { return 0 ;; zkstack__chain__create) - opts="-v -h --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --l1-network --verbose --chain --ignore-prerequisites --help" + opts="-v -h --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1488,10 +1488,6 @@ _zkstack() { COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 ;; - --l1-network) - COMPREPLY=($(compgen -W "localhost sepolia holesky mainnet" -- "${cur}")) - return 0 - ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -4800,7 +4796,7 @@ _zkstack() { return 0 ;; zkstack__ecosystem__create) - opts="-v -h --ecosystem-name --l1-network --link-to-code --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --l1-network --start-containers --verbose --chain --ignore-prerequisites --help" + opts="-v -h --ecosystem-name --l1-network --link-to-code --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --start-containers --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4876,10 +4872,6 @@ _zkstack() { COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 ;; - --l1-network) - COMPREPLY=($(compgen -W "localhost sepolia holesky mainnet" -- "${cur}")) - return 0 - ;; --start-containers) COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 From 6d94d1ba820423e1d79823ef5228663e03f56000 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 5 Nov 2024 11:32:43 -0300 Subject: [PATCH 20/38] Fix ci --- .github/workflows/ci-core-reusable.yml | 2 +- core/lib/contract_verifier/src/tests/real.rs | 4 ++-- zkstack_cli/Cargo.lock | 7 ------- zkstack_cli/README.md | 4 ++-- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index 49002fb278e3..a176d451900a 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -75,7 +75,7 @@ jobs: run: ci_run yarn l1-contracts test - name: Download compilers for contract verifier tests - run: ci_run zkstack contract-verifier init --zksolc-version=v1.5.3 --zkvyper-version=v1.5.4 --solc-version=0.8.26 --vyper-version=v0.3.10 --era-vm-solc-version=0.8.26-1.0.1 --only --chain era + run: ci_run zkstack chain contract-verifier init --zksolc-version=v1.5.3 --zkvyper-version=v1.5.4 --solc-version=0.8.26 --vyper-version=v0.3.10 --era-vm-solc-version=0.8.26-1.0.1 --only --chain era - name: Rust unit tests run: | diff --git a/core/lib/contract_verifier/src/tests/real.rs b/core/lib/contract_verifier/src/tests/real.rs index b7acc753fd6d..92202ee654d3 100644 --- a/core/lib/contract_verifier/src/tests/real.rs +++ b/core/lib/contract_verifier/src/tests/real.rs @@ -1,4 +1,4 @@ -//! Tests using real compiler toolchains. Should be prepared by calling `zkstack contract-verifier init` +//! Tests using real compiler toolchains. Should be prepared by calling `zkstack chain contract-verifier init` //! with at least one `solc` and `zksolc` version. If there are no compilers, the tests will be ignored //! unless the `RUN_CONTRACT_VERIFICATION_TEST` env var is set to `true`, in which case the tests will fail. @@ -13,7 +13,7 @@ fn assert_no_compilers_expected() { env::var("RUN_CONTRACT_VERIFICATION_TEST").ok().as_deref(), Some("true"), "Expected pre-installed compilers since `RUN_CONTRACT_VERIFICATION_TEST=true`, but they are not installed. \ - Use `zkstack contract-verifier init` to install compilers" + Use `zkstack chain contract-verifier init` to install compilers" ); println!("No compilers found, skipping the test"); } diff --git a/zkstack_cli/Cargo.lock b/zkstack_cli/Cargo.lock index 7770d06a1977..0f3450db64d0 100644 --- a/zkstack_cli/Cargo.lock +++ b/zkstack_cli/Cargo.lock @@ -1088,7 +1088,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", - "serde", ] [[package]] @@ -6799,11 +6798,6 @@ dependencies = [ "rand", "secrecy", "serde", - "strum", - "strum_macros", - "time", - "url", - "vise", "zksync_basic_types", "zksync_concurrency", "zksync_consensus_utils", @@ -6953,7 +6947,6 @@ dependencies = [ "secrecy", "serde_json", "serde_yaml", - "time", "tracing", "zksync_basic_types", "zksync_config", diff --git a/zkstack_cli/README.md b/zkstack_cli/README.md index 7700e1a98983..76fa09fca2dd 100644 --- a/zkstack_cli/README.md +++ b/zkstack_cli/README.md @@ -214,13 +214,13 @@ For `witness-generator`, specify the round with `--round `. Rounds: Download required binaries (`solc`, `zksolc`, `vyper`, `zkvyper`): ```bash -zkstack contract-verifier init +zkstack chain contract-verifier init ``` Run the contract verifier: ```bash -zkstack contract-verifier run +zkstack chain contract-verifier run ``` ### External Node From 942e335d71d87e791e8de377f329660225af46b0 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 7 Nov 2024 15:08:06 -0300 Subject: [PATCH 21/38] Make contract_verifier:init:run async --- .../crates/zkstack/src/commands/chain/contract_verifier/init.rs | 2 +- .../crates/zkstack/src/commands/chain/contract_verifier/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs index ffa2bfd470b8..8cfe019a53c8 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs @@ -7,7 +7,7 @@ use xshell::{cmd, Shell}; use super::args::{init::InitContractVerifierArgs, releases::Version}; use crate::messages::{msg_binary_already_exists, msg_downloading_binary_spinner}; -pub(crate) fn run(shell: &Shell, args: InitContractVerifierArgs) -> anyhow::Result<()> { +pub(crate) async fn run(shell: &Shell, args: InitContractVerifierArgs) -> anyhow::Result<()> { let args = args.fill_values_with_prompt(shell)?; let chain = ZkStackConfig::load_current_chain(shell)?; let link_to_code = chain.link_to_code; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs index 3e3d9b266e84..f70c75202f8f 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs @@ -17,6 +17,6 @@ pub enum ContractVerifierCommands { pub(crate) async fn run(shell: &Shell, args: ContractVerifierCommands) -> anyhow::Result<()> { match args { ContractVerifierCommands::Run => run::run(shell).await, - ContractVerifierCommands::Init(args) => init::run(shell, args), + ContractVerifierCommands::Init(args) => init::run(shell, args).await, } } From 1a6f628cfd2e27bad0ee2bab6f2bf72ac2f35e11 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 7 Nov 2024 15:10:09 -0300 Subject: [PATCH 22/38] Remove use messages:self --- .../crates/zkstack/src/commands/chain/consensus/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs index 4894f0b2551a..d8ca6762def7 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs @@ -19,10 +19,7 @@ use xshell::Shell; use zksync_consensus_crypto::ByteFmt; use zksync_consensus_roles::{attester, validator}; -use crate::{ - messages::{self}, - utils::consensus::parse_attester_committee, -}; +use crate::{messages, utils::consensus::parse_attester_committee}; mod conv; mod proto; From f6fb8bfdb4c44d2a5d086e3a8f0123f0fc2b3c6c Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 7 Nov 2024 15:13:23 -0300 Subject: [PATCH 23/38] Remove _zkstack.zsh --- .gitignore | 1 + _zkstack.zsh | 5094 -------------------------------------- zkstack_cli/_zkstack.zsh | 5092 ------------------------------------- 3 files changed, 1 insertion(+), 10186 deletions(-) delete mode 100644 _zkstack.zsh delete mode 100644 zkstack_cli/_zkstack.zsh diff --git a/.gitignore b/.gitignore index adf3b7799618..b02c7e79e139 100644 --- a/.gitignore +++ b/.gitignore @@ -120,3 +120,4 @@ configs/* era-observability/ core/tests/ts-integration/deployments-zk transactions/ +_zkstack.zsh diff --git a/_zkstack.zsh b/_zkstack.zsh deleted file mode 100644 index 0c812a5f5b32..000000000000 --- a/_zkstack.zsh +++ /dev/null @@ -1,5094 +0,0 @@ -#compdef zkstack - -autoload -U is-at-least - -_zkstack() { - typeset -A opt_args - typeset -a _arguments_options - local ret=1 - - if is-at-least 5.2; then - _arguments_options=(-s -S -C) - else - _arguments_options=(-s -C) - fi - - local context curcontext="$curcontext" state line - _arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -'-V[Print version]' \ -'--version[Print version]' \ -":: :_zkstack_commands" \ -"*::: :->zkstack" \ -&& ret=0 - case $state in - (zkstack) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-command-$line[1]:" - case $line[1] in - (autocomplete) -_arguments "${_arguments_options[@]}" : \ -'--generate=[The shell to generate the autocomplete script for]:GENERATOR:(bash elvish fish powershell zsh)' \ -'-o+[The out directory to write the autocomplete script to]:OUT:_files' \ -'--out=[The out directory to write the autocomplete script to]:OUT:_files' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(ecosystem) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__ecosystem_commands" \ -"*::: :->ecosystem" \ -&& ret=0 - - case $state in - (ecosystem) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-ecosystem-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -'--ecosystem-name=[]:ECOSYSTEM_NAME:_default' \ -'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ -'--link-to-code=[Code link]:LINK_TO_CODE:_files -/' \ -'--chain-name=[]:CHAIN_NAME:_default' \ -'--chain-id=[Chain ID]:CHAIN_ID:_default' \ -'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ -'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" -random\:"Generate random wallets" -empty\:"Generate placeholder wallets" -in-file\:"Specify file with wallets"))' \ -'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ -'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ -'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ -'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ -'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ -'--set-as-default=[Set as default chain]' \ -'--evm-emulator=[Enable EVM emulator]' \ -'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ -'--start-containers=[Start reth and postgres containers after creation]' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--legacy-bridge[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -'--sender=[Address of the transaction sender]:SENDER:_default' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'-o+[Output directory for the generated files]:OUT:_files' \ -'--out=[Output directory for the generated files]:OUT:_files' \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'--deploy-erc20=[Deploy ERC20 contracts]' \ -'--deploy-ecosystem=[Deploy ecosystem contracts]' \ -'--ecosystem-contracts-path=[Path to ecosystem contracts]:ECOSYSTEM_CONTRACTS_PATH:_files' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--deploy-paymaster=[Deploy Paymaster contract]' \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'-o+[Enable Grafana]' \ -'--observability=[Enable Grafana]' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-d[]' \ -'--dont-drop[]' \ -'--ecosystem-only[Initialize ecosystem only and skip chain initialization (chain can be initialized later with \`chain init\` subcommand)]' \ -'--dev[Use defaults for all options and flags. Suitable for local development]' \ -'--no-port-reallocation[Do not reallocate ports]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(change-default-chain) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -'::name:_default' \ -&& ret=0 -;; -(setup-observability) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__ecosystem__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-ecosystem-help-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(change-default-chain) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup-observability) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(chain) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__chain_commands" \ -"*::: :->chain" \ -&& ret=0 - - case $state in - (chain) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -'--chain-name=[]:CHAIN_NAME:_default' \ -'--chain-id=[Chain ID]:CHAIN_ID:_default' \ -'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ -'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" -random\:"Generate random wallets" -empty\:"Generate placeholder wallets" -in-file\:"Specify file with wallets"))' \ -'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ -'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ -'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ -'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ -'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ -'--set-as-default=[Set as default chain]' \ -'--evm-emulator=[Enable EVM emulator]' \ -'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--legacy-bridge[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -'-o+[Output directory for the generated files]:OUT:_files' \ -'--out=[Output directory for the generated files]:OUT:_files' \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'--deploy-paymaster=[]' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-d[]' \ -'--dont-drop[]' \ -'--no-port-reallocation[Do not reallocate ports]' \ -'--dev[Use defaults for all options and flags. Suitable for local development]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -":: :_zkstack__chain__init_commands" \ -"*::: :->init" \ -&& ret=0 - - case $state in - (init) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-init-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-d[Use default database urls and names]' \ -'--dev[Use default database urls and names]' \ -'-d[]' \ -'--dont-drop[]' \ -'--no-port-reallocation[Do not reallocate ports]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__init__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-init-help-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(genesis) -_arguments "${_arguments_options[@]}" : \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-d[Use default database urls and names]' \ -'--dev[Use default database urls and names]' \ -'-d[]' \ -'--dont-drop[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__chain__genesis_commands" \ -"*::: :->genesis" \ -&& ret=0 - - case $state in - (genesis) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-genesis-command-$line[1]:" - case $line[1] in - (init-database) -_arguments "${_arguments_options[@]}" : \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-d[Use default database urls and names]' \ -'--dev[Use default database urls and names]' \ -'-d[]' \ -'--dont-drop[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__genesis__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-genesis-help-command-$line[1]:" - case $line[1] in - (init-database) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(register-chain) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-l2-contracts) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(accept-chain-ownership) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(initialize-bridges) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-consensus-registry) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-multicall3) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-upgrader) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-paymaster) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(update-token-multiplier-setter) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -'*--components=[Components of server to run]:COMPONENTS:_default' \ -'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--genesis[Run server in genesis mode]' \ -'--build[Build server but don'\''t run it]' \ -'--uring[Enables uring support for RocksDB]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(contract-verifier) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__chain__contract-verifier_commands" \ -"*::: :->contract-verifier" \ -&& ret=0 - - case $state in - (contract-verifier) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'--zksolc-version=[Version of zksolc to install]:ZKSOLC_VERSION:_default' \ -'--zkvyper-version=[Version of zkvyper to install]:ZKVYPER_VERSION:_default' \ -'--solc-version=[Version of solc to install]:SOLC_VERSION:_default' \ -'--era-vm-solc-version=[Version of era vm solc to install]:ERA_VM_SOLC_VERSION:_default' \ -'--vyper-version=[Version of vyper to install]:VYPER_VERSION:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--only[Install only provided compilers]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__contract-verifier__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-help-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(consensus) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__chain__consensus_commands" \ -"*::: :->consensus" \ -&& ret=0 - - case $state in - (consensus) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-consensus-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -'--from-file=[Sets the attester committee in the consensus registry contract to the committee in the yaml file. File format is definied in \`commands/consensus/proto/mod.proto\`]:FROM_FILE:_files' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--from-genesis[Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__consensus__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-consensus-help-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help__init_commands" \ -"*::: :->init" \ -&& ret=0 - - case $state in - (init) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-init-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(genesis) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help__genesis_commands" \ -"*::: :->genesis" \ -&& ret=0 - - case $state in - (genesis) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-genesis-command-$line[1]:" - case $line[1] in - (init-database) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(register-chain) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-l2-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(accept-chain-ownership) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(initialize-bridges) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-consensus-registry) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-multicall3) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-upgrader) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-paymaster) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(update-token-multiplier-setter) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract-verifier) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help__contract-verifier_commands" \ -"*::: :->contract-verifier" \ -&& ret=0 - - case $state in - (contract-verifier) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-contract-verifier-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(consensus) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help__consensus_commands" \ -"*::: :->consensus" \ -&& ret=0 - - case $state in - (consensus) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-consensus-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(dev) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev_commands" \ -"*::: :->dev" \ -&& ret=0 - - case $state in - (dev) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-command-$line[1]:" - case $line[1] in - (database) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__database_commands" \ -"*::: :->database" \ -&& ret=0 - - case $state in - (database) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-database-command-$line[1]:" - case $line[1] in - (check-sqlx-data) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(new-migration) -_arguments "${_arguments_options[@]}" : \ -'--database=[Database to create new migration for]:DATABASE:(prover core)' \ -'--name=[Migration name]:NAME:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__database__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-database-help-command-$line[1]:" - case $line[1] in - (check-sqlx-data) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(new-migration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(test) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__test_commands" \ -"*::: :->test" \ -&& ret=0 - - case $state in - (test) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-test-command-$line[1]:" - case $line[1] in - (integration) -_arguments "${_arguments_options[@]}" : \ -'-t+[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ -'--test-pattern=[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-e[Run tests for external node]' \ -'--external-node[Run tests for external node]' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(fees) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'--no-kill[The test will not kill all the nodes during execution]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--enable-consensus[Enable consensus]' \ -'-e[Run tests for external node]' \ -'--external-node[Run tests for external node]' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'--no-kill[The test will not kill all the nodes during execution]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(recovery) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-s[Run recovery from a snapshot instead of genesis]' \ -'--snapshot[Run recovery from a snapshot instead of genesis]' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'--no-kill[The test will not kill all the nodes during execution]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(build) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(rust) -_arguments "${_arguments_options[@]}" : \ -'--options=[Cargo test flags]:OPTIONS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(l1-contracts) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(wallet) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(loadtest) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__test__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-test-help-command-$line[1]:" - case $line[1] in - (integration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fees) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(recovery) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(rust) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(l1-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(wallet) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(loadtest) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(clean) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__clean_commands" \ -"*::: :->clean" \ -&& ret=0 - - case $state in - (clean) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-clean-command-$line[1]:" - case $line[1] in - (all) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(contracts-cache) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__clean__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-clean-help-command-$line[1]:" - case $line[1] in - (all) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contracts-cache) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(snapshot) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__snapshot_commands" \ -"*::: :->snapshot" \ -&& ret=0 - - case $state in - (snapshot) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__snapshot__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-help-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(lint) -_arguments "${_arguments_options[@]}" : \ -'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ -'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-c[]' \ -'--check[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(fmt) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-c[]' \ -'--check[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__fmt_commands" \ -"*::: :->fmt" \ -&& ret=0 - - case $state in - (fmt) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-fmt-command-$line[1]:" - case $line[1] in - (rustfmt) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(contract) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(prettier) -_arguments "${_arguments_options[@]}" : \ -'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ -'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__fmt__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-fmt-help-command-$line[1]:" - case $line[1] in - (rustfmt) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prettier) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-prover-command-$line[1]:" - case $line[1] in - (info) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(insert-batch) -_arguments "${_arguments_options[@]}" : \ -'--number=[]:NUMBER:_default' \ -'--version=[]:VERSION:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--default[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(insert-version) -_arguments "${_arguments_options[@]}" : \ -'--version=[]:VERSION:_default' \ -'--snark-wrapper=[]:SNARK_WRAPPER:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--default[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__prover__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-prover-help-command-$line[1]:" - case $line[1] in - (info) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-batch) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-version) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(contracts) -_arguments "${_arguments_options[@]}" : \ -'--l1-contracts=[Build L1 contracts]' \ -'--l2-contracts=[Build L2 contracts]' \ -'--system-contracts=[Build system contracts]' \ -'--test-contracts=[Build test contracts]' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(config-writer) -_arguments "${_arguments_options[@]}" : \ -'-p+[Path to the config file to override]:PATH:_default' \ -'--path=[Path to the config file to override]:PATH:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(send-transactions) -_arguments "${_arguments_options[@]}" : \ -'--file=[]:FILE:_files' \ -'--private-key=[]:PRIVATE_KEY:_default' \ -'--l1-rpc-url=[]:L1_RPC_URL:_default' \ -'--confirmations=[]:CONFIRMATIONS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(status) -_arguments "${_arguments_options[@]}" : \ -'-u+[URL of the health check endpoint]:URL:_default' \ -'--url=[URL of the health check endpoint]:URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__status_commands" \ -"*::: :->status" \ -&& ret=0 - - case $state in - (status) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-status-command-$line[1]:" - case $line[1] in - (ports) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__status__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-status-help-command-$line[1]:" - case $line[1] in - (ports) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(generate-genesis) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-command-$line[1]:" - case $line[1] in - (database) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__database_commands" \ -"*::: :->database" \ -&& ret=0 - - case $state in - (database) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-database-command-$line[1]:" - case $line[1] in - (check-sqlx-data) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(new-migration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(test) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__test_commands" \ -"*::: :->test" \ -&& ret=0 - - case $state in - (test) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-test-command-$line[1]:" - case $line[1] in - (integration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fees) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(recovery) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(rust) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(l1-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(wallet) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(loadtest) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(clean) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__clean_commands" \ -"*::: :->clean" \ -&& ret=0 - - case $state in - (clean) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-clean-command-$line[1]:" - case $line[1] in - (all) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contracts-cache) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(snapshot) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__snapshot_commands" \ -"*::: :->snapshot" \ -&& ret=0 - - case $state in - (snapshot) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-snapshot-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(lint) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fmt) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__fmt_commands" \ -"*::: :->fmt" \ -&& ret=0 - - case $state in - (fmt) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-fmt-command-$line[1]:" - case $line[1] in - (rustfmt) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prettier) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-prover-command-$line[1]:" - case $line[1] in - (info) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-batch) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-version) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(config-writer) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(send-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(status) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__status_commands" \ -"*::: :->status" \ -&& ret=0 - - case $state in - (status) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-status-command-$line[1]:" - case $line[1] in - (ports) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(generate-genesis) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-prover-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -'--proof-store-dir=[]:PROOF_STORE_DIR:_default' \ -'--bucket-base-url=[]:BUCKET_BASE_URL:_default' \ -'--credentials-file=[]:CREDENTIALS_FILE:_default' \ -'--bucket-name=[]:BUCKET_NAME:_default' \ -'--location=[]:LOCATION:_default' \ -'--project-id=[]:PROJECT_ID:_default' \ -'--shall-save-to-public-bucket=[]:SHALL_SAVE_TO_PUBLIC_BUCKET:(true false)' \ -'--public-store-dir=[]:PUBLIC_STORE_DIR:_default' \ -'--public-bucket-base-url=[]:PUBLIC_BUCKET_BASE_URL:_default' \ -'--public-credentials-file=[]:PUBLIC_CREDENTIALS_FILE:_default' \ -'--public-bucket-name=[]:PUBLIC_BUCKET_NAME:_default' \ -'--public-location=[]:PUBLIC_LOCATION:_default' \ -'--public-project-id=[]:PUBLIC_PROJECT_ID:_default' \ -'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ -'--bellman-cuda=[]' \ -'--setup-compressor-key=[]' \ -'--path=[]:PATH:_default' \ -'--region=[]:REGION:(us europe asia)' \ -'--mode=[]:MODE:(download generate)' \ -'--setup-keys=[]' \ -'--setup-database=[]:SETUP_DATABASE:(true false)' \ -'--prover-db-url=[Prover database url without database name]:PROVER_DB_URL:_default' \ -'--prover-db-name=[Prover database name]:PROVER_DB_NAME:_default' \ -'-u+[Use default database urls and names]:USE_DEFAULT:(true false)' \ -'--use-default=[Use default database urls and names]:USE_DEFAULT:(true false)' \ -'-d+[]:DONT_DROP:(true false)' \ -'--dont-drop=[]:DONT_DROP:(true false)' \ -'--cloud-type=[]:CLOUD_TYPE:(gcp local)' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--dev[]' \ -'(--bellman-cuda-dir)--clone[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(setup-keys) -_arguments "${_arguments_options[@]}" : \ -'--region=[]:REGION:(us europe asia)' \ -'--mode=[]:MODE:(download generate)' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -'--component=[]:COMPONENT:(gateway witness-generator witness-vector-generator prover circuit-prover compressor prover-job-monitor)' \ -'--round=[]:ROUND:(all-rounds basic-circuits leaf-aggregation node-aggregation recursion-tip scheduler)' \ -'--threads=[]:THREADS:_default' \ -'--max-allocation=[Memory allocation limit in bytes (for prover component)]:MAX_ALLOCATION:_default' \ -'--witness-vector-generator-count=[]:WITNESS_VECTOR_GENERATOR_COUNT:_default' \ -'--max-allocation=[]:MAX_ALLOCATION:_default' \ -'--docker=[]:DOCKER:(true false)' \ -'--tag=[]:TAG:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(init-bellman-cuda) -_arguments "${_arguments_options[@]}" : \ -'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'(--bellman-cuda-dir)--clone[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(compressor-keys) -_arguments "${_arguments_options[@]}" : \ -'--path=[]:PATH:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__prover__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-prover-help-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup-keys) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init-bellman-cuda) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(compressor-keys) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(external-node) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__external-node_commands" \ -"*::: :->external-node" \ -&& ret=0 - - case $state in - (external-node) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-external-node-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -'--db-url=[]:DB_URL:_default' \ -'--db-name=[]:DB_NAME:_default' \ -'--l1-rpc-url=[]:L1_RPC_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-u[Use default database urls and names]' \ -'--use-default[Use default database urls and names]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -'*--components=[Components of server to run]:COMPONENTS:_default' \ -'--enable-consensus=[Enable consensus]' \ -'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--reinit[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__external-node__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-external-node-help-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -'-o+[Enable Grafana]' \ -'--observability=[Enable Grafana]' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(portal) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(explorer) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__explorer_commands" \ -"*::: :->explorer" \ -&& ret=0 - - case $state in - (explorer) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-explorer-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(run-backend) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__explorer__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-explorer-help-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run-backend) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(update) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-c[Update only the config files]' \ -'--only-config[Update only the config files]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(markdown) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-command-$line[1]:" - case $line[1] in - (autocomplete) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(ecosystem) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__ecosystem_commands" \ -"*::: :->ecosystem" \ -&& ret=0 - - case $state in - (ecosystem) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-ecosystem-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(change-default-chain) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup-observability) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(chain) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain_commands" \ -"*::: :->chain" \ -&& ret=0 - - case $state in - (chain) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain__init_commands" \ -"*::: :->init" \ -&& ret=0 - - case $state in - (init) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-init-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(genesis) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain__genesis_commands" \ -"*::: :->genesis" \ -&& ret=0 - - case $state in - (genesis) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-genesis-command-$line[1]:" - case $line[1] in - (init-database) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(register-chain) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-l2-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(accept-chain-ownership) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(initialize-bridges) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-consensus-registry) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-multicall3) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-upgrader) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-paymaster) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(update-token-multiplier-setter) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract-verifier) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain__contract-verifier_commands" \ -"*::: :->contract-verifier" \ -&& ret=0 - - case $state in - (contract-verifier) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-contract-verifier-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(consensus) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain__consensus_commands" \ -"*::: :->consensus" \ -&& ret=0 - - case $state in - (consensus) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-consensus-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(dev) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev_commands" \ -"*::: :->dev" \ -&& ret=0 - - case $state in - (dev) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-command-$line[1]:" - case $line[1] in - (database) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__database_commands" \ -"*::: :->database" \ -&& ret=0 - - case $state in - (database) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-database-command-$line[1]:" - case $line[1] in - (check-sqlx-data) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(new-migration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(test) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__test_commands" \ -"*::: :->test" \ -&& ret=0 - - case $state in - (test) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-test-command-$line[1]:" - case $line[1] in - (integration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fees) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(recovery) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(rust) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(l1-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(wallet) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(loadtest) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(clean) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__clean_commands" \ -"*::: :->clean" \ -&& ret=0 - - case $state in - (clean) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-clean-command-$line[1]:" - case $line[1] in - (all) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contracts-cache) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(snapshot) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__snapshot_commands" \ -"*::: :->snapshot" \ -&& ret=0 - - case $state in - (snapshot) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-snapshot-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(lint) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fmt) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__fmt_commands" \ -"*::: :->fmt" \ -&& ret=0 - - case $state in - (fmt) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-fmt-command-$line[1]:" - case $line[1] in - (rustfmt) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prettier) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-prover-command-$line[1]:" - case $line[1] in - (info) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-batch) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-version) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(config-writer) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(send-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(status) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__status_commands" \ -"*::: :->status" \ -&& ret=0 - - case $state in - (status) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-status-command-$line[1]:" - case $line[1] in - (ports) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(generate-genesis) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-prover-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup-keys) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init-bellman-cuda) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(compressor-keys) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(external-node) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__external-node_commands" \ -"*::: :->external-node" \ -&& ret=0 - - case $state in - (external-node) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-external-node-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(portal) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(explorer) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__explorer_commands" \ -"*::: :->explorer" \ -&& ret=0 - - case $state in - (explorer) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-explorer-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run-backend) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(update) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(markdown) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -} - -(( $+functions[_zkstack_commands] )) || -_zkstack_commands() { - local commands; commands=( -'autocomplete:Create shell autocompletion files' \ -'ecosystem:Ecosystem related commands' \ -'chain:Chain related commands' \ -'dev:Supervisor related commands' \ -'prover:Prover related commands' \ -'external-node:External Node related commands' \ -'containers:Run containers for local development' \ -'portal:Run dapp-portal' \ -'explorer:Run block-explorer' \ -'update:Update ZKsync' \ -'markdown:Print markdown help' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack commands' commands "$@" -} -(( $+functions[_zkstack__autocomplete_commands] )) || -_zkstack__autocomplete_commands() { - local commands; commands=() - _describe -t commands 'zkstack autocomplete commands' commands "$@" -} -(( $+functions[_zkstack__chain_commands] )) || -_zkstack__chain_commands() { - local commands; commands=( -'create:Create a new chain, setting the necessary configurations for later initialization' \ -'build-transactions:Create unsigned transactions for chain deployment' \ -'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ -'genesis:Run server genesis' \ -'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ -'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ -'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ -'initialize-bridges:Initialize bridges on L2' \ -'deploy-consensus-registry:Deploy L2 consensus registry' \ -'deploy-multicall3:Deploy L2 multicall3' \ -'deploy-upgrader:Deploy Default Upgrader' \ -'deploy-paymaster:Deploy paymaster smart contract' \ -'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ -'server:Run server' \ -'contract-verifier:Run contract verifier' \ -'consensus:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain commands' commands "$@" -} -(( $+functions[_zkstack__chain__accept-chain-ownership_commands] )) || -_zkstack__chain__accept-chain-ownership_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain accept-chain-ownership commands' commands "$@" -} -(( $+functions[_zkstack__chain__build-transactions_commands] )) || -_zkstack__chain__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus_commands] )) || -_zkstack__chain__consensus_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain consensus commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__get-attester-committee_commands] )) || -_zkstack__chain__consensus__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__help_commands] )) || -_zkstack__chain__consensus__help_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain consensus help commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__help__get-attester-committee_commands] )) || -_zkstack__chain__consensus__help__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus help get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__help__help_commands] )) || -_zkstack__chain__consensus__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__help__set-attester-committee_commands] )) || -_zkstack__chain__consensus__help__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus help set-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__set-attester-committee_commands] )) || -_zkstack__chain__consensus__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus set-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier_commands] )) || -_zkstack__chain__contract-verifier_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain contract-verifier commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__help_commands] )) || -_zkstack__chain__contract-verifier__help_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain contract-verifier help commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__help__help_commands] )) || -_zkstack__chain__contract-verifier__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__help__init_commands] )) || -_zkstack__chain__contract-verifier__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier help init commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__help__run_commands] )) || -_zkstack__chain__contract-verifier__help__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier help run commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__init_commands] )) || -_zkstack__chain__contract-verifier__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier init commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__run_commands] )) || -_zkstack__chain__contract-verifier__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier run commands' commands "$@" -} -(( $+functions[_zkstack__chain__create_commands] )) || -_zkstack__chain__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain create commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-consensus-registry_commands] )) || -_zkstack__chain__deploy-consensus-registry_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-consensus-registry commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-l2-contracts_commands] )) || -_zkstack__chain__deploy-l2-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-l2-contracts commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-multicall3_commands] )) || -_zkstack__chain__deploy-multicall3_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-multicall3 commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-paymaster_commands] )) || -_zkstack__chain__deploy-paymaster_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-paymaster commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-upgrader_commands] )) || -_zkstack__chain__deploy-upgrader_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-upgrader commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis_commands] )) || -_zkstack__chain__genesis_commands() { - local commands; commands=( -'init-database:Initialize databases' \ -'server:Runs server genesis' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain genesis commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__help_commands] )) || -_zkstack__chain__genesis__help_commands() { - local commands; commands=( -'init-database:Initialize databases' \ -'server:Runs server genesis' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain genesis help commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__help__help_commands] )) || -_zkstack__chain__genesis__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__help__init-database_commands] )) || -_zkstack__chain__genesis__help__init-database_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis help init-database commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__help__server_commands] )) || -_zkstack__chain__genesis__help__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis help server commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__init-database_commands] )) || -_zkstack__chain__genesis__init-database_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis init-database commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__server_commands] )) || -_zkstack__chain__genesis__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis server commands' commands "$@" -} -(( $+functions[_zkstack__chain__help_commands] )) || -_zkstack__chain__help_commands() { - local commands; commands=( -'create:Create a new chain, setting the necessary configurations for later initialization' \ -'build-transactions:Create unsigned transactions for chain deployment' \ -'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ -'genesis:Run server genesis' \ -'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ -'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ -'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ -'initialize-bridges:Initialize bridges on L2' \ -'deploy-consensus-registry:Deploy L2 consensus registry' \ -'deploy-multicall3:Deploy L2 multicall3' \ -'deploy-upgrader:Deploy Default Upgrader' \ -'deploy-paymaster:Deploy paymaster smart contract' \ -'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ -'server:Run server' \ -'contract-verifier:Run contract verifier' \ -'consensus:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain help commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__accept-chain-ownership_commands] )) || -_zkstack__chain__help__accept-chain-ownership_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help accept-chain-ownership commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__build-transactions_commands] )) || -_zkstack__chain__help__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__consensus_commands] )) || -_zkstack__chain__help__consensus_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ - ) - _describe -t commands 'zkstack chain help consensus commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__consensus__get-attester-committee_commands] )) || -_zkstack__chain__help__consensus__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help consensus get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__consensus__set-attester-committee_commands] )) || -_zkstack__chain__help__consensus__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help consensus set-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__contract-verifier_commands] )) || -_zkstack__chain__help__contract-verifier_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ - ) - _describe -t commands 'zkstack chain help contract-verifier commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__contract-verifier__init_commands] )) || -_zkstack__chain__help__contract-verifier__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help contract-verifier init commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__contract-verifier__run_commands] )) || -_zkstack__chain__help__contract-verifier__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help contract-verifier run commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__create_commands] )) || -_zkstack__chain__help__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help create commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-consensus-registry_commands] )) || -_zkstack__chain__help__deploy-consensus-registry_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-consensus-registry commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-l2-contracts_commands] )) || -_zkstack__chain__help__deploy-l2-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-l2-contracts commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-multicall3_commands] )) || -_zkstack__chain__help__deploy-multicall3_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-multicall3 commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-paymaster_commands] )) || -_zkstack__chain__help__deploy-paymaster_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-paymaster commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-upgrader_commands] )) || -_zkstack__chain__help__deploy-upgrader_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-upgrader commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__genesis_commands] )) || -_zkstack__chain__help__genesis_commands() { - local commands; commands=( -'init-database:Initialize databases' \ -'server:Runs server genesis' \ - ) - _describe -t commands 'zkstack chain help genesis commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__genesis__init-database_commands] )) || -_zkstack__chain__help__genesis__init-database_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help genesis init-database commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__genesis__server_commands] )) || -_zkstack__chain__help__genesis__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help genesis server commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__help_commands] )) || -_zkstack__chain__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__init_commands] )) || -_zkstack__chain__help__init_commands() { - local commands; commands=( -'configs:Initialize chain configs' \ - ) - _describe -t commands 'zkstack chain help init commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__init__configs_commands] )) || -_zkstack__chain__help__init__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help init configs commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__initialize-bridges_commands] )) || -_zkstack__chain__help__initialize-bridges_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help initialize-bridges commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__register-chain_commands] )) || -_zkstack__chain__help__register-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help register-chain commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__server_commands] )) || -_zkstack__chain__help__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help server commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__update-token-multiplier-setter_commands] )) || -_zkstack__chain__help__update-token-multiplier-setter_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help update-token-multiplier-setter commands' commands "$@" -} -(( $+functions[_zkstack__chain__init_commands] )) || -_zkstack__chain__init_commands() { - local commands; commands=( -'configs:Initialize chain configs' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain init commands' commands "$@" -} -(( $+functions[_zkstack__chain__init__configs_commands] )) || -_zkstack__chain__init__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain init configs commands' commands "$@" -} -(( $+functions[_zkstack__chain__init__help_commands] )) || -_zkstack__chain__init__help_commands() { - local commands; commands=( -'configs:Initialize chain configs' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain init help commands' commands "$@" -} -(( $+functions[_zkstack__chain__init__help__configs_commands] )) || -_zkstack__chain__init__help__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain init help configs commands' commands "$@" -} -(( $+functions[_zkstack__chain__init__help__help_commands] )) || -_zkstack__chain__init__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain init help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__initialize-bridges_commands] )) || -_zkstack__chain__initialize-bridges_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain initialize-bridges commands' commands "$@" -} -(( $+functions[_zkstack__chain__register-chain_commands] )) || -_zkstack__chain__register-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain register-chain commands' commands "$@" -} -(( $+functions[_zkstack__chain__server_commands] )) || -_zkstack__chain__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain server commands' commands "$@" -} -(( $+functions[_zkstack__chain__update-token-multiplier-setter_commands] )) || -_zkstack__chain__update-token-multiplier-setter_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain update-token-multiplier-setter commands' commands "$@" -} -(( $+functions[_zkstack__containers_commands] )) || -_zkstack__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack containers commands' commands "$@" -} -(( $+functions[_zkstack__dev_commands] )) || -_zkstack__dev_commands() { - local commands; commands=( -'database:Database related commands' \ -'test:Run tests' \ -'clean:Clean artifacts' \ -'snapshot:Snapshots creator' \ -'lint:Lint code' \ -'fmt:Format code' \ -'prover:Protocol version used by provers' \ -'contracts:Build contracts' \ -'config-writer:Overwrite general config' \ -'send-transactions:Send transactions from file' \ -'status:Get status of the server' \ -'generate-genesis:Generate new genesis file based on current contracts' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean_commands] )) || -_zkstack__dev__clean_commands() { - local commands; commands=( -'all:Remove containers and contracts cache' \ -'containers:Remove containers and docker volumes' \ -'contracts-cache:Remove contracts caches' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev clean commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__all_commands] )) || -_zkstack__dev__clean__all_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean all commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__containers_commands] )) || -_zkstack__dev__clean__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean containers commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__contracts-cache_commands] )) || -_zkstack__dev__clean__contracts-cache_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean contracts-cache commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help_commands] )) || -_zkstack__dev__clean__help_commands() { - local commands; commands=( -'all:Remove containers and contracts cache' \ -'containers:Remove containers and docker volumes' \ -'contracts-cache:Remove contracts caches' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev clean help commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help__all_commands] )) || -_zkstack__dev__clean__help__all_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean help all commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help__containers_commands] )) || -_zkstack__dev__clean__help__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean help containers commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help__contracts-cache_commands] )) || -_zkstack__dev__clean__help__contracts-cache_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean help contracts-cache commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help__help_commands] )) || -_zkstack__dev__clean__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__config-writer_commands] )) || -_zkstack__dev__config-writer_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev config-writer commands' commands "$@" -} -(( $+functions[_zkstack__dev__contracts_commands] )) || -_zkstack__dev__contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__database_commands] )) || -_zkstack__dev__database_commands() { - local commands; commands=( -'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ -'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ -'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ -'new-migration:Create new migration' \ -'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ -'reset:Reset databases. If no databases are selected, all databases will be reset.' \ -'setup:Setup databases. If no databases are selected, all databases will be setup.' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev database commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__check-sqlx-data_commands] )) || -_zkstack__dev__database__check-sqlx-data_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database check-sqlx-data commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__drop_commands] )) || -_zkstack__dev__database__drop_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database drop commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help_commands] )) || -_zkstack__dev__database__help_commands() { - local commands; commands=( -'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ -'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ -'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ -'new-migration:Create new migration' \ -'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ -'reset:Reset databases. If no databases are selected, all databases will be reset.' \ -'setup:Setup databases. If no databases are selected, all databases will be setup.' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev database help commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__check-sqlx-data_commands] )) || -_zkstack__dev__database__help__check-sqlx-data_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help check-sqlx-data commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__drop_commands] )) || -_zkstack__dev__database__help__drop_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help drop commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__help_commands] )) || -_zkstack__dev__database__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__migrate_commands] )) || -_zkstack__dev__database__help__migrate_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help migrate commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__new-migration_commands] )) || -_zkstack__dev__database__help__new-migration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help new-migration commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__prepare_commands] )) || -_zkstack__dev__database__help__prepare_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help prepare commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__reset_commands] )) || -_zkstack__dev__database__help__reset_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help reset commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__setup_commands] )) || -_zkstack__dev__database__help__setup_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help setup commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__migrate_commands] )) || -_zkstack__dev__database__migrate_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database migrate commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__new-migration_commands] )) || -_zkstack__dev__database__new-migration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database new-migration commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__prepare_commands] )) || -_zkstack__dev__database__prepare_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database prepare commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__reset_commands] )) || -_zkstack__dev__database__reset_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database reset commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__setup_commands] )) || -_zkstack__dev__database__setup_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database setup commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt_commands] )) || -_zkstack__dev__fmt_commands() { - local commands; commands=( -'rustfmt:' \ -'contract:' \ -'prettier:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev fmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__contract_commands] )) || -_zkstack__dev__fmt__contract_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt contract commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help_commands] )) || -_zkstack__dev__fmt__help_commands() { - local commands; commands=( -'rustfmt:' \ -'contract:' \ -'prettier:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev fmt help commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help__contract_commands] )) || -_zkstack__dev__fmt__help__contract_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt help contract commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help__help_commands] )) || -_zkstack__dev__fmt__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help__prettier_commands] )) || -_zkstack__dev__fmt__help__prettier_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt help prettier commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help__rustfmt_commands] )) || -_zkstack__dev__fmt__help__rustfmt_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt help rustfmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__prettier_commands] )) || -_zkstack__dev__fmt__prettier_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt prettier commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__rustfmt_commands] )) || -_zkstack__dev__fmt__rustfmt_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt rustfmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__generate-genesis_commands] )) || -_zkstack__dev__generate-genesis_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev generate-genesis commands' commands "$@" -} -(( $+functions[_zkstack__dev__help_commands] )) || -_zkstack__dev__help_commands() { - local commands; commands=( -'database:Database related commands' \ -'test:Run tests' \ -'clean:Clean artifacts' \ -'snapshot:Snapshots creator' \ -'lint:Lint code' \ -'fmt:Format code' \ -'prover:Protocol version used by provers' \ -'contracts:Build contracts' \ -'config-writer:Overwrite general config' \ -'send-transactions:Send transactions from file' \ -'status:Get status of the server' \ -'generate-genesis:Generate new genesis file based on current contracts' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev help commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__clean_commands] )) || -_zkstack__dev__help__clean_commands() { - local commands; commands=( -'all:Remove containers and contracts cache' \ -'containers:Remove containers and docker volumes' \ -'contracts-cache:Remove contracts caches' \ - ) - _describe -t commands 'zkstack dev help clean commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__clean__all_commands] )) || -_zkstack__dev__help__clean__all_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help clean all commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__clean__containers_commands] )) || -_zkstack__dev__help__clean__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help clean containers commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__clean__contracts-cache_commands] )) || -_zkstack__dev__help__clean__contracts-cache_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help clean contracts-cache commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__config-writer_commands] )) || -_zkstack__dev__help__config-writer_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help config-writer commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__contracts_commands] )) || -_zkstack__dev__help__contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database_commands] )) || -_zkstack__dev__help__database_commands() { - local commands; commands=( -'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ -'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ -'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ -'new-migration:Create new migration' \ -'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ -'reset:Reset databases. If no databases are selected, all databases will be reset.' \ -'setup:Setup databases. If no databases are selected, all databases will be setup.' \ - ) - _describe -t commands 'zkstack dev help database commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__check-sqlx-data_commands] )) || -_zkstack__dev__help__database__check-sqlx-data_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database check-sqlx-data commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__drop_commands] )) || -_zkstack__dev__help__database__drop_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database drop commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__migrate_commands] )) || -_zkstack__dev__help__database__migrate_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database migrate commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__new-migration_commands] )) || -_zkstack__dev__help__database__new-migration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database new-migration commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__prepare_commands] )) || -_zkstack__dev__help__database__prepare_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database prepare commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__reset_commands] )) || -_zkstack__dev__help__database__reset_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database reset commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__setup_commands] )) || -_zkstack__dev__help__database__setup_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database setup commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__fmt_commands] )) || -_zkstack__dev__help__fmt_commands() { - local commands; commands=( -'rustfmt:' \ -'contract:' \ -'prettier:' \ - ) - _describe -t commands 'zkstack dev help fmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__fmt__contract_commands] )) || -_zkstack__dev__help__fmt__contract_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help fmt contract commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__fmt__prettier_commands] )) || -_zkstack__dev__help__fmt__prettier_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help fmt prettier commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__fmt__rustfmt_commands] )) || -_zkstack__dev__help__fmt__rustfmt_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help fmt rustfmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__generate-genesis_commands] )) || -_zkstack__dev__help__generate-genesis_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help generate-genesis commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__help_commands] )) || -_zkstack__dev__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__lint_commands] )) || -_zkstack__dev__help__lint_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help lint commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__prover_commands] )) || -_zkstack__dev__help__prover_commands() { - local commands; commands=( -'info:' \ -'insert-batch:' \ -'insert-version:' \ - ) - _describe -t commands 'zkstack dev help prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__prover__info_commands] )) || -_zkstack__dev__help__prover__info_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help prover info commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__prover__insert-batch_commands] )) || -_zkstack__dev__help__prover__insert-batch_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help prover insert-batch commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__prover__insert-version_commands] )) || -_zkstack__dev__help__prover__insert-version_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help prover insert-version commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__send-transactions_commands] )) || -_zkstack__dev__help__send-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help send-transactions commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__snapshot_commands] )) || -_zkstack__dev__help__snapshot_commands() { - local commands; commands=( -'create:' \ - ) - _describe -t commands 'zkstack dev help snapshot commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__snapshot__create_commands] )) || -_zkstack__dev__help__snapshot__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help snapshot create commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__status_commands] )) || -_zkstack__dev__help__status_commands() { - local commands; commands=( -'ports:Show used ports' \ - ) - _describe -t commands 'zkstack dev help status commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__status__ports_commands] )) || -_zkstack__dev__help__status__ports_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help status ports commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test_commands] )) || -_zkstack__dev__help__test_commands() { - local commands; commands=( -'integration:Run integration tests' \ -'fees:Run fees test' \ -'revert:Run revert tests' \ -'recovery:Run recovery tests' \ -'upgrade:Run upgrade tests' \ -'build:Build all test dependencies' \ -'rust:Run unit-tests, accepts optional cargo test flags' \ -'l1-contracts:Run L1 contracts tests' \ -'prover:Run prover tests' \ -'wallet:Print test wallets information' \ -'loadtest:Run loadtest' \ - ) - _describe -t commands 'zkstack dev help test commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__build_commands] )) || -_zkstack__dev__help__test__build_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test build commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__fees_commands] )) || -_zkstack__dev__help__test__fees_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test fees commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__integration_commands] )) || -_zkstack__dev__help__test__integration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test integration commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__l1-contracts_commands] )) || -_zkstack__dev__help__test__l1-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test l1-contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__loadtest_commands] )) || -_zkstack__dev__help__test__loadtest_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test loadtest commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__prover_commands] )) || -_zkstack__dev__help__test__prover_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__recovery_commands] )) || -_zkstack__dev__help__test__recovery_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test recovery commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__revert_commands] )) || -_zkstack__dev__help__test__revert_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test revert commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__rust_commands] )) || -_zkstack__dev__help__test__rust_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test rust commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__upgrade_commands] )) || -_zkstack__dev__help__test__upgrade_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test upgrade commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__wallet_commands] )) || -_zkstack__dev__help__test__wallet_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test wallet commands' commands "$@" -} -(( $+functions[_zkstack__dev__lint_commands] )) || -_zkstack__dev__lint_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev lint commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover_commands] )) || -_zkstack__dev__prover_commands() { - local commands; commands=( -'info:' \ -'insert-batch:' \ -'insert-version:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help_commands] )) || -_zkstack__dev__prover__help_commands() { - local commands; commands=( -'info:' \ -'insert-batch:' \ -'insert-version:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev prover help commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help__help_commands] )) || -_zkstack__dev__prover__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help__info_commands] )) || -_zkstack__dev__prover__help__info_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover help info commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help__insert-batch_commands] )) || -_zkstack__dev__prover__help__insert-batch_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover help insert-batch commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help__insert-version_commands] )) || -_zkstack__dev__prover__help__insert-version_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover help insert-version commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__info_commands] )) || -_zkstack__dev__prover__info_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover info commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__insert-batch_commands] )) || -_zkstack__dev__prover__insert-batch_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover insert-batch commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__insert-version_commands] )) || -_zkstack__dev__prover__insert-version_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover insert-version commands' commands "$@" -} -(( $+functions[_zkstack__dev__send-transactions_commands] )) || -_zkstack__dev__send-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev send-transactions commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot_commands] )) || -_zkstack__dev__snapshot_commands() { - local commands; commands=( -'create:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev snapshot commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot__create_commands] )) || -_zkstack__dev__snapshot__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev snapshot create commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot__help_commands] )) || -_zkstack__dev__snapshot__help_commands() { - local commands; commands=( -'create:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev snapshot help commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot__help__create_commands] )) || -_zkstack__dev__snapshot__help__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev snapshot help create commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot__help__help_commands] )) || -_zkstack__dev__snapshot__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev snapshot help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__status_commands] )) || -_zkstack__dev__status_commands() { - local commands; commands=( -'ports:Show used ports' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev status commands' commands "$@" -} -(( $+functions[_zkstack__dev__status__help_commands] )) || -_zkstack__dev__status__help_commands() { - local commands; commands=( -'ports:Show used ports' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev status help commands' commands "$@" -} -(( $+functions[_zkstack__dev__status__help__help_commands] )) || -_zkstack__dev__status__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev status help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__status__help__ports_commands] )) || -_zkstack__dev__status__help__ports_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev status help ports commands' commands "$@" -} -(( $+functions[_zkstack__dev__status__ports_commands] )) || -_zkstack__dev__status__ports_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev status ports commands' commands "$@" -} -(( $+functions[_zkstack__dev__test_commands] )) || -_zkstack__dev__test_commands() { - local commands; commands=( -'integration:Run integration tests' \ -'fees:Run fees test' \ -'revert:Run revert tests' \ -'recovery:Run recovery tests' \ -'upgrade:Run upgrade tests' \ -'build:Build all test dependencies' \ -'rust:Run unit-tests, accepts optional cargo test flags' \ -'l1-contracts:Run L1 contracts tests' \ -'prover:Run prover tests' \ -'wallet:Print test wallets information' \ -'loadtest:Run loadtest' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev test commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__build_commands] )) || -_zkstack__dev__test__build_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test build commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__fees_commands] )) || -_zkstack__dev__test__fees_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test fees commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help_commands] )) || -_zkstack__dev__test__help_commands() { - local commands; commands=( -'integration:Run integration tests' \ -'fees:Run fees test' \ -'revert:Run revert tests' \ -'recovery:Run recovery tests' \ -'upgrade:Run upgrade tests' \ -'build:Build all test dependencies' \ -'rust:Run unit-tests, accepts optional cargo test flags' \ -'l1-contracts:Run L1 contracts tests' \ -'prover:Run prover tests' \ -'wallet:Print test wallets information' \ -'loadtest:Run loadtest' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev test help commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__build_commands] )) || -_zkstack__dev__test__help__build_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help build commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__fees_commands] )) || -_zkstack__dev__test__help__fees_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help fees commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__help_commands] )) || -_zkstack__dev__test__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__integration_commands] )) || -_zkstack__dev__test__help__integration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help integration commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__l1-contracts_commands] )) || -_zkstack__dev__test__help__l1-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help l1-contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__loadtest_commands] )) || -_zkstack__dev__test__help__loadtest_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help loadtest commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__prover_commands] )) || -_zkstack__dev__test__help__prover_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__recovery_commands] )) || -_zkstack__dev__test__help__recovery_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help recovery commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__revert_commands] )) || -_zkstack__dev__test__help__revert_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help revert commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__rust_commands] )) || -_zkstack__dev__test__help__rust_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help rust commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__upgrade_commands] )) || -_zkstack__dev__test__help__upgrade_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help upgrade commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__wallet_commands] )) || -_zkstack__dev__test__help__wallet_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help wallet commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__integration_commands] )) || -_zkstack__dev__test__integration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test integration commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__l1-contracts_commands] )) || -_zkstack__dev__test__l1-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test l1-contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__loadtest_commands] )) || -_zkstack__dev__test__loadtest_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test loadtest commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__prover_commands] )) || -_zkstack__dev__test__prover_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__recovery_commands] )) || -_zkstack__dev__test__recovery_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test recovery commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__revert_commands] )) || -_zkstack__dev__test__revert_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test revert commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__rust_commands] )) || -_zkstack__dev__test__rust_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test rust commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__upgrade_commands] )) || -_zkstack__dev__test__upgrade_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test upgrade commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__wallet_commands] )) || -_zkstack__dev__test__wallet_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test wallet commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem_commands] )) || -_zkstack__ecosystem_commands() { - local commands; commands=( -'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ -'build-transactions:Create transactions to build ecosystem contracts' \ -'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ -'change-default-chain:Change the default chain' \ -'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack ecosystem commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__build-transactions_commands] )) || -_zkstack__ecosystem__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__change-default-chain_commands] )) || -_zkstack__ecosystem__change-default-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem change-default-chain commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__create_commands] )) || -_zkstack__ecosystem__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem create commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help_commands] )) || -_zkstack__ecosystem__help_commands() { - local commands; commands=( -'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ -'build-transactions:Create transactions to build ecosystem contracts' \ -'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ -'change-default-chain:Change the default chain' \ -'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack ecosystem help commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__build-transactions_commands] )) || -_zkstack__ecosystem__help__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__change-default-chain_commands] )) || -_zkstack__ecosystem__help__change-default-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help change-default-chain commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__create_commands] )) || -_zkstack__ecosystem__help__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help create commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__help_commands] )) || -_zkstack__ecosystem__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help help commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__init_commands] )) || -_zkstack__ecosystem__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help init commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__setup-observability_commands] )) || -_zkstack__ecosystem__help__setup-observability_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help setup-observability commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__init_commands] )) || -_zkstack__ecosystem__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem init commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__setup-observability_commands] )) || -_zkstack__ecosystem__setup-observability_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem setup-observability commands' commands "$@" -} -(( $+functions[_zkstack__explorer_commands] )) || -_zkstack__explorer_commands() { - local commands; commands=( -'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ -'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ -'run:Run explorer app' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack explorer commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help_commands] )) || -_zkstack__explorer__help_commands() { - local commands; commands=( -'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ -'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ -'run:Run explorer app' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack explorer help commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help__help_commands] )) || -_zkstack__explorer__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer help help commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help__init_commands] )) || -_zkstack__explorer__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer help init commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help__run_commands] )) || -_zkstack__explorer__help__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer help run commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help__run-backend_commands] )) || -_zkstack__explorer__help__run-backend_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer help run-backend commands' commands "$@" -} -(( $+functions[_zkstack__explorer__init_commands] )) || -_zkstack__explorer__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer init commands' commands "$@" -} -(( $+functions[_zkstack__explorer__run_commands] )) || -_zkstack__explorer__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer run commands' commands "$@" -} -(( $+functions[_zkstack__explorer__run-backend_commands] )) || -_zkstack__explorer__run-backend_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer run-backend commands' commands "$@" -} -(( $+functions[_zkstack__external-node_commands] )) || -_zkstack__external-node_commands() { - local commands; commands=( -'configs:Prepare configs for EN' \ -'init:Init databases' \ -'run:Run external node' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack external-node commands' commands "$@" -} -(( $+functions[_zkstack__external-node__configs_commands] )) || -_zkstack__external-node__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node configs commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help_commands] )) || -_zkstack__external-node__help_commands() { - local commands; commands=( -'configs:Prepare configs for EN' \ -'init:Init databases' \ -'run:Run external node' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack external-node help commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help__configs_commands] )) || -_zkstack__external-node__help__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node help configs commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help__help_commands] )) || -_zkstack__external-node__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node help help commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help__init_commands] )) || -_zkstack__external-node__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node help init commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help__run_commands] )) || -_zkstack__external-node__help__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node help run commands' commands "$@" -} -(( $+functions[_zkstack__external-node__init_commands] )) || -_zkstack__external-node__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node init commands' commands "$@" -} -(( $+functions[_zkstack__external-node__run_commands] )) || -_zkstack__external-node__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node run commands' commands "$@" -} -(( $+functions[_zkstack__help_commands] )) || -_zkstack__help_commands() { - local commands; commands=( -'autocomplete:Create shell autocompletion files' \ -'ecosystem:Ecosystem related commands' \ -'chain:Chain related commands' \ -'dev:Supervisor related commands' \ -'prover:Prover related commands' \ -'external-node:External Node related commands' \ -'containers:Run containers for local development' \ -'portal:Run dapp-portal' \ -'explorer:Run block-explorer' \ -'update:Update ZKsync' \ -'markdown:Print markdown help' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack help commands' commands "$@" -} -(( $+functions[_zkstack__help__autocomplete_commands] )) || -_zkstack__help__autocomplete_commands() { - local commands; commands=() - _describe -t commands 'zkstack help autocomplete commands' commands "$@" -} -(( $+functions[_zkstack__help__chain_commands] )) || -_zkstack__help__chain_commands() { - local commands; commands=( -'create:Create a new chain, setting the necessary configurations for later initialization' \ -'build-transactions:Create unsigned transactions for chain deployment' \ -'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ -'genesis:Run server genesis' \ -'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ -'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ -'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ -'initialize-bridges:Initialize bridges on L2' \ -'deploy-consensus-registry:Deploy L2 consensus registry' \ -'deploy-multicall3:Deploy L2 multicall3' \ -'deploy-upgrader:Deploy Default Upgrader' \ -'deploy-paymaster:Deploy paymaster smart contract' \ -'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ -'server:Run server' \ -'contract-verifier:Run contract verifier' \ -'consensus:' \ - ) - _describe -t commands 'zkstack help chain commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__accept-chain-ownership_commands] )) || -_zkstack__help__chain__accept-chain-ownership_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain accept-chain-ownership commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__build-transactions_commands] )) || -_zkstack__help__chain__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__consensus_commands] )) || -_zkstack__help__chain__consensus_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ - ) - _describe -t commands 'zkstack help chain consensus commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__consensus__get-attester-committee_commands] )) || -_zkstack__help__chain__consensus__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain consensus get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__consensus__set-attester-committee_commands] )) || -_zkstack__help__chain__consensus__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain consensus set-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__contract-verifier_commands] )) || -_zkstack__help__chain__contract-verifier_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ - ) - _describe -t commands 'zkstack help chain contract-verifier commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__contract-verifier__init_commands] )) || -_zkstack__help__chain__contract-verifier__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain contract-verifier init commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__contract-verifier__run_commands] )) || -_zkstack__help__chain__contract-verifier__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain contract-verifier run commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__create_commands] )) || -_zkstack__help__chain__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain create commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-consensus-registry_commands] )) || -_zkstack__help__chain__deploy-consensus-registry_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-consensus-registry commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-l2-contracts_commands] )) || -_zkstack__help__chain__deploy-l2-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-l2-contracts commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-multicall3_commands] )) || -_zkstack__help__chain__deploy-multicall3_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-multicall3 commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-paymaster_commands] )) || -_zkstack__help__chain__deploy-paymaster_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-paymaster commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-upgrader_commands] )) || -_zkstack__help__chain__deploy-upgrader_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-upgrader commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__genesis_commands] )) || -_zkstack__help__chain__genesis_commands() { - local commands; commands=( -'init-database:Initialize databases' \ -'server:Runs server genesis' \ - ) - _describe -t commands 'zkstack help chain genesis commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__genesis__init-database_commands] )) || -_zkstack__help__chain__genesis__init-database_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain genesis init-database commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__genesis__server_commands] )) || -_zkstack__help__chain__genesis__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain genesis server commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__init_commands] )) || -_zkstack__help__chain__init_commands() { - local commands; commands=( -'configs:Initialize chain configs' \ - ) - _describe -t commands 'zkstack help chain init commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__init__configs_commands] )) || -_zkstack__help__chain__init__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain init configs commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__initialize-bridges_commands] )) || -_zkstack__help__chain__initialize-bridges_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain initialize-bridges commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__register-chain_commands] )) || -_zkstack__help__chain__register-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain register-chain commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__server_commands] )) || -_zkstack__help__chain__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain server commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__update-token-multiplier-setter_commands] )) || -_zkstack__help__chain__update-token-multiplier-setter_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain update-token-multiplier-setter commands' commands "$@" -} -(( $+functions[_zkstack__help__containers_commands] )) || -_zkstack__help__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack help containers commands' commands "$@" -} -(( $+functions[_zkstack__help__dev_commands] )) || -_zkstack__help__dev_commands() { - local commands; commands=( -'database:Database related commands' \ -'test:Run tests' \ -'clean:Clean artifacts' \ -'snapshot:Snapshots creator' \ -'lint:Lint code' \ -'fmt:Format code' \ -'prover:Protocol version used by provers' \ -'contracts:Build contracts' \ -'config-writer:Overwrite general config' \ -'send-transactions:Send transactions from file' \ -'status:Get status of the server' \ -'generate-genesis:Generate new genesis file based on current contracts' \ - ) - _describe -t commands 'zkstack help dev commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__clean_commands] )) || -_zkstack__help__dev__clean_commands() { - local commands; commands=( -'all:Remove containers and contracts cache' \ -'containers:Remove containers and docker volumes' \ -'contracts-cache:Remove contracts caches' \ - ) - _describe -t commands 'zkstack help dev clean commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__clean__all_commands] )) || -_zkstack__help__dev__clean__all_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev clean all commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__clean__containers_commands] )) || -_zkstack__help__dev__clean__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev clean containers commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__clean__contracts-cache_commands] )) || -_zkstack__help__dev__clean__contracts-cache_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev clean contracts-cache commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__config-writer_commands] )) || -_zkstack__help__dev__config-writer_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev config-writer commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__contracts_commands] )) || -_zkstack__help__dev__contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev contracts commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database_commands] )) || -_zkstack__help__dev__database_commands() { - local commands; commands=( -'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ -'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ -'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ -'new-migration:Create new migration' \ -'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ -'reset:Reset databases. If no databases are selected, all databases will be reset.' \ -'setup:Setup databases. If no databases are selected, all databases will be setup.' \ - ) - _describe -t commands 'zkstack help dev database commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__check-sqlx-data_commands] )) || -_zkstack__help__dev__database__check-sqlx-data_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database check-sqlx-data commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__drop_commands] )) || -_zkstack__help__dev__database__drop_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database drop commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__migrate_commands] )) || -_zkstack__help__dev__database__migrate_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database migrate commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__new-migration_commands] )) || -_zkstack__help__dev__database__new-migration_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database new-migration commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__prepare_commands] )) || -_zkstack__help__dev__database__prepare_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database prepare commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__reset_commands] )) || -_zkstack__help__dev__database__reset_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database reset commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__setup_commands] )) || -_zkstack__help__dev__database__setup_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database setup commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__fmt_commands] )) || -_zkstack__help__dev__fmt_commands() { - local commands; commands=( -'rustfmt:' \ -'contract:' \ -'prettier:' \ - ) - _describe -t commands 'zkstack help dev fmt commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__fmt__contract_commands] )) || -_zkstack__help__dev__fmt__contract_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev fmt contract commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__fmt__prettier_commands] )) || -_zkstack__help__dev__fmt__prettier_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev fmt prettier commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__fmt__rustfmt_commands] )) || -_zkstack__help__dev__fmt__rustfmt_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev fmt rustfmt commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__generate-genesis_commands] )) || -_zkstack__help__dev__generate-genesis_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev generate-genesis commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__lint_commands] )) || -_zkstack__help__dev__lint_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev lint commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__prover_commands] )) || -_zkstack__help__dev__prover_commands() { - local commands; commands=( -'info:' \ -'insert-batch:' \ -'insert-version:' \ - ) - _describe -t commands 'zkstack help dev prover commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__prover__info_commands] )) || -_zkstack__help__dev__prover__info_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev prover info commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__prover__insert-batch_commands] )) || -_zkstack__help__dev__prover__insert-batch_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev prover insert-batch commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__prover__insert-version_commands] )) || -_zkstack__help__dev__prover__insert-version_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev prover insert-version commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__send-transactions_commands] )) || -_zkstack__help__dev__send-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev send-transactions commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__snapshot_commands] )) || -_zkstack__help__dev__snapshot_commands() { - local commands; commands=( -'create:' \ - ) - _describe -t commands 'zkstack help dev snapshot commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__snapshot__create_commands] )) || -_zkstack__help__dev__snapshot__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev snapshot create commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__status_commands] )) || -_zkstack__help__dev__status_commands() { - local commands; commands=( -'ports:Show used ports' \ - ) - _describe -t commands 'zkstack help dev status commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__status__ports_commands] )) || -_zkstack__help__dev__status__ports_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev status ports commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test_commands] )) || -_zkstack__help__dev__test_commands() { - local commands; commands=( -'integration:Run integration tests' \ -'fees:Run fees test' \ -'revert:Run revert tests' \ -'recovery:Run recovery tests' \ -'upgrade:Run upgrade tests' \ -'build:Build all test dependencies' \ -'rust:Run unit-tests, accepts optional cargo test flags' \ -'l1-contracts:Run L1 contracts tests' \ -'prover:Run prover tests' \ -'wallet:Print test wallets information' \ -'loadtest:Run loadtest' \ - ) - _describe -t commands 'zkstack help dev test commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__build_commands] )) || -_zkstack__help__dev__test__build_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test build commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__fees_commands] )) || -_zkstack__help__dev__test__fees_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test fees commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__integration_commands] )) || -_zkstack__help__dev__test__integration_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test integration commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__l1-contracts_commands] )) || -_zkstack__help__dev__test__l1-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test l1-contracts commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__loadtest_commands] )) || -_zkstack__help__dev__test__loadtest_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test loadtest commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__prover_commands] )) || -_zkstack__help__dev__test__prover_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test prover commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__recovery_commands] )) || -_zkstack__help__dev__test__recovery_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test recovery commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__revert_commands] )) || -_zkstack__help__dev__test__revert_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test revert commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__rust_commands] )) || -_zkstack__help__dev__test__rust_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test rust commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__upgrade_commands] )) || -_zkstack__help__dev__test__upgrade_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test upgrade commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__wallet_commands] )) || -_zkstack__help__dev__test__wallet_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test wallet commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem_commands] )) || -_zkstack__help__ecosystem_commands() { - local commands; commands=( -'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ -'build-transactions:Create transactions to build ecosystem contracts' \ -'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ -'change-default-chain:Change the default chain' \ -'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ - ) - _describe -t commands 'zkstack help ecosystem commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__build-transactions_commands] )) || -_zkstack__help__ecosystem__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__change-default-chain_commands] )) || -_zkstack__help__ecosystem__change-default-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem change-default-chain commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__create_commands] )) || -_zkstack__help__ecosystem__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem create commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__init_commands] )) || -_zkstack__help__ecosystem__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem init commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__setup-observability_commands] )) || -_zkstack__help__ecosystem__setup-observability_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem setup-observability commands' commands "$@" -} -(( $+functions[_zkstack__help__explorer_commands] )) || -_zkstack__help__explorer_commands() { - local commands; commands=( -'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ -'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ -'run:Run explorer app' \ - ) - _describe -t commands 'zkstack help explorer commands' commands "$@" -} -(( $+functions[_zkstack__help__explorer__init_commands] )) || -_zkstack__help__explorer__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help explorer init commands' commands "$@" -} -(( $+functions[_zkstack__help__explorer__run_commands] )) || -_zkstack__help__explorer__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack help explorer run commands' commands "$@" -} -(( $+functions[_zkstack__help__explorer__run-backend_commands] )) || -_zkstack__help__explorer__run-backend_commands() { - local commands; commands=() - _describe -t commands 'zkstack help explorer run-backend commands' commands "$@" -} -(( $+functions[_zkstack__help__external-node_commands] )) || -_zkstack__help__external-node_commands() { - local commands; commands=( -'configs:Prepare configs for EN' \ -'init:Init databases' \ -'run:Run external node' \ - ) - _describe -t commands 'zkstack help external-node commands' commands "$@" -} -(( $+functions[_zkstack__help__external-node__configs_commands] )) || -_zkstack__help__external-node__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack help external-node configs commands' commands "$@" -} -(( $+functions[_zkstack__help__external-node__init_commands] )) || -_zkstack__help__external-node__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help external-node init commands' commands "$@" -} -(( $+functions[_zkstack__help__external-node__run_commands] )) || -_zkstack__help__external-node__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack help external-node run commands' commands "$@" -} -(( $+functions[_zkstack__help__help_commands] )) || -_zkstack__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack help help commands' commands "$@" -} -(( $+functions[_zkstack__help__markdown_commands] )) || -_zkstack__help__markdown_commands() { - local commands; commands=() - _describe -t commands 'zkstack help markdown commands' commands "$@" -} -(( $+functions[_zkstack__help__portal_commands] )) || -_zkstack__help__portal_commands() { - local commands; commands=() - _describe -t commands 'zkstack help portal commands' commands "$@" -} -(( $+functions[_zkstack__help__prover_commands] )) || -_zkstack__help__prover_commands() { - local commands; commands=( -'init:Initialize prover' \ -'setup-keys:Generate setup keys' \ -'run:Run prover' \ -'init-bellman-cuda:Initialize bellman-cuda' \ -'compressor-keys:Download compressor keys' \ - ) - _describe -t commands 'zkstack help prover commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__compressor-keys_commands] )) || -_zkstack__help__prover__compressor-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover compressor-keys commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__init_commands] )) || -_zkstack__help__prover__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover init commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__init-bellman-cuda_commands] )) || -_zkstack__help__prover__init-bellman-cuda_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover init-bellman-cuda commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__run_commands] )) || -_zkstack__help__prover__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover run commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__setup-keys_commands] )) || -_zkstack__help__prover__setup-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover setup-keys commands' commands "$@" -} -(( $+functions[_zkstack__help__update_commands] )) || -_zkstack__help__update_commands() { - local commands; commands=() - _describe -t commands 'zkstack help update commands' commands "$@" -} -(( $+functions[_zkstack__markdown_commands] )) || -_zkstack__markdown_commands() { - local commands; commands=() - _describe -t commands 'zkstack markdown commands' commands "$@" -} -(( $+functions[_zkstack__portal_commands] )) || -_zkstack__portal_commands() { - local commands; commands=() - _describe -t commands 'zkstack portal commands' commands "$@" -} -(( $+functions[_zkstack__prover_commands] )) || -_zkstack__prover_commands() { - local commands; commands=( -'init:Initialize prover' \ -'setup-keys:Generate setup keys' \ -'run:Run prover' \ -'init-bellman-cuda:Initialize bellman-cuda' \ -'compressor-keys:Download compressor keys' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack prover commands' commands "$@" -} -(( $+functions[_zkstack__prover__compressor-keys_commands] )) || -_zkstack__prover__compressor-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover compressor-keys commands' commands "$@" -} -(( $+functions[_zkstack__prover__help_commands] )) || -_zkstack__prover__help_commands() { - local commands; commands=( -'init:Initialize prover' \ -'setup-keys:Generate setup keys' \ -'run:Run prover' \ -'init-bellman-cuda:Initialize bellman-cuda' \ -'compressor-keys:Download compressor keys' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack prover help commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__compressor-keys_commands] )) || -_zkstack__prover__help__compressor-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help compressor-keys commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__help_commands] )) || -_zkstack__prover__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help help commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__init_commands] )) || -_zkstack__prover__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help init commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__init-bellman-cuda_commands] )) || -_zkstack__prover__help__init-bellman-cuda_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help init-bellman-cuda commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__run_commands] )) || -_zkstack__prover__help__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help run commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__setup-keys_commands] )) || -_zkstack__prover__help__setup-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help setup-keys commands' commands "$@" -} -(( $+functions[_zkstack__prover__init_commands] )) || -_zkstack__prover__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover init commands' commands "$@" -} -(( $+functions[_zkstack__prover__init-bellman-cuda_commands] )) || -_zkstack__prover__init-bellman-cuda_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover init-bellman-cuda commands' commands "$@" -} -(( $+functions[_zkstack__prover__run_commands] )) || -_zkstack__prover__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover run commands' commands "$@" -} -(( $+functions[_zkstack__prover__setup-keys_commands] )) || -_zkstack__prover__setup-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover setup-keys commands' commands "$@" -} -(( $+functions[_zkstack__update_commands] )) || -_zkstack__update_commands() { - local commands; commands=() - _describe -t commands 'zkstack update commands' commands "$@" -} - -if [ "$funcstack[1]" = "_zkstack" ]; then - _zkstack "$@" -else - compdef _zkstack zkstack -fi diff --git a/zkstack_cli/_zkstack.zsh b/zkstack_cli/_zkstack.zsh deleted file mode 100644 index ba9feb654106..000000000000 --- a/zkstack_cli/_zkstack.zsh +++ /dev/null @@ -1,5092 +0,0 @@ -#compdef zkstack - -autoload -U is-at-least - -_zkstack() { - typeset -A opt_args - typeset -a _arguments_options - local ret=1 - - if is-at-least 5.2; then - _arguments_options=(-s -S -C) - else - _arguments_options=(-s -C) - fi - - local context curcontext="$curcontext" state line - _arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -'-V[Print version]' \ -'--version[Print version]' \ -":: :_zkstack_commands" \ -"*::: :->zkstack" \ -&& ret=0 - case $state in - (zkstack) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-command-$line[1]:" - case $line[1] in - (autocomplete) -_arguments "${_arguments_options[@]}" : \ -'--generate=[The shell to generate the autocomplete script for]:GENERATOR:(bash elvish fish powershell zsh)' \ -'-o+[The out directory to write the autocomplete script to]:OUT:_files' \ -'--out=[The out directory to write the autocomplete script to]:OUT:_files' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(ecosystem) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__ecosystem_commands" \ -"*::: :->ecosystem" \ -&& ret=0 - - case $state in - (ecosystem) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-ecosystem-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -'--ecosystem-name=[]:ECOSYSTEM_NAME:_default' \ -'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ -'--link-to-code=[Code link]:LINK_TO_CODE:_files -/' \ -'--chain-name=[]:CHAIN_NAME:_default' \ -'--chain-id=[Chain ID]:CHAIN_ID:_default' \ -'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ -'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" -random\:"Generate random wallets" -empty\:"Generate placeholder wallets" -in-file\:"Specify file with wallets"))' \ -'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ -'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ -'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ -'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ -'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ -'--set-as-default=[Set as default chain]' \ -'--evm-emulator=[Enable EVM emulator]' \ -'--start-containers=[Start reth and postgres containers after creation]' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--legacy-bridge[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -'--sender=[Address of the transaction sender]:SENDER:_default' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'-o+[Output directory for the generated files]:OUT:_files' \ -'--out=[Output directory for the generated files]:OUT:_files' \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'--deploy-erc20=[Deploy ERC20 contracts]' \ -'--deploy-ecosystem=[Deploy ecosystem contracts]' \ -'--ecosystem-contracts-path=[Path to ecosystem contracts]:ECOSYSTEM_CONTRACTS_PATH:_files' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--deploy-paymaster=[Deploy Paymaster contract]' \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'-o+[Enable Grafana]' \ -'--observability=[Enable Grafana]' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-d[]' \ -'--dont-drop[]' \ -'--ecosystem-only[Initialize ecosystem only and skip chain initialization (chain can be initialized later with \`chain init\` subcommand)]' \ -'--dev[Use defaults for all options and flags. Suitable for local development]' \ -'--no-port-reallocation[Do not reallocate ports]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(change-default-chain) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -'::name:_default' \ -&& ret=0 -;; -(setup-observability) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__ecosystem__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-ecosystem-help-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(change-default-chain) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup-observability) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(chain) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__chain_commands" \ -"*::: :->chain" \ -&& ret=0 - - case $state in - (chain) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -'--chain-name=[]:CHAIN_NAME:_default' \ -'--chain-id=[Chain ID]:CHAIN_ID:_default' \ -'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ -'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" -random\:"Generate random wallets" -empty\:"Generate placeholder wallets" -in-file\:"Specify file with wallets"))' \ -'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ -'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ -'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ -'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ -'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ -'--set-as-default=[Set as default chain]' \ -'--evm-emulator=[Enable EVM emulator]' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--legacy-bridge[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -'-o+[Output directory for the generated files]:OUT:_files' \ -'--out=[Output directory for the generated files]:OUT:_files' \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'--deploy-paymaster=[]' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-d[]' \ -'--dont-drop[]' \ -'--no-port-reallocation[Do not reallocate ports]' \ -'--dev[Use defaults for all options and flags. Suitable for local development]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -":: :_zkstack__chain__init_commands" \ -"*::: :->init" \ -&& ret=0 - - case $state in - (init) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-init-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-d[Use default database urls and names]' \ -'--dev[Use default database urls and names]' \ -'-d[]' \ -'--dont-drop[]' \ -'--no-port-reallocation[Do not reallocate ports]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__init__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-init-help-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(genesis) -_arguments "${_arguments_options[@]}" : \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-d[Use default database urls and names]' \ -'--dev[Use default database urls and names]' \ -'-d[]' \ -'--dont-drop[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__chain__genesis_commands" \ -"*::: :->genesis" \ -&& ret=0 - - case $state in - (genesis) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-genesis-command-$line[1]:" - case $line[1] in - (init-database) -_arguments "${_arguments_options[@]}" : \ -'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ -'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-d[Use default database urls and names]' \ -'--dev[Use default database urls and names]' \ -'-d[]' \ -'--dont-drop[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__genesis__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-genesis-help-command-$line[1]:" - case $line[1] in - (init-database) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(register-chain) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-l2-contracts) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(accept-chain-ownership) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(initialize-bridges) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-consensus-registry) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-multicall3) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-upgrader) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(deploy-paymaster) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(update-token-multiplier-setter) -_arguments "${_arguments_options[@]}" : \ -'--verify=[Verify deployed contracts]' \ -'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ -'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ -'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ -'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--resume[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help (see more with '\''--help'\'')]' \ -'--help[Print help (see more with '\''--help'\'')]' \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -'*--components=[Components of server to run]:COMPONENTS:_default' \ -'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--genesis[Run server in genesis mode]' \ -'--build[Build server but don'\''t run it]' \ -'--uring[Enables uring support for RocksDB]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(contract-verifier) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__chain__contract-verifier_commands" \ -"*::: :->contract-verifier" \ -&& ret=0 - - case $state in - (contract-verifier) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'--zksolc-version=[Version of zksolc to install]:ZKSOLC_VERSION:_default' \ -'--zkvyper-version=[Version of zkvyper to install]:ZKVYPER_VERSION:_default' \ -'--solc-version=[Version of solc to install]:SOLC_VERSION:_default' \ -'--era-vm-solc-version=[Version of era vm solc to install]:ERA_VM_SOLC_VERSION:_default' \ -'--vyper-version=[Version of vyper to install]:VYPER_VERSION:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--only[Install only provided compilers]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__contract-verifier__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-help-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(consensus) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__chain__consensus_commands" \ -"*::: :->consensus" \ -&& ret=0 - - case $state in - (consensus) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-consensus-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -'--from-file=[Sets the attester committee in the consensus registry contract to the committee in the yaml file. File format is definied in \`commands/consensus/proto/mod.proto\`]:FROM_FILE:_files' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--from-genesis[Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__consensus__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-consensus-help-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help__init_commands" \ -"*::: :->init" \ -&& ret=0 - - case $state in - (init) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-init-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(genesis) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help__genesis_commands" \ -"*::: :->genesis" \ -&& ret=0 - - case $state in - (genesis) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-genesis-command-$line[1]:" - case $line[1] in - (init-database) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(register-chain) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-l2-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(accept-chain-ownership) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(initialize-bridges) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-consensus-registry) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-multicall3) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-upgrader) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-paymaster) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(update-token-multiplier-setter) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract-verifier) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help__contract-verifier_commands" \ -"*::: :->contract-verifier" \ -&& ret=0 - - case $state in - (contract-verifier) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-contract-verifier-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(consensus) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__chain__help__consensus_commands" \ -"*::: :->consensus" \ -&& ret=0 - - case $state in - (consensus) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-chain-help-consensus-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(dev) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev_commands" \ -"*::: :->dev" \ -&& ret=0 - - case $state in - (dev) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-command-$line[1]:" - case $line[1] in - (database) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__database_commands" \ -"*::: :->database" \ -&& ret=0 - - case $state in - (database) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-database-command-$line[1]:" - case $line[1] in - (check-sqlx-data) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(new-migration) -_arguments "${_arguments_options[@]}" : \ -'--database=[Database to create new migration for]:DATABASE:(prover core)' \ -'--name=[Migration name]:NAME:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -'-p+[Prover database]' \ -'--prover=[Prover database]' \ -'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ -'-c+[Core database]' \ -'--core=[Core database]' \ -'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__database__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-database-help-command-$line[1]:" - case $line[1] in - (check-sqlx-data) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(new-migration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(test) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__test_commands" \ -"*::: :->test" \ -&& ret=0 - - case $state in - (test) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-test-command-$line[1]:" - case $line[1] in - (integration) -_arguments "${_arguments_options[@]}" : \ -'-t+[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ -'--test-pattern=[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-e[Run tests for external node]' \ -'--external-node[Run tests for external node]' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(fees) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'--no-kill[The test will not kill all the nodes during execution]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--enable-consensus[Enable consensus]' \ -'-e[Run tests for external node]' \ -'--external-node[Run tests for external node]' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'--no-kill[The test will not kill all the nodes during execution]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(recovery) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-s[Run recovery from a snapshot instead of genesis]' \ -'--snapshot[Run recovery from a snapshot instead of genesis]' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'--no-kill[The test will not kill all the nodes during execution]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-n[Do not install or build dependencies]' \ -'--no-deps[Do not install or build dependencies]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(build) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(rust) -_arguments "${_arguments_options[@]}" : \ -'--options=[Cargo test flags]:OPTIONS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(l1-contracts) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(wallet) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(loadtest) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__test__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-test-help-command-$line[1]:" - case $line[1] in - (integration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fees) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(recovery) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(rust) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(l1-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(wallet) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(loadtest) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(clean) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__clean_commands" \ -"*::: :->clean" \ -&& ret=0 - - case $state in - (clean) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-clean-command-$line[1]:" - case $line[1] in - (all) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(contracts-cache) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__clean__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-clean-help-command-$line[1]:" - case $line[1] in - (all) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contracts-cache) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(snapshot) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__snapshot_commands" \ -"*::: :->snapshot" \ -&& ret=0 - - case $state in - (snapshot) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__snapshot__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-help-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(lint) -_arguments "${_arguments_options[@]}" : \ -'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ -'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-c[]' \ -'--check[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(fmt) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-c[]' \ -'--check[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__fmt_commands" \ -"*::: :->fmt" \ -&& ret=0 - - case $state in - (fmt) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-fmt-command-$line[1]:" - case $line[1] in - (rustfmt) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(contract) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(prettier) -_arguments "${_arguments_options[@]}" : \ -'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ -'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion)' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__fmt__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-fmt-help-command-$line[1]:" - case $line[1] in - (rustfmt) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prettier) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-prover-command-$line[1]:" - case $line[1] in - (info) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(insert-batch) -_arguments "${_arguments_options[@]}" : \ -'--number=[]:NUMBER:_default' \ -'--version=[]:VERSION:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--default[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(insert-version) -_arguments "${_arguments_options[@]}" : \ -'--version=[]:VERSION:_default' \ -'--snark-wrapper=[]:SNARK_WRAPPER:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--default[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__prover__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-prover-help-command-$line[1]:" - case $line[1] in - (info) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-batch) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-version) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(contracts) -_arguments "${_arguments_options[@]}" : \ -'--l1-contracts=[Build L1 contracts]' \ -'--l2-contracts=[Build L2 contracts]' \ -'--system-contracts=[Build system contracts]' \ -'--test-contracts=[Build test contracts]' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(config-writer) -_arguments "${_arguments_options[@]}" : \ -'-p+[Path to the config file to override]:PATH:_default' \ -'--path=[Path to the config file to override]:PATH:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(send-transactions) -_arguments "${_arguments_options[@]}" : \ -'--file=[]:FILE:_files' \ -'--private-key=[]:PRIVATE_KEY:_default' \ -'--l1-rpc-url=[]:L1_RPC_URL:_default' \ -'--confirmations=[]:CONFIRMATIONS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(status) -_arguments "${_arguments_options[@]}" : \ -'-u+[URL of the health check endpoint]:URL:_default' \ -'--url=[URL of the health check endpoint]:URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__dev__status_commands" \ -"*::: :->status" \ -&& ret=0 - - case $state in - (status) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-status-command-$line[1]:" - case $line[1] in - (ports) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__status__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-status-help-command-$line[1]:" - case $line[1] in - (ports) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(generate-genesis) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-command-$line[1]:" - case $line[1] in - (database) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__database_commands" \ -"*::: :->database" \ -&& ret=0 - - case $state in - (database) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-database-command-$line[1]:" - case $line[1] in - (check-sqlx-data) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(new-migration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(test) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__test_commands" \ -"*::: :->test" \ -&& ret=0 - - case $state in - (test) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-test-command-$line[1]:" - case $line[1] in - (integration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fees) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(recovery) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(rust) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(l1-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(wallet) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(loadtest) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(clean) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__clean_commands" \ -"*::: :->clean" \ -&& ret=0 - - case $state in - (clean) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-clean-command-$line[1]:" - case $line[1] in - (all) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contracts-cache) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(snapshot) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__snapshot_commands" \ -"*::: :->snapshot" \ -&& ret=0 - - case $state in - (snapshot) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-snapshot-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(lint) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fmt) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__fmt_commands" \ -"*::: :->fmt" \ -&& ret=0 - - case $state in - (fmt) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-fmt-command-$line[1]:" - case $line[1] in - (rustfmt) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prettier) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-prover-command-$line[1]:" - case $line[1] in - (info) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-batch) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-version) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(config-writer) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(send-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(status) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__dev__help__status_commands" \ -"*::: :->status" \ -&& ret=0 - - case $state in - (status) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-dev-help-status-command-$line[1]:" - case $line[1] in - (ports) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(generate-genesis) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-prover-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -'--proof-store-dir=[]:PROOF_STORE_DIR:_default' \ -'--bucket-base-url=[]:BUCKET_BASE_URL:_default' \ -'--credentials-file=[]:CREDENTIALS_FILE:_default' \ -'--bucket-name=[]:BUCKET_NAME:_default' \ -'--location=[]:LOCATION:_default' \ -'--project-id=[]:PROJECT_ID:_default' \ -'--shall-save-to-public-bucket=[]:SHALL_SAVE_TO_PUBLIC_BUCKET:(true false)' \ -'--public-store-dir=[]:PUBLIC_STORE_DIR:_default' \ -'--public-bucket-base-url=[]:PUBLIC_BUCKET_BASE_URL:_default' \ -'--public-credentials-file=[]:PUBLIC_CREDENTIALS_FILE:_default' \ -'--public-bucket-name=[]:PUBLIC_BUCKET_NAME:_default' \ -'--public-location=[]:PUBLIC_LOCATION:_default' \ -'--public-project-id=[]:PUBLIC_PROJECT_ID:_default' \ -'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ -'--bellman-cuda=[]' \ -'--setup-compressor-key=[]' \ -'--path=[]:PATH:_default' \ -'--region=[]:REGION:(us europe asia)' \ -'--mode=[]:MODE:(download generate)' \ -'--setup-keys=[]' \ -'--setup-database=[]:SETUP_DATABASE:(true false)' \ -'--prover-db-url=[Prover database url without database name]:PROVER_DB_URL:_default' \ -'--prover-db-name=[Prover database name]:PROVER_DB_NAME:_default' \ -'-u+[Use default database urls and names]:USE_DEFAULT:(true false)' \ -'--use-default=[Use default database urls and names]:USE_DEFAULT:(true false)' \ -'-d+[]:DONT_DROP:(true false)' \ -'--dont-drop=[]:DONT_DROP:(true false)' \ -'--cloud-type=[]:CLOUD_TYPE:(gcp local)' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--dev[]' \ -'(--bellman-cuda-dir)--clone[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(setup-keys) -_arguments "${_arguments_options[@]}" : \ -'--region=[]:REGION:(us europe asia)' \ -'--mode=[]:MODE:(download generate)' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -'--component=[]:COMPONENT:(gateway witness-generator witness-vector-generator prover circuit-prover compressor prover-job-monitor)' \ -'--round=[]:ROUND:(all-rounds basic-circuits leaf-aggregation node-aggregation recursion-tip scheduler)' \ -'--threads=[]:THREADS:_default' \ -'--max-allocation=[Memory allocation limit in bytes (for prover component)]:MAX_ALLOCATION:_default' \ -'--witness-vector-generator-count=[]:WITNESS_VECTOR_GENERATOR_COUNT:_default' \ -'--max-allocation=[]:MAX_ALLOCATION:_default' \ -'--docker=[]:DOCKER:(true false)' \ -'--tag=[]:TAG:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(init-bellman-cuda) -_arguments "${_arguments_options[@]}" : \ -'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'(--bellman-cuda-dir)--clone[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(compressor-keys) -_arguments "${_arguments_options[@]}" : \ -'--path=[]:PATH:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__prover__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-prover-help-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup-keys) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init-bellman-cuda) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(compressor-keys) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(external-node) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__external-node_commands" \ -"*::: :->external-node" \ -&& ret=0 - - case $state in - (external-node) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-external-node-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -'--db-url=[]:DB_URL:_default' \ -'--db-name=[]:DB_NAME:_default' \ -'--l1-rpc-url=[]:L1_RPC_URL:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-u[Use default database urls and names]' \ -'--use-default[Use default database urls and names]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -'*--components=[Components of server to run]:COMPONENTS:_default' \ -'--enable-consensus=[Enable consensus]' \ -'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'--reinit[]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__external-node__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-external-node-help-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -'-o+[Enable Grafana]' \ -'--observability=[Enable Grafana]' \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(portal) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(explorer) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -":: :_zkstack__explorer_commands" \ -"*::: :->explorer" \ -&& ret=0 - - case $state in - (explorer) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-explorer-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(run-backend) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__explorer__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-explorer-help-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run-backend) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(update) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-c[Update only the config files]' \ -'--only-config[Update only the config files]' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(markdown) -_arguments "${_arguments_options[@]}" : \ -'--chain=[Chain to use]:CHAIN:_default' \ -'-v[Verbose mode]' \ -'--verbose[Verbose mode]' \ -'--ignore-prerequisites[Ignores prerequisites checks]' \ -'-h[Print help]' \ -'--help[Print help]' \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help_commands" \ -"*::: :->help" \ -&& ret=0 - - case $state in - (help) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-command-$line[1]:" - case $line[1] in - (autocomplete) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(ecosystem) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__ecosystem_commands" \ -"*::: :->ecosystem" \ -&& ret=0 - - case $state in - (ecosystem) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-ecosystem-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(change-default-chain) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup-observability) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(chain) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain_commands" \ -"*::: :->chain" \ -&& ret=0 - - case $state in - (chain) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain__init_commands" \ -"*::: :->init" \ -&& ret=0 - - case $state in - (init) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-init-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(genesis) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain__genesis_commands" \ -"*::: :->genesis" \ -&& ret=0 - - case $state in - (genesis) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-genesis-command-$line[1]:" - case $line[1] in - (init-database) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(register-chain) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-l2-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(accept-chain-ownership) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(initialize-bridges) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-consensus-registry) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-multicall3) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-upgrader) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(deploy-paymaster) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(update-token-multiplier-setter) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(server) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract-verifier) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain__contract-verifier_commands" \ -"*::: :->contract-verifier" \ -&& ret=0 - - case $state in - (contract-verifier) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-contract-verifier-command-$line[1]:" - case $line[1] in - (run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(consensus) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__chain__consensus_commands" \ -"*::: :->consensus" \ -&& ret=0 - - case $state in - (consensus) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-chain-consensus-command-$line[1]:" - case $line[1] in - (set-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(get-attester-committee) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -;; -(dev) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev_commands" \ -"*::: :->dev" \ -&& ret=0 - - case $state in - (dev) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-command-$line[1]:" - case $line[1] in - (database) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__database_commands" \ -"*::: :->database" \ -&& ret=0 - - case $state in - (database) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-database-command-$line[1]:" - case $line[1] in - (check-sqlx-data) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(drop) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(migrate) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(new-migration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prepare) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(reset) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(test) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__test_commands" \ -"*::: :->test" \ -&& ret=0 - - case $state in - (test) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-test-command-$line[1]:" - case $line[1] in - (integration) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fees) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(revert) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(recovery) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(upgrade) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(build) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(rust) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(l1-contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(wallet) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(loadtest) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(clean) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__clean_commands" \ -"*::: :->clean" \ -&& ret=0 - - case $state in - (clean) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-clean-command-$line[1]:" - case $line[1] in - (all) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contracts-cache) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(snapshot) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__snapshot_commands" \ -"*::: :->snapshot" \ -&& ret=0 - - case $state in - (snapshot) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-snapshot-command-$line[1]:" - case $line[1] in - (create) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(lint) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(fmt) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__fmt_commands" \ -"*::: :->fmt" \ -&& ret=0 - - case $state in - (fmt) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-fmt-command-$line[1]:" - case $line[1] in - (rustfmt) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(contract) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(prettier) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-prover-command-$line[1]:" - case $line[1] in - (info) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-batch) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(insert-version) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(contracts) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(config-writer) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(send-transactions) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(status) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__dev__status_commands" \ -"*::: :->status" \ -&& ret=0 - - case $state in - (status) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-dev-status-command-$line[1]:" - case $line[1] in - (ports) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(generate-genesis) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(prover) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__prover_commands" \ -"*::: :->prover" \ -&& ret=0 - - case $state in - (prover) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-prover-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(setup-keys) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init-bellman-cuda) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(compressor-keys) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(external-node) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__external-node_commands" \ -"*::: :->external-node" \ -&& ret=0 - - case $state in - (external-node) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-external-node-command-$line[1]:" - case $line[1] in - (configs) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(containers) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(portal) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(explorer) -_arguments "${_arguments_options[@]}" : \ -":: :_zkstack__help__explorer_commands" \ -"*::: :->explorer" \ -&& ret=0 - - case $state in - (explorer) - words=($line[1] "${words[@]}") - (( CURRENT += 1 )) - curcontext="${curcontext%:*:*}:zkstack-help-explorer-command-$line[1]:" - case $line[1] in - (init) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run-backend) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(run) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; -(update) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(markdown) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; -(help) -_arguments "${_arguments_options[@]}" : \ -&& ret=0 -;; - esac - ;; -esac -;; - esac - ;; -esac -} - -(( $+functions[_zkstack_commands] )) || -_zkstack_commands() { - local commands; commands=( -'autocomplete:Create shell autocompletion files' \ -'ecosystem:Ecosystem related commands' \ -'chain:Chain related commands' \ -'dev:Supervisor related commands' \ -'prover:Prover related commands' \ -'external-node:External Node related commands' \ -'containers:Run containers for local development' \ -'portal:Run dapp-portal' \ -'explorer:Run block-explorer' \ -'update:Update ZKsync' \ -'markdown:Print markdown help' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack commands' commands "$@" -} -(( $+functions[_zkstack__autocomplete_commands] )) || -_zkstack__autocomplete_commands() { - local commands; commands=() - _describe -t commands 'zkstack autocomplete commands' commands "$@" -} -(( $+functions[_zkstack__chain_commands] )) || -_zkstack__chain_commands() { - local commands; commands=( -'create:Create a new chain, setting the necessary configurations for later initialization' \ -'build-transactions:Create unsigned transactions for chain deployment' \ -'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ -'genesis:Run server genesis' \ -'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ -'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ -'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ -'initialize-bridges:Initialize bridges on L2' \ -'deploy-consensus-registry:Deploy L2 consensus registry' \ -'deploy-multicall3:Deploy L2 multicall3' \ -'deploy-upgrader:Deploy Default Upgrader' \ -'deploy-paymaster:Deploy paymaster smart contract' \ -'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ -'server:Run server' \ -'contract-verifier:Run contract verifier' \ -'consensus:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain commands' commands "$@" -} -(( $+functions[_zkstack__chain__accept-chain-ownership_commands] )) || -_zkstack__chain__accept-chain-ownership_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain accept-chain-ownership commands' commands "$@" -} -(( $+functions[_zkstack__chain__build-transactions_commands] )) || -_zkstack__chain__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus_commands] )) || -_zkstack__chain__consensus_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain consensus commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__get-attester-committee_commands] )) || -_zkstack__chain__consensus__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__help_commands] )) || -_zkstack__chain__consensus__help_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain consensus help commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__help__get-attester-committee_commands] )) || -_zkstack__chain__consensus__help__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus help get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__help__help_commands] )) || -_zkstack__chain__consensus__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__help__set-attester-committee_commands] )) || -_zkstack__chain__consensus__help__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus help set-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__consensus__set-attester-committee_commands] )) || -_zkstack__chain__consensus__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain consensus set-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier_commands] )) || -_zkstack__chain__contract-verifier_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain contract-verifier commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__help_commands] )) || -_zkstack__chain__contract-verifier__help_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain contract-verifier help commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__help__help_commands] )) || -_zkstack__chain__contract-verifier__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__help__init_commands] )) || -_zkstack__chain__contract-verifier__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier help init commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__help__run_commands] )) || -_zkstack__chain__contract-verifier__help__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier help run commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__init_commands] )) || -_zkstack__chain__contract-verifier__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier init commands' commands "$@" -} -(( $+functions[_zkstack__chain__contract-verifier__run_commands] )) || -_zkstack__chain__contract-verifier__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain contract-verifier run commands' commands "$@" -} -(( $+functions[_zkstack__chain__create_commands] )) || -_zkstack__chain__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain create commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-consensus-registry_commands] )) || -_zkstack__chain__deploy-consensus-registry_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-consensus-registry commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-l2-contracts_commands] )) || -_zkstack__chain__deploy-l2-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-l2-contracts commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-multicall3_commands] )) || -_zkstack__chain__deploy-multicall3_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-multicall3 commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-paymaster_commands] )) || -_zkstack__chain__deploy-paymaster_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-paymaster commands' commands "$@" -} -(( $+functions[_zkstack__chain__deploy-upgrader_commands] )) || -_zkstack__chain__deploy-upgrader_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain deploy-upgrader commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis_commands] )) || -_zkstack__chain__genesis_commands() { - local commands; commands=( -'init-database:Initialize databases' \ -'server:Runs server genesis' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain genesis commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__help_commands] )) || -_zkstack__chain__genesis__help_commands() { - local commands; commands=( -'init-database:Initialize databases' \ -'server:Runs server genesis' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain genesis help commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__help__help_commands] )) || -_zkstack__chain__genesis__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__help__init-database_commands] )) || -_zkstack__chain__genesis__help__init-database_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis help init-database commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__help__server_commands] )) || -_zkstack__chain__genesis__help__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis help server commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__init-database_commands] )) || -_zkstack__chain__genesis__init-database_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis init-database commands' commands "$@" -} -(( $+functions[_zkstack__chain__genesis__server_commands] )) || -_zkstack__chain__genesis__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain genesis server commands' commands "$@" -} -(( $+functions[_zkstack__chain__help_commands] )) || -_zkstack__chain__help_commands() { - local commands; commands=( -'create:Create a new chain, setting the necessary configurations for later initialization' \ -'build-transactions:Create unsigned transactions for chain deployment' \ -'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ -'genesis:Run server genesis' \ -'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ -'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ -'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ -'initialize-bridges:Initialize bridges on L2' \ -'deploy-consensus-registry:Deploy L2 consensus registry' \ -'deploy-multicall3:Deploy L2 multicall3' \ -'deploy-upgrader:Deploy Default Upgrader' \ -'deploy-paymaster:Deploy paymaster smart contract' \ -'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ -'server:Run server' \ -'contract-verifier:Run contract verifier' \ -'consensus:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain help commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__accept-chain-ownership_commands] )) || -_zkstack__chain__help__accept-chain-ownership_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help accept-chain-ownership commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__build-transactions_commands] )) || -_zkstack__chain__help__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__consensus_commands] )) || -_zkstack__chain__help__consensus_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ - ) - _describe -t commands 'zkstack chain help consensus commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__consensus__get-attester-committee_commands] )) || -_zkstack__chain__help__consensus__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help consensus get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__consensus__set-attester-committee_commands] )) || -_zkstack__chain__help__consensus__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help consensus set-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__contract-verifier_commands] )) || -_zkstack__chain__help__contract-verifier_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ - ) - _describe -t commands 'zkstack chain help contract-verifier commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__contract-verifier__init_commands] )) || -_zkstack__chain__help__contract-verifier__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help contract-verifier init commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__contract-verifier__run_commands] )) || -_zkstack__chain__help__contract-verifier__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help contract-verifier run commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__create_commands] )) || -_zkstack__chain__help__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help create commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-consensus-registry_commands] )) || -_zkstack__chain__help__deploy-consensus-registry_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-consensus-registry commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-l2-contracts_commands] )) || -_zkstack__chain__help__deploy-l2-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-l2-contracts commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-multicall3_commands] )) || -_zkstack__chain__help__deploy-multicall3_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-multicall3 commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-paymaster_commands] )) || -_zkstack__chain__help__deploy-paymaster_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-paymaster commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__deploy-upgrader_commands] )) || -_zkstack__chain__help__deploy-upgrader_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help deploy-upgrader commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__genesis_commands] )) || -_zkstack__chain__help__genesis_commands() { - local commands; commands=( -'init-database:Initialize databases' \ -'server:Runs server genesis' \ - ) - _describe -t commands 'zkstack chain help genesis commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__genesis__init-database_commands] )) || -_zkstack__chain__help__genesis__init-database_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help genesis init-database commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__genesis__server_commands] )) || -_zkstack__chain__help__genesis__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help genesis server commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__help_commands] )) || -_zkstack__chain__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__init_commands] )) || -_zkstack__chain__help__init_commands() { - local commands; commands=( -'configs:Initialize chain configs' \ - ) - _describe -t commands 'zkstack chain help init commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__init__configs_commands] )) || -_zkstack__chain__help__init__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help init configs commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__initialize-bridges_commands] )) || -_zkstack__chain__help__initialize-bridges_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help initialize-bridges commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__register-chain_commands] )) || -_zkstack__chain__help__register-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help register-chain commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__server_commands] )) || -_zkstack__chain__help__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help server commands' commands "$@" -} -(( $+functions[_zkstack__chain__help__update-token-multiplier-setter_commands] )) || -_zkstack__chain__help__update-token-multiplier-setter_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain help update-token-multiplier-setter commands' commands "$@" -} -(( $+functions[_zkstack__chain__init_commands] )) || -_zkstack__chain__init_commands() { - local commands; commands=( -'configs:Initialize chain configs' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain init commands' commands "$@" -} -(( $+functions[_zkstack__chain__init__configs_commands] )) || -_zkstack__chain__init__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain init configs commands' commands "$@" -} -(( $+functions[_zkstack__chain__init__help_commands] )) || -_zkstack__chain__init__help_commands() { - local commands; commands=( -'configs:Initialize chain configs' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack chain init help commands' commands "$@" -} -(( $+functions[_zkstack__chain__init__help__configs_commands] )) || -_zkstack__chain__init__help__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain init help configs commands' commands "$@" -} -(( $+functions[_zkstack__chain__init__help__help_commands] )) || -_zkstack__chain__init__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain init help help commands' commands "$@" -} -(( $+functions[_zkstack__chain__initialize-bridges_commands] )) || -_zkstack__chain__initialize-bridges_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain initialize-bridges commands' commands "$@" -} -(( $+functions[_zkstack__chain__register-chain_commands] )) || -_zkstack__chain__register-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain register-chain commands' commands "$@" -} -(( $+functions[_zkstack__chain__server_commands] )) || -_zkstack__chain__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain server commands' commands "$@" -} -(( $+functions[_zkstack__chain__update-token-multiplier-setter_commands] )) || -_zkstack__chain__update-token-multiplier-setter_commands() { - local commands; commands=() - _describe -t commands 'zkstack chain update-token-multiplier-setter commands' commands "$@" -} -(( $+functions[_zkstack__containers_commands] )) || -_zkstack__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack containers commands' commands "$@" -} -(( $+functions[_zkstack__dev_commands] )) || -_zkstack__dev_commands() { - local commands; commands=( -'database:Database related commands' \ -'test:Run tests' \ -'clean:Clean artifacts' \ -'snapshot:Snapshots creator' \ -'lint:Lint code' \ -'fmt:Format code' \ -'prover:Protocol version used by provers' \ -'contracts:Build contracts' \ -'config-writer:Overwrite general config' \ -'send-transactions:Send transactions from file' \ -'status:Get status of the server' \ -'generate-genesis:Generate new genesis file based on current contracts' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean_commands] )) || -_zkstack__dev__clean_commands() { - local commands; commands=( -'all:Remove containers and contracts cache' \ -'containers:Remove containers and docker volumes' \ -'contracts-cache:Remove contracts caches' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev clean commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__all_commands] )) || -_zkstack__dev__clean__all_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean all commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__containers_commands] )) || -_zkstack__dev__clean__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean containers commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__contracts-cache_commands] )) || -_zkstack__dev__clean__contracts-cache_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean contracts-cache commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help_commands] )) || -_zkstack__dev__clean__help_commands() { - local commands; commands=( -'all:Remove containers and contracts cache' \ -'containers:Remove containers and docker volumes' \ -'contracts-cache:Remove contracts caches' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev clean help commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help__all_commands] )) || -_zkstack__dev__clean__help__all_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean help all commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help__containers_commands] )) || -_zkstack__dev__clean__help__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean help containers commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help__contracts-cache_commands] )) || -_zkstack__dev__clean__help__contracts-cache_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean help contracts-cache commands' commands "$@" -} -(( $+functions[_zkstack__dev__clean__help__help_commands] )) || -_zkstack__dev__clean__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev clean help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__config-writer_commands] )) || -_zkstack__dev__config-writer_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev config-writer commands' commands "$@" -} -(( $+functions[_zkstack__dev__contracts_commands] )) || -_zkstack__dev__contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__database_commands] )) || -_zkstack__dev__database_commands() { - local commands; commands=( -'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ -'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ -'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ -'new-migration:Create new migration' \ -'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ -'reset:Reset databases. If no databases are selected, all databases will be reset.' \ -'setup:Setup databases. If no databases are selected, all databases will be setup.' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev database commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__check-sqlx-data_commands] )) || -_zkstack__dev__database__check-sqlx-data_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database check-sqlx-data commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__drop_commands] )) || -_zkstack__dev__database__drop_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database drop commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help_commands] )) || -_zkstack__dev__database__help_commands() { - local commands; commands=( -'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ -'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ -'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ -'new-migration:Create new migration' \ -'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ -'reset:Reset databases. If no databases are selected, all databases will be reset.' \ -'setup:Setup databases. If no databases are selected, all databases will be setup.' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev database help commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__check-sqlx-data_commands] )) || -_zkstack__dev__database__help__check-sqlx-data_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help check-sqlx-data commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__drop_commands] )) || -_zkstack__dev__database__help__drop_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help drop commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__help_commands] )) || -_zkstack__dev__database__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__migrate_commands] )) || -_zkstack__dev__database__help__migrate_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help migrate commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__new-migration_commands] )) || -_zkstack__dev__database__help__new-migration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help new-migration commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__prepare_commands] )) || -_zkstack__dev__database__help__prepare_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help prepare commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__reset_commands] )) || -_zkstack__dev__database__help__reset_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help reset commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__help__setup_commands] )) || -_zkstack__dev__database__help__setup_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database help setup commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__migrate_commands] )) || -_zkstack__dev__database__migrate_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database migrate commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__new-migration_commands] )) || -_zkstack__dev__database__new-migration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database new-migration commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__prepare_commands] )) || -_zkstack__dev__database__prepare_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database prepare commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__reset_commands] )) || -_zkstack__dev__database__reset_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database reset commands' commands "$@" -} -(( $+functions[_zkstack__dev__database__setup_commands] )) || -_zkstack__dev__database__setup_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev database setup commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt_commands] )) || -_zkstack__dev__fmt_commands() { - local commands; commands=( -'rustfmt:' \ -'contract:' \ -'prettier:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev fmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__contract_commands] )) || -_zkstack__dev__fmt__contract_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt contract commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help_commands] )) || -_zkstack__dev__fmt__help_commands() { - local commands; commands=( -'rustfmt:' \ -'contract:' \ -'prettier:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev fmt help commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help__contract_commands] )) || -_zkstack__dev__fmt__help__contract_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt help contract commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help__help_commands] )) || -_zkstack__dev__fmt__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help__prettier_commands] )) || -_zkstack__dev__fmt__help__prettier_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt help prettier commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__help__rustfmt_commands] )) || -_zkstack__dev__fmt__help__rustfmt_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt help rustfmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__prettier_commands] )) || -_zkstack__dev__fmt__prettier_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt prettier commands' commands "$@" -} -(( $+functions[_zkstack__dev__fmt__rustfmt_commands] )) || -_zkstack__dev__fmt__rustfmt_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev fmt rustfmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__generate-genesis_commands] )) || -_zkstack__dev__generate-genesis_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev generate-genesis commands' commands "$@" -} -(( $+functions[_zkstack__dev__help_commands] )) || -_zkstack__dev__help_commands() { - local commands; commands=( -'database:Database related commands' \ -'test:Run tests' \ -'clean:Clean artifacts' \ -'snapshot:Snapshots creator' \ -'lint:Lint code' \ -'fmt:Format code' \ -'prover:Protocol version used by provers' \ -'contracts:Build contracts' \ -'config-writer:Overwrite general config' \ -'send-transactions:Send transactions from file' \ -'status:Get status of the server' \ -'generate-genesis:Generate new genesis file based on current contracts' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev help commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__clean_commands] )) || -_zkstack__dev__help__clean_commands() { - local commands; commands=( -'all:Remove containers and contracts cache' \ -'containers:Remove containers and docker volumes' \ -'contracts-cache:Remove contracts caches' \ - ) - _describe -t commands 'zkstack dev help clean commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__clean__all_commands] )) || -_zkstack__dev__help__clean__all_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help clean all commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__clean__containers_commands] )) || -_zkstack__dev__help__clean__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help clean containers commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__clean__contracts-cache_commands] )) || -_zkstack__dev__help__clean__contracts-cache_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help clean contracts-cache commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__config-writer_commands] )) || -_zkstack__dev__help__config-writer_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help config-writer commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__contracts_commands] )) || -_zkstack__dev__help__contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database_commands] )) || -_zkstack__dev__help__database_commands() { - local commands; commands=( -'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ -'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ -'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ -'new-migration:Create new migration' \ -'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ -'reset:Reset databases. If no databases are selected, all databases will be reset.' \ -'setup:Setup databases. If no databases are selected, all databases will be setup.' \ - ) - _describe -t commands 'zkstack dev help database commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__check-sqlx-data_commands] )) || -_zkstack__dev__help__database__check-sqlx-data_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database check-sqlx-data commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__drop_commands] )) || -_zkstack__dev__help__database__drop_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database drop commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__migrate_commands] )) || -_zkstack__dev__help__database__migrate_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database migrate commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__new-migration_commands] )) || -_zkstack__dev__help__database__new-migration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database new-migration commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__prepare_commands] )) || -_zkstack__dev__help__database__prepare_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database prepare commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__reset_commands] )) || -_zkstack__dev__help__database__reset_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database reset commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__database__setup_commands] )) || -_zkstack__dev__help__database__setup_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help database setup commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__fmt_commands] )) || -_zkstack__dev__help__fmt_commands() { - local commands; commands=( -'rustfmt:' \ -'contract:' \ -'prettier:' \ - ) - _describe -t commands 'zkstack dev help fmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__fmt__contract_commands] )) || -_zkstack__dev__help__fmt__contract_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help fmt contract commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__fmt__prettier_commands] )) || -_zkstack__dev__help__fmt__prettier_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help fmt prettier commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__fmt__rustfmt_commands] )) || -_zkstack__dev__help__fmt__rustfmt_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help fmt rustfmt commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__generate-genesis_commands] )) || -_zkstack__dev__help__generate-genesis_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help generate-genesis commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__help_commands] )) || -_zkstack__dev__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__lint_commands] )) || -_zkstack__dev__help__lint_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help lint commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__prover_commands] )) || -_zkstack__dev__help__prover_commands() { - local commands; commands=( -'info:' \ -'insert-batch:' \ -'insert-version:' \ - ) - _describe -t commands 'zkstack dev help prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__prover__info_commands] )) || -_zkstack__dev__help__prover__info_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help prover info commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__prover__insert-batch_commands] )) || -_zkstack__dev__help__prover__insert-batch_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help prover insert-batch commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__prover__insert-version_commands] )) || -_zkstack__dev__help__prover__insert-version_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help prover insert-version commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__send-transactions_commands] )) || -_zkstack__dev__help__send-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help send-transactions commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__snapshot_commands] )) || -_zkstack__dev__help__snapshot_commands() { - local commands; commands=( -'create:' \ - ) - _describe -t commands 'zkstack dev help snapshot commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__snapshot__create_commands] )) || -_zkstack__dev__help__snapshot__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help snapshot create commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__status_commands] )) || -_zkstack__dev__help__status_commands() { - local commands; commands=( -'ports:Show used ports' \ - ) - _describe -t commands 'zkstack dev help status commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__status__ports_commands] )) || -_zkstack__dev__help__status__ports_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help status ports commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test_commands] )) || -_zkstack__dev__help__test_commands() { - local commands; commands=( -'integration:Run integration tests' \ -'fees:Run fees test' \ -'revert:Run revert tests' \ -'recovery:Run recovery tests' \ -'upgrade:Run upgrade tests' \ -'build:Build all test dependencies' \ -'rust:Run unit-tests, accepts optional cargo test flags' \ -'l1-contracts:Run L1 contracts tests' \ -'prover:Run prover tests' \ -'wallet:Print test wallets information' \ -'loadtest:Run loadtest' \ - ) - _describe -t commands 'zkstack dev help test commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__build_commands] )) || -_zkstack__dev__help__test__build_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test build commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__fees_commands] )) || -_zkstack__dev__help__test__fees_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test fees commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__integration_commands] )) || -_zkstack__dev__help__test__integration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test integration commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__l1-contracts_commands] )) || -_zkstack__dev__help__test__l1-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test l1-contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__loadtest_commands] )) || -_zkstack__dev__help__test__loadtest_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test loadtest commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__prover_commands] )) || -_zkstack__dev__help__test__prover_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__recovery_commands] )) || -_zkstack__dev__help__test__recovery_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test recovery commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__revert_commands] )) || -_zkstack__dev__help__test__revert_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test revert commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__rust_commands] )) || -_zkstack__dev__help__test__rust_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test rust commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__upgrade_commands] )) || -_zkstack__dev__help__test__upgrade_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test upgrade commands' commands "$@" -} -(( $+functions[_zkstack__dev__help__test__wallet_commands] )) || -_zkstack__dev__help__test__wallet_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev help test wallet commands' commands "$@" -} -(( $+functions[_zkstack__dev__lint_commands] )) || -_zkstack__dev__lint_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev lint commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover_commands] )) || -_zkstack__dev__prover_commands() { - local commands; commands=( -'info:' \ -'insert-batch:' \ -'insert-version:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help_commands] )) || -_zkstack__dev__prover__help_commands() { - local commands; commands=( -'info:' \ -'insert-batch:' \ -'insert-version:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev prover help commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help__help_commands] )) || -_zkstack__dev__prover__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help__info_commands] )) || -_zkstack__dev__prover__help__info_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover help info commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help__insert-batch_commands] )) || -_zkstack__dev__prover__help__insert-batch_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover help insert-batch commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__help__insert-version_commands] )) || -_zkstack__dev__prover__help__insert-version_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover help insert-version commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__info_commands] )) || -_zkstack__dev__prover__info_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover info commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__insert-batch_commands] )) || -_zkstack__dev__prover__insert-batch_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover insert-batch commands' commands "$@" -} -(( $+functions[_zkstack__dev__prover__insert-version_commands] )) || -_zkstack__dev__prover__insert-version_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev prover insert-version commands' commands "$@" -} -(( $+functions[_zkstack__dev__send-transactions_commands] )) || -_zkstack__dev__send-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev send-transactions commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot_commands] )) || -_zkstack__dev__snapshot_commands() { - local commands; commands=( -'create:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev snapshot commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot__create_commands] )) || -_zkstack__dev__snapshot__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev snapshot create commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot__help_commands] )) || -_zkstack__dev__snapshot__help_commands() { - local commands; commands=( -'create:' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev snapshot help commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot__help__create_commands] )) || -_zkstack__dev__snapshot__help__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev snapshot help create commands' commands "$@" -} -(( $+functions[_zkstack__dev__snapshot__help__help_commands] )) || -_zkstack__dev__snapshot__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev snapshot help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__status_commands] )) || -_zkstack__dev__status_commands() { - local commands; commands=( -'ports:Show used ports' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev status commands' commands "$@" -} -(( $+functions[_zkstack__dev__status__help_commands] )) || -_zkstack__dev__status__help_commands() { - local commands; commands=( -'ports:Show used ports' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev status help commands' commands "$@" -} -(( $+functions[_zkstack__dev__status__help__help_commands] )) || -_zkstack__dev__status__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev status help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__status__help__ports_commands] )) || -_zkstack__dev__status__help__ports_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev status help ports commands' commands "$@" -} -(( $+functions[_zkstack__dev__status__ports_commands] )) || -_zkstack__dev__status__ports_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev status ports commands' commands "$@" -} -(( $+functions[_zkstack__dev__test_commands] )) || -_zkstack__dev__test_commands() { - local commands; commands=( -'integration:Run integration tests' \ -'fees:Run fees test' \ -'revert:Run revert tests' \ -'recovery:Run recovery tests' \ -'upgrade:Run upgrade tests' \ -'build:Build all test dependencies' \ -'rust:Run unit-tests, accepts optional cargo test flags' \ -'l1-contracts:Run L1 contracts tests' \ -'prover:Run prover tests' \ -'wallet:Print test wallets information' \ -'loadtest:Run loadtest' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev test commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__build_commands] )) || -_zkstack__dev__test__build_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test build commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__fees_commands] )) || -_zkstack__dev__test__fees_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test fees commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help_commands] )) || -_zkstack__dev__test__help_commands() { - local commands; commands=( -'integration:Run integration tests' \ -'fees:Run fees test' \ -'revert:Run revert tests' \ -'recovery:Run recovery tests' \ -'upgrade:Run upgrade tests' \ -'build:Build all test dependencies' \ -'rust:Run unit-tests, accepts optional cargo test flags' \ -'l1-contracts:Run L1 contracts tests' \ -'prover:Run prover tests' \ -'wallet:Print test wallets information' \ -'loadtest:Run loadtest' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack dev test help commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__build_commands] )) || -_zkstack__dev__test__help__build_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help build commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__fees_commands] )) || -_zkstack__dev__test__help__fees_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help fees commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__help_commands] )) || -_zkstack__dev__test__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help help commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__integration_commands] )) || -_zkstack__dev__test__help__integration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help integration commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__l1-contracts_commands] )) || -_zkstack__dev__test__help__l1-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help l1-contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__loadtest_commands] )) || -_zkstack__dev__test__help__loadtest_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help loadtest commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__prover_commands] )) || -_zkstack__dev__test__help__prover_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__recovery_commands] )) || -_zkstack__dev__test__help__recovery_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help recovery commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__revert_commands] )) || -_zkstack__dev__test__help__revert_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help revert commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__rust_commands] )) || -_zkstack__dev__test__help__rust_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help rust commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__upgrade_commands] )) || -_zkstack__dev__test__help__upgrade_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help upgrade commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__help__wallet_commands] )) || -_zkstack__dev__test__help__wallet_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test help wallet commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__integration_commands] )) || -_zkstack__dev__test__integration_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test integration commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__l1-contracts_commands] )) || -_zkstack__dev__test__l1-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test l1-contracts commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__loadtest_commands] )) || -_zkstack__dev__test__loadtest_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test loadtest commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__prover_commands] )) || -_zkstack__dev__test__prover_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test prover commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__recovery_commands] )) || -_zkstack__dev__test__recovery_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test recovery commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__revert_commands] )) || -_zkstack__dev__test__revert_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test revert commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__rust_commands] )) || -_zkstack__dev__test__rust_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test rust commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__upgrade_commands] )) || -_zkstack__dev__test__upgrade_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test upgrade commands' commands "$@" -} -(( $+functions[_zkstack__dev__test__wallet_commands] )) || -_zkstack__dev__test__wallet_commands() { - local commands; commands=() - _describe -t commands 'zkstack dev test wallet commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem_commands] )) || -_zkstack__ecosystem_commands() { - local commands; commands=( -'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ -'build-transactions:Create transactions to build ecosystem contracts' \ -'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ -'change-default-chain:Change the default chain' \ -'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack ecosystem commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__build-transactions_commands] )) || -_zkstack__ecosystem__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__change-default-chain_commands] )) || -_zkstack__ecosystem__change-default-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem change-default-chain commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__create_commands] )) || -_zkstack__ecosystem__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem create commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help_commands] )) || -_zkstack__ecosystem__help_commands() { - local commands; commands=( -'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ -'build-transactions:Create transactions to build ecosystem contracts' \ -'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ -'change-default-chain:Change the default chain' \ -'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack ecosystem help commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__build-transactions_commands] )) || -_zkstack__ecosystem__help__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__change-default-chain_commands] )) || -_zkstack__ecosystem__help__change-default-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help change-default-chain commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__create_commands] )) || -_zkstack__ecosystem__help__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help create commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__help_commands] )) || -_zkstack__ecosystem__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help help commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__init_commands] )) || -_zkstack__ecosystem__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help init commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__help__setup-observability_commands] )) || -_zkstack__ecosystem__help__setup-observability_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem help setup-observability commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__init_commands] )) || -_zkstack__ecosystem__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem init commands' commands "$@" -} -(( $+functions[_zkstack__ecosystem__setup-observability_commands] )) || -_zkstack__ecosystem__setup-observability_commands() { - local commands; commands=() - _describe -t commands 'zkstack ecosystem setup-observability commands' commands "$@" -} -(( $+functions[_zkstack__explorer_commands] )) || -_zkstack__explorer_commands() { - local commands; commands=( -'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ -'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ -'run:Run explorer app' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack explorer commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help_commands] )) || -_zkstack__explorer__help_commands() { - local commands; commands=( -'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ -'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ -'run:Run explorer app' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack explorer help commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help__help_commands] )) || -_zkstack__explorer__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer help help commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help__init_commands] )) || -_zkstack__explorer__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer help init commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help__run_commands] )) || -_zkstack__explorer__help__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer help run commands' commands "$@" -} -(( $+functions[_zkstack__explorer__help__run-backend_commands] )) || -_zkstack__explorer__help__run-backend_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer help run-backend commands' commands "$@" -} -(( $+functions[_zkstack__explorer__init_commands] )) || -_zkstack__explorer__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer init commands' commands "$@" -} -(( $+functions[_zkstack__explorer__run_commands] )) || -_zkstack__explorer__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer run commands' commands "$@" -} -(( $+functions[_zkstack__explorer__run-backend_commands] )) || -_zkstack__explorer__run-backend_commands() { - local commands; commands=() - _describe -t commands 'zkstack explorer run-backend commands' commands "$@" -} -(( $+functions[_zkstack__external-node_commands] )) || -_zkstack__external-node_commands() { - local commands; commands=( -'configs:Prepare configs for EN' \ -'init:Init databases' \ -'run:Run external node' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack external-node commands' commands "$@" -} -(( $+functions[_zkstack__external-node__configs_commands] )) || -_zkstack__external-node__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node configs commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help_commands] )) || -_zkstack__external-node__help_commands() { - local commands; commands=( -'configs:Prepare configs for EN' \ -'init:Init databases' \ -'run:Run external node' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack external-node help commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help__configs_commands] )) || -_zkstack__external-node__help__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node help configs commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help__help_commands] )) || -_zkstack__external-node__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node help help commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help__init_commands] )) || -_zkstack__external-node__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node help init commands' commands "$@" -} -(( $+functions[_zkstack__external-node__help__run_commands] )) || -_zkstack__external-node__help__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node help run commands' commands "$@" -} -(( $+functions[_zkstack__external-node__init_commands] )) || -_zkstack__external-node__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node init commands' commands "$@" -} -(( $+functions[_zkstack__external-node__run_commands] )) || -_zkstack__external-node__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack external-node run commands' commands "$@" -} -(( $+functions[_zkstack__help_commands] )) || -_zkstack__help_commands() { - local commands; commands=( -'autocomplete:Create shell autocompletion files' \ -'ecosystem:Ecosystem related commands' \ -'chain:Chain related commands' \ -'dev:Supervisor related commands' \ -'prover:Prover related commands' \ -'external-node:External Node related commands' \ -'containers:Run containers for local development' \ -'portal:Run dapp-portal' \ -'explorer:Run block-explorer' \ -'update:Update ZKsync' \ -'markdown:Print markdown help' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack help commands' commands "$@" -} -(( $+functions[_zkstack__help__autocomplete_commands] )) || -_zkstack__help__autocomplete_commands() { - local commands; commands=() - _describe -t commands 'zkstack help autocomplete commands' commands "$@" -} -(( $+functions[_zkstack__help__chain_commands] )) || -_zkstack__help__chain_commands() { - local commands; commands=( -'create:Create a new chain, setting the necessary configurations for later initialization' \ -'build-transactions:Create unsigned transactions for chain deployment' \ -'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ -'genesis:Run server genesis' \ -'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ -'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ -'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ -'initialize-bridges:Initialize bridges on L2' \ -'deploy-consensus-registry:Deploy L2 consensus registry' \ -'deploy-multicall3:Deploy L2 multicall3' \ -'deploy-upgrader:Deploy Default Upgrader' \ -'deploy-paymaster:Deploy paymaster smart contract' \ -'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ -'server:Run server' \ -'contract-verifier:Run contract verifier' \ -'consensus:' \ - ) - _describe -t commands 'zkstack help chain commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__accept-chain-ownership_commands] )) || -_zkstack__help__chain__accept-chain-ownership_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain accept-chain-ownership commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__build-transactions_commands] )) || -_zkstack__help__chain__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__consensus_commands] )) || -_zkstack__help__chain__consensus_commands() { - local commands; commands=( -'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ -'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ - ) - _describe -t commands 'zkstack help chain consensus commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__consensus__get-attester-committee_commands] )) || -_zkstack__help__chain__consensus__get-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain consensus get-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__consensus__set-attester-committee_commands] )) || -_zkstack__help__chain__consensus__set-attester-committee_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain consensus set-attester-committee commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__contract-verifier_commands] )) || -_zkstack__help__chain__contract-verifier_commands() { - local commands; commands=( -'run:Run contract verifier' \ -'init:Download required binaries for contract verifier' \ - ) - _describe -t commands 'zkstack help chain contract-verifier commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__contract-verifier__init_commands] )) || -_zkstack__help__chain__contract-verifier__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain contract-verifier init commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__contract-verifier__run_commands] )) || -_zkstack__help__chain__contract-verifier__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain contract-verifier run commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__create_commands] )) || -_zkstack__help__chain__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain create commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-consensus-registry_commands] )) || -_zkstack__help__chain__deploy-consensus-registry_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-consensus-registry commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-l2-contracts_commands] )) || -_zkstack__help__chain__deploy-l2-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-l2-contracts commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-multicall3_commands] )) || -_zkstack__help__chain__deploy-multicall3_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-multicall3 commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-paymaster_commands] )) || -_zkstack__help__chain__deploy-paymaster_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-paymaster commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__deploy-upgrader_commands] )) || -_zkstack__help__chain__deploy-upgrader_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain deploy-upgrader commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__genesis_commands] )) || -_zkstack__help__chain__genesis_commands() { - local commands; commands=( -'init-database:Initialize databases' \ -'server:Runs server genesis' \ - ) - _describe -t commands 'zkstack help chain genesis commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__genesis__init-database_commands] )) || -_zkstack__help__chain__genesis__init-database_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain genesis init-database commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__genesis__server_commands] )) || -_zkstack__help__chain__genesis__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain genesis server commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__init_commands] )) || -_zkstack__help__chain__init_commands() { - local commands; commands=( -'configs:Initialize chain configs' \ - ) - _describe -t commands 'zkstack help chain init commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__init__configs_commands] )) || -_zkstack__help__chain__init__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain init configs commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__initialize-bridges_commands] )) || -_zkstack__help__chain__initialize-bridges_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain initialize-bridges commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__register-chain_commands] )) || -_zkstack__help__chain__register-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain register-chain commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__server_commands] )) || -_zkstack__help__chain__server_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain server commands' commands "$@" -} -(( $+functions[_zkstack__help__chain__update-token-multiplier-setter_commands] )) || -_zkstack__help__chain__update-token-multiplier-setter_commands() { - local commands; commands=() - _describe -t commands 'zkstack help chain update-token-multiplier-setter commands' commands "$@" -} -(( $+functions[_zkstack__help__containers_commands] )) || -_zkstack__help__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack help containers commands' commands "$@" -} -(( $+functions[_zkstack__help__dev_commands] )) || -_zkstack__help__dev_commands() { - local commands; commands=( -'database:Database related commands' \ -'test:Run tests' \ -'clean:Clean artifacts' \ -'snapshot:Snapshots creator' \ -'lint:Lint code' \ -'fmt:Format code' \ -'prover:Protocol version used by provers' \ -'contracts:Build contracts' \ -'config-writer:Overwrite general config' \ -'send-transactions:Send transactions from file' \ -'status:Get status of the server' \ -'generate-genesis:Generate new genesis file based on current contracts' \ - ) - _describe -t commands 'zkstack help dev commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__clean_commands] )) || -_zkstack__help__dev__clean_commands() { - local commands; commands=( -'all:Remove containers and contracts cache' \ -'containers:Remove containers and docker volumes' \ -'contracts-cache:Remove contracts caches' \ - ) - _describe -t commands 'zkstack help dev clean commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__clean__all_commands] )) || -_zkstack__help__dev__clean__all_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev clean all commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__clean__containers_commands] )) || -_zkstack__help__dev__clean__containers_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev clean containers commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__clean__contracts-cache_commands] )) || -_zkstack__help__dev__clean__contracts-cache_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev clean contracts-cache commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__config-writer_commands] )) || -_zkstack__help__dev__config-writer_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev config-writer commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__contracts_commands] )) || -_zkstack__help__dev__contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev contracts commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database_commands] )) || -_zkstack__help__dev__database_commands() { - local commands; commands=( -'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ -'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ -'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ -'new-migration:Create new migration' \ -'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ -'reset:Reset databases. If no databases are selected, all databases will be reset.' \ -'setup:Setup databases. If no databases are selected, all databases will be setup.' \ - ) - _describe -t commands 'zkstack help dev database commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__check-sqlx-data_commands] )) || -_zkstack__help__dev__database__check-sqlx-data_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database check-sqlx-data commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__drop_commands] )) || -_zkstack__help__dev__database__drop_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database drop commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__migrate_commands] )) || -_zkstack__help__dev__database__migrate_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database migrate commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__new-migration_commands] )) || -_zkstack__help__dev__database__new-migration_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database new-migration commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__prepare_commands] )) || -_zkstack__help__dev__database__prepare_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database prepare commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__reset_commands] )) || -_zkstack__help__dev__database__reset_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database reset commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__database__setup_commands] )) || -_zkstack__help__dev__database__setup_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev database setup commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__fmt_commands] )) || -_zkstack__help__dev__fmt_commands() { - local commands; commands=( -'rustfmt:' \ -'contract:' \ -'prettier:' \ - ) - _describe -t commands 'zkstack help dev fmt commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__fmt__contract_commands] )) || -_zkstack__help__dev__fmt__contract_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev fmt contract commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__fmt__prettier_commands] )) || -_zkstack__help__dev__fmt__prettier_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev fmt prettier commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__fmt__rustfmt_commands] )) || -_zkstack__help__dev__fmt__rustfmt_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev fmt rustfmt commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__generate-genesis_commands] )) || -_zkstack__help__dev__generate-genesis_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev generate-genesis commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__lint_commands] )) || -_zkstack__help__dev__lint_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev lint commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__prover_commands] )) || -_zkstack__help__dev__prover_commands() { - local commands; commands=( -'info:' \ -'insert-batch:' \ -'insert-version:' \ - ) - _describe -t commands 'zkstack help dev prover commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__prover__info_commands] )) || -_zkstack__help__dev__prover__info_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev prover info commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__prover__insert-batch_commands] )) || -_zkstack__help__dev__prover__insert-batch_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev prover insert-batch commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__prover__insert-version_commands] )) || -_zkstack__help__dev__prover__insert-version_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev prover insert-version commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__send-transactions_commands] )) || -_zkstack__help__dev__send-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev send-transactions commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__snapshot_commands] )) || -_zkstack__help__dev__snapshot_commands() { - local commands; commands=( -'create:' \ - ) - _describe -t commands 'zkstack help dev snapshot commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__snapshot__create_commands] )) || -_zkstack__help__dev__snapshot__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev snapshot create commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__status_commands] )) || -_zkstack__help__dev__status_commands() { - local commands; commands=( -'ports:Show used ports' \ - ) - _describe -t commands 'zkstack help dev status commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__status__ports_commands] )) || -_zkstack__help__dev__status__ports_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev status ports commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test_commands] )) || -_zkstack__help__dev__test_commands() { - local commands; commands=( -'integration:Run integration tests' \ -'fees:Run fees test' \ -'revert:Run revert tests' \ -'recovery:Run recovery tests' \ -'upgrade:Run upgrade tests' \ -'build:Build all test dependencies' \ -'rust:Run unit-tests, accepts optional cargo test flags' \ -'l1-contracts:Run L1 contracts tests' \ -'prover:Run prover tests' \ -'wallet:Print test wallets information' \ -'loadtest:Run loadtest' \ - ) - _describe -t commands 'zkstack help dev test commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__build_commands] )) || -_zkstack__help__dev__test__build_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test build commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__fees_commands] )) || -_zkstack__help__dev__test__fees_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test fees commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__integration_commands] )) || -_zkstack__help__dev__test__integration_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test integration commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__l1-contracts_commands] )) || -_zkstack__help__dev__test__l1-contracts_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test l1-contracts commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__loadtest_commands] )) || -_zkstack__help__dev__test__loadtest_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test loadtest commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__prover_commands] )) || -_zkstack__help__dev__test__prover_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test prover commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__recovery_commands] )) || -_zkstack__help__dev__test__recovery_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test recovery commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__revert_commands] )) || -_zkstack__help__dev__test__revert_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test revert commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__rust_commands] )) || -_zkstack__help__dev__test__rust_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test rust commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__upgrade_commands] )) || -_zkstack__help__dev__test__upgrade_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test upgrade commands' commands "$@" -} -(( $+functions[_zkstack__help__dev__test__wallet_commands] )) || -_zkstack__help__dev__test__wallet_commands() { - local commands; commands=() - _describe -t commands 'zkstack help dev test wallet commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem_commands] )) || -_zkstack__help__ecosystem_commands() { - local commands; commands=( -'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ -'build-transactions:Create transactions to build ecosystem contracts' \ -'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ -'change-default-chain:Change the default chain' \ -'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ - ) - _describe -t commands 'zkstack help ecosystem commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__build-transactions_commands] )) || -_zkstack__help__ecosystem__build-transactions_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem build-transactions commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__change-default-chain_commands] )) || -_zkstack__help__ecosystem__change-default-chain_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem change-default-chain commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__create_commands] )) || -_zkstack__help__ecosystem__create_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem create commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__init_commands] )) || -_zkstack__help__ecosystem__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem init commands' commands "$@" -} -(( $+functions[_zkstack__help__ecosystem__setup-observability_commands] )) || -_zkstack__help__ecosystem__setup-observability_commands() { - local commands; commands=() - _describe -t commands 'zkstack help ecosystem setup-observability commands' commands "$@" -} -(( $+functions[_zkstack__help__explorer_commands] )) || -_zkstack__help__explorer_commands() { - local commands; commands=( -'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ -'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ -'run:Run explorer app' \ - ) - _describe -t commands 'zkstack help explorer commands' commands "$@" -} -(( $+functions[_zkstack__help__explorer__init_commands] )) || -_zkstack__help__explorer__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help explorer init commands' commands "$@" -} -(( $+functions[_zkstack__help__explorer__run_commands] )) || -_zkstack__help__explorer__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack help explorer run commands' commands "$@" -} -(( $+functions[_zkstack__help__explorer__run-backend_commands] )) || -_zkstack__help__explorer__run-backend_commands() { - local commands; commands=() - _describe -t commands 'zkstack help explorer run-backend commands' commands "$@" -} -(( $+functions[_zkstack__help__external-node_commands] )) || -_zkstack__help__external-node_commands() { - local commands; commands=( -'configs:Prepare configs for EN' \ -'init:Init databases' \ -'run:Run external node' \ - ) - _describe -t commands 'zkstack help external-node commands' commands "$@" -} -(( $+functions[_zkstack__help__external-node__configs_commands] )) || -_zkstack__help__external-node__configs_commands() { - local commands; commands=() - _describe -t commands 'zkstack help external-node configs commands' commands "$@" -} -(( $+functions[_zkstack__help__external-node__init_commands] )) || -_zkstack__help__external-node__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help external-node init commands' commands "$@" -} -(( $+functions[_zkstack__help__external-node__run_commands] )) || -_zkstack__help__external-node__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack help external-node run commands' commands "$@" -} -(( $+functions[_zkstack__help__help_commands] )) || -_zkstack__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack help help commands' commands "$@" -} -(( $+functions[_zkstack__help__markdown_commands] )) || -_zkstack__help__markdown_commands() { - local commands; commands=() - _describe -t commands 'zkstack help markdown commands' commands "$@" -} -(( $+functions[_zkstack__help__portal_commands] )) || -_zkstack__help__portal_commands() { - local commands; commands=() - _describe -t commands 'zkstack help portal commands' commands "$@" -} -(( $+functions[_zkstack__help__prover_commands] )) || -_zkstack__help__prover_commands() { - local commands; commands=( -'init:Initialize prover' \ -'setup-keys:Generate setup keys' \ -'run:Run prover' \ -'init-bellman-cuda:Initialize bellman-cuda' \ -'compressor-keys:Download compressor keys' \ - ) - _describe -t commands 'zkstack help prover commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__compressor-keys_commands] )) || -_zkstack__help__prover__compressor-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover compressor-keys commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__init_commands] )) || -_zkstack__help__prover__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover init commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__init-bellman-cuda_commands] )) || -_zkstack__help__prover__init-bellman-cuda_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover init-bellman-cuda commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__run_commands] )) || -_zkstack__help__prover__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover run commands' commands "$@" -} -(( $+functions[_zkstack__help__prover__setup-keys_commands] )) || -_zkstack__help__prover__setup-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack help prover setup-keys commands' commands "$@" -} -(( $+functions[_zkstack__help__update_commands] )) || -_zkstack__help__update_commands() { - local commands; commands=() - _describe -t commands 'zkstack help update commands' commands "$@" -} -(( $+functions[_zkstack__markdown_commands] )) || -_zkstack__markdown_commands() { - local commands; commands=() - _describe -t commands 'zkstack markdown commands' commands "$@" -} -(( $+functions[_zkstack__portal_commands] )) || -_zkstack__portal_commands() { - local commands; commands=() - _describe -t commands 'zkstack portal commands' commands "$@" -} -(( $+functions[_zkstack__prover_commands] )) || -_zkstack__prover_commands() { - local commands; commands=( -'init:Initialize prover' \ -'setup-keys:Generate setup keys' \ -'run:Run prover' \ -'init-bellman-cuda:Initialize bellman-cuda' \ -'compressor-keys:Download compressor keys' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack prover commands' commands "$@" -} -(( $+functions[_zkstack__prover__compressor-keys_commands] )) || -_zkstack__prover__compressor-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover compressor-keys commands' commands "$@" -} -(( $+functions[_zkstack__prover__help_commands] )) || -_zkstack__prover__help_commands() { - local commands; commands=( -'init:Initialize prover' \ -'setup-keys:Generate setup keys' \ -'run:Run prover' \ -'init-bellman-cuda:Initialize bellman-cuda' \ -'compressor-keys:Download compressor keys' \ -'help:Print this message or the help of the given subcommand(s)' \ - ) - _describe -t commands 'zkstack prover help commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__compressor-keys_commands] )) || -_zkstack__prover__help__compressor-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help compressor-keys commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__help_commands] )) || -_zkstack__prover__help__help_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help help commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__init_commands] )) || -_zkstack__prover__help__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help init commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__init-bellman-cuda_commands] )) || -_zkstack__prover__help__init-bellman-cuda_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help init-bellman-cuda commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__run_commands] )) || -_zkstack__prover__help__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help run commands' commands "$@" -} -(( $+functions[_zkstack__prover__help__setup-keys_commands] )) || -_zkstack__prover__help__setup-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover help setup-keys commands' commands "$@" -} -(( $+functions[_zkstack__prover__init_commands] )) || -_zkstack__prover__init_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover init commands' commands "$@" -} -(( $+functions[_zkstack__prover__init-bellman-cuda_commands] )) || -_zkstack__prover__init-bellman-cuda_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover init-bellman-cuda commands' commands "$@" -} -(( $+functions[_zkstack__prover__run_commands] )) || -_zkstack__prover__run_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover run commands' commands "$@" -} -(( $+functions[_zkstack__prover__setup-keys_commands] )) || -_zkstack__prover__setup-keys_commands() { - local commands; commands=() - _describe -t commands 'zkstack prover setup-keys commands' commands "$@" -} -(( $+functions[_zkstack__update_commands] )) || -_zkstack__update_commands() { - local commands; commands=() - _describe -t commands 'zkstack update commands' commands "$@" -} - -if [ "$funcstack[1]" = "_zkstack" ]; then - _zkstack "$@" -else - compdef _zkstack zkstack -fi From a01eea872295eb73484a058f7dcf9642419ac8ef Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 7 Nov 2024 15:34:06 -0300 Subject: [PATCH 24/38] Load chain in chain:run and pass it to the next commands --- .../commands/chain/contract_verifier/init.rs | 9 +++-- .../commands/chain/contract_verifier/mod.rs | 11 ++++-- .../commands/chain/contract_verifier/run.rs | 11 ++---- .../src/commands/chain/deploy_paymaster.rs | 13 +++---- .../src/commands/chain/genesis/database.rs | 14 ++++---- .../zkstack/src/commands/chain/genesis/mod.rs | 35 +++++++++++-------- .../src/commands/chain/genesis/server.rs | 24 ++++++------- .../crates/zkstack/src/commands/chain/mod.rs | 25 +++++++++---- .../zkstack/src/commands/chain/server.rs | 30 ++++++---------- 9 files changed, 89 insertions(+), 83 deletions(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs index 8cfe019a53c8..3e8868226694 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/init.rs @@ -1,15 +1,18 @@ use std::path::{Path, PathBuf}; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::zkstack_config::ZkStackConfig; +use config::ChainConfig; use xshell::{cmd, Shell}; use super::args::{init::InitContractVerifierArgs, releases::Version}; use crate::messages::{msg_binary_already_exists, msg_downloading_binary_spinner}; -pub(crate) async fn run(shell: &Shell, args: InitContractVerifierArgs) -> anyhow::Result<()> { +pub(crate) async fn run( + shell: &Shell, + args: InitContractVerifierArgs, + chain: ChainConfig, +) -> anyhow::Result<()> { let args = args.fill_values_with_prompt(shell)?; - let chain = ZkStackConfig::load_current_chain(shell)?; let link_to_code = chain.link_to_code; download_binaries( diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs index f70c75202f8f..9520f95ee38c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/mod.rs @@ -1,5 +1,6 @@ use args::init::InitContractVerifierArgs; use clap::Subcommand; +use config::ChainConfig; use xshell::Shell; mod args; @@ -14,9 +15,13 @@ pub enum ContractVerifierCommands { Init(InitContractVerifierArgs), } -pub(crate) async fn run(shell: &Shell, args: ContractVerifierCommands) -> anyhow::Result<()> { +pub(crate) async fn run( + shell: &Shell, + args: ContractVerifierCommands, + chain: ChainConfig, +) -> anyhow::Result<()> { match args { - ContractVerifierCommands::Run => run::run(shell).await, - ContractVerifierCommands::Init(args) => init::run(shell, args).await, + ContractVerifierCommands::Run => run::run(shell, chain).await, + ContractVerifierCommands::Init(args) => init::run(shell, args, chain).await, } } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs index ea3245a2e51d..1ef631db54bd 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/contract_verifier/run.rs @@ -1,16 +1,11 @@ use anyhow::Context; use common::{cmd::Cmd, logger}; -use config::zkstack_config::ZkStackConfig; +use config::ChainConfig; use xshell::{cmd, Shell}; -use crate::messages::{ - MSG_CHAIN_NOT_INITIALIZED, MSG_FAILED_TO_RUN_CONTRACT_VERIFIER_ERR, - MSG_RUNNING_CONTRACT_VERIFIER, -}; - -pub(crate) async fn run(shell: &Shell) -> anyhow::Result<()> { - let chain = ZkStackConfig::load_current_chain(shell).context(MSG_CHAIN_NOT_INITIALIZED)?; +use crate::messages::{MSG_FAILED_TO_RUN_CONTRACT_VERIFIER_ERR, MSG_RUNNING_CONTRACT_VERIFIER}; +pub(crate) async fn run(shell: &Shell, chain: ChainConfig) -> anyhow::Result<()> { let config_path = chain.path_to_general_config(); let secrets_path = chain.path_to_secrets_config(); diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs index e2dd32c46e16..c6e89cd91c06 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs @@ -6,22 +6,19 @@ use config::{ script_params::DEPLOY_PAYMASTER_SCRIPT_PARAMS, }, traits::{ReadConfig, SaveConfig, SaveConfigWithBasePath}, - zkstack_config::ZkStackConfig, ChainConfig, ContractsConfig, }; use xshell::Shell; use crate::{ - messages::{MSG_CHAIN_NOT_INITIALIZED, MSG_L1_SECRETS_MUST_BE_PRESENTED}, + messages::MSG_L1_SECRETS_MUST_BE_PRESENTED, utils::forge::{check_the_balance, fill_forge_private_key}, }; -pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { - let chain_config = - ZkStackConfig::load_current_chain(shell).context(MSG_CHAIN_NOT_INITIALIZED)?; - let mut contracts = chain_config.get_contracts_config()?; - deploy_paymaster(shell, &chain_config, &mut contracts, args, None, true).await?; - contracts.save_with_base_path(shell, chain_config.configs) +pub async fn run(args: ForgeScriptArgs, shell: &Shell, chain: ChainConfig) -> anyhow::Result<()> { + let mut contracts = chain.get_contracts_config()?; + deploy_paymaster(shell, &chain, &mut contracts, args, None, true).await?; + contracts.save_with_base_path(shell, chain.configs) } pub async fn deploy_paymaster( diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs index 22ba6e1c3556..240269a6c90d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs @@ -8,7 +8,7 @@ use common::{ }; use config::{ override_config, set_file_artifacts, set_rocks_db_config, set_server_database, - traits::SaveConfigWithBasePath, zkstack_config::ZkStackConfig, ChainConfig, FileArtifacts, + traits::SaveConfigWithBasePath, ChainConfig, FileArtifacts, }; use types::ProverMode; use xshell::Shell; @@ -27,18 +27,16 @@ use crate::{ utils::rocks_db::{recreate_rocksdb_dirs, RocksDBDirOption}, }; -pub async fn run(args: GenesisArgs, shell: &Shell) -> anyhow::Result<()> { - let chain_config = ZkStackConfig::load_current_chain(shell)?; - - let mut secrets = chain_config.get_secrets_config()?; - let args = args.fill_values_with_secrets(&chain_config)?; +pub async fn run(args: GenesisArgs, shell: &Shell, chain: ChainConfig) -> anyhow::Result<()> { + let mut secrets = chain.get_secrets_config()?; + let args = args.fill_values_with_secrets(&chain)?; set_server_database(&mut secrets, &args.server_db)?; - secrets.save_with_base_path(shell, &chain_config.configs)?; + secrets.save_with_base_path(shell, &chain.configs)?; initialize_server_database( shell, &args.server_db, - chain_config.link_to_code.clone(), + chain.link_to_code.clone(), args.dont_drop, ) .await?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs index 388c8a239fa6..bb40a47b3518 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs @@ -1,6 +1,6 @@ use clap::{command, Parser, Subcommand}; use common::{logger, spinner::Spinner}; -use config::{zkstack_config::ZkStackConfig, ChainConfig}; +use config::ChainConfig; use xshell::Shell; use crate::{ @@ -36,19 +36,26 @@ pub struct GenesisCommand { args: GenesisArgs, } -pub(crate) async fn run(args: GenesisCommand, shell: &Shell) -> anyhow::Result<()> { +pub(crate) async fn run( + args: GenesisCommand, + shell: &Shell, + chain: ChainConfig, +) -> anyhow::Result<()> { match args.command { - Some(GenesisSubcommands::InitDatabase(args)) => database::run(*args, shell).await, - Some(GenesisSubcommands::Server) => server::run(shell).await, - None => run_genesis(args.args, shell).await, + Some(GenesisSubcommands::InitDatabase(args)) => database::run(*args, shell, chain).await, + Some(GenesisSubcommands::Server) => server::run(shell, chain).await, + None => run_genesis(args.args, shell, chain).await, } } -pub async fn run_genesis(args: GenesisArgs, shell: &Shell) -> anyhow::Result<()> { - let chain_config = ZkStackConfig::load_current_chain(shell)?; - let args = args.fill_values_with_prompt(&chain_config); +pub async fn run_genesis( + args: GenesisArgs, + shell: &Shell, + chain: ChainConfig, +) -> anyhow::Result<()> { + let args = args.fill_values_with_prompt(&chain); - genesis(args, shell, &chain_config).await?; + genesis(args, shell, &chain).await?; logger::outro(MSG_GENESIS_COMPLETED); Ok(()) @@ -57,14 +64,14 @@ pub async fn run_genesis(args: GenesisArgs, shell: &Shell) -> anyhow::Result<()> pub async fn genesis( args: GenesisArgsFinal, shell: &Shell, - config: &ChainConfig, + chain: &ChainConfig, ) -> anyhow::Result<()> { - genesis::database::update_configs(args.clone(), shell, config)?; + genesis::database::update_configs(args.clone(), shell, chain)?; logger::note( MSG_SELECTED_CONFIG, logger::object_to_string(serde_json::json!({ - "chain_config": config, + "chain_config": chain, "server_db_config": args.server_db, })), ); @@ -74,14 +81,14 @@ pub async fn genesis( initialize_server_database( shell, &args.server_db, - config.link_to_code.clone(), + chain.link_to_code.clone(), args.dont_drop, ) .await?; spinner.finish(); let spinner = Spinner::new(MSG_STARTING_GENESIS_SPINNER); - run_server_genesis(config, shell)?; + run_server_genesis(chain, shell)?; spinner.finish(); Ok(()) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs index c1e6e4e0d5ab..93daa6c24d46 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs @@ -5,8 +5,8 @@ use common::{ spinner::Spinner, }; use config::{ - traits::FileConfigWithDefaultName, zkstack_config::ZkStackConfig, ChainConfig, ContractsConfig, - GeneralConfig, GenesisConfig, SecretsConfig, WalletsConfig, + traits::FileConfigWithDefaultName, ChainConfig, ContractsConfig, GeneralConfig, GenesisConfig, + SecretsConfig, WalletsConfig, }; use xshell::Shell; @@ -14,28 +14,26 @@ use crate::messages::{ MSG_FAILED_TO_RUN_SERVER_ERR, MSG_GENESIS_COMPLETED, MSG_STARTING_GENESIS_SPINNER, }; -pub async fn run(shell: &Shell) -> anyhow::Result<()> { - let chain_config = ZkStackConfig::load_current_chain(shell)?; - +pub async fn run(shell: &Shell, chain: ChainConfig) -> anyhow::Result<()> { let spinner = Spinner::new(MSG_STARTING_GENESIS_SPINNER); - run_server_genesis(&chain_config, shell)?; + run_server_genesis(&chain, shell)?; spinner.finish(); logger::outro(MSG_GENESIS_COMPLETED); Ok(()) } -pub fn run_server_genesis(chain_config: &ChainConfig, shell: &Shell) -> anyhow::Result<()> { - let server = Server::new(None, chain_config.link_to_code.clone(), false); +pub fn run_server_genesis(chain: &ChainConfig, shell: &Shell) -> anyhow::Result<()> { + let server = Server::new(None, chain.link_to_code.clone(), false); server .run( shell, ServerMode::Genesis, - GenesisConfig::get_path_with_base_path(&chain_config.configs), - WalletsConfig::get_path_with_base_path(&chain_config.configs), - GeneralConfig::get_path_with_base_path(&chain_config.configs), - SecretsConfig::get_path_with_base_path(&chain_config.configs), - ContractsConfig::get_path_with_base_path(&chain_config.configs), + GenesisConfig::get_path_with_base_path(&chain.configs), + WalletsConfig::get_path_with_base_path(&chain.configs), + GeneralConfig::get_path_with_base_path(&chain.configs), + SecretsConfig::get_path_with_base_path(&chain.configs), + ContractsConfig::get_path_with_base_path(&chain.configs), vec![], ) .context(MSG_FAILED_TO_RUN_SERVER_ERR) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs index 60129f850e03..239a05704b32 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs @@ -1,15 +1,20 @@ use ::common::forge::ForgeScriptArgs; +use anyhow::Context; pub(crate) use args::create::ChainCreateArgsFinal; use args::{build_transactions::BuildTransactionsArgs, run_server::RunServerArgs}; use clap::{command, Subcommand}; +use config::zkstack_config::ZkStackConfig; use consensus::ConsensusCommand; use contract_verifier::ContractVerifierCommands; pub(crate) use create::create_chain_inner; use xshell::Shell; -use crate::commands::chain::{ - args::create::ChainCreateArgs, deploy_l2_contracts::Deploy2ContractsOption, - genesis::GenesisCommand, init::ChainInitCommand, +use crate::{ + commands::chain::{ + args::create::ChainCreateArgs, deploy_l2_contracts::Deploy2ContractsOption, + genesis::GenesisCommand, init::ChainInitCommand, + }, + messages::MSG_CHAIN_NOT_FOUND_ERR, }; mod accept_chain_ownership; @@ -78,11 +83,17 @@ pub enum ChainCommands { } pub(crate) async fn run(shell: &Shell, cmd: ChainCommands) -> anyhow::Result<()> { + if let ChainCommands::Create(args) = cmd { + return create::run(args, shell); + } + + let chain = ZkStackConfig::load_current_chain(shell).context(MSG_CHAIN_NOT_FOUND_ERR)?; + match cmd { ChainCommands::Create(args) => create::run(args, shell), ChainCommands::Init(args) => init::run(*args, shell).await, ChainCommands::BuildTransactions(args) => build_transactions::run(args, shell).await, - ChainCommands::Genesis(args) => genesis::run(args, shell).await, + ChainCommands::Genesis(args) => genesis::run(args, shell, chain).await, ChainCommands::RegisterChain(args) => register_chain::run(args, shell).await, ChainCommands::DeployL2Contracts(args) => { deploy_l2_contracts::run(args, shell, Deploy2ContractsOption::All).await @@ -100,12 +111,12 @@ pub(crate) async fn run(shell: &Shell, cmd: ChainCommands) -> anyhow::Result<()> ChainCommands::InitializeBridges(args) => { deploy_l2_contracts::run(args, shell, Deploy2ContractsOption::InitiailizeBridges).await } - ChainCommands::DeployPaymaster(args) => deploy_paymaster::run(args, shell).await, + ChainCommands::DeployPaymaster(args) => deploy_paymaster::run(args, shell, chain).await, ChainCommands::UpdateTokenMultiplierSetter(args) => { set_token_multiplier_setter::run(args, shell).await } - ChainCommands::Server(args) => server::run(shell, args), - ChainCommands::ContractVerifier(args) => contract_verifier::run(shell, args).await, + ChainCommands::Server(args) => server::run(shell, args, chain), + ChainCommands::ContractVerifier(args) => contract_verifier::run(shell, args, chain).await, ChainCommands::Consensus(cmd) => cmd.run(shell).await, } } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/server.rs b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs index d01d00a1b7f7..a460ae0f5892 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/server.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs @@ -4,32 +4,24 @@ use common::{ server::{Server, ServerMode}, }; use config::{ - traits::FileConfigWithDefaultName, zkstack_config::ZkStackConfig, ChainConfig, ContractsConfig, - GeneralConfig, GenesisConfig, SecretsConfig, WalletsConfig, + traits::FileConfigWithDefaultName, ChainConfig, ContractsConfig, GeneralConfig, GenesisConfig, + SecretsConfig, WalletsConfig, }; use xshell::Shell; use super::args::run_server::RunServerArgs; use crate::messages::{MSG_FAILED_TO_RUN_SERVER_ERR, MSG_STARTING_SERVER}; -pub fn run(shell: &Shell, args: RunServerArgs) -> anyhow::Result<()> { - let chain_config = ZkStackConfig::load_current_chain(shell)?; - +pub fn run(shell: &Shell, args: RunServerArgs, chain: ChainConfig) -> anyhow::Result<()> { logger::info(MSG_STARTING_SERVER); - - run_server(args, &chain_config, shell)?; - + run_server(args, &chain, shell)?; Ok(()) } -fn run_server( - args: RunServerArgs, - chain_config: &ChainConfig, - shell: &Shell, -) -> anyhow::Result<()> { +fn run_server(args: RunServerArgs, chain: &ChainConfig, shell: &Shell) -> anyhow::Result<()> { let server = Server::new( args.components.clone(), - chain_config.link_to_code.clone(), + chain.link_to_code.clone(), args.uring, ); @@ -47,11 +39,11 @@ fn run_server( .run( shell, mode, - GenesisConfig::get_path_with_base_path(&chain_config.configs), - WalletsConfig::get_path_with_base_path(&chain_config.configs), - GeneralConfig::get_path_with_base_path(&chain_config.configs), - SecretsConfig::get_path_with_base_path(&chain_config.configs), - ContractsConfig::get_path_with_base_path(&chain_config.configs), + GenesisConfig::get_path_with_base_path(&chain.configs), + WalletsConfig::get_path_with_base_path(&chain.configs), + GeneralConfig::get_path_with_base_path(&chain.configs), + SecretsConfig::get_path_with_base_path(&chain.configs), + ContractsConfig::get_path_with_base_path(&chain.configs), vec![], ) .context(MSG_FAILED_TO_RUN_SERVER_ERR) From 18403f15ed4f4b67dd93cb6064a6c0435c24c972 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Thu, 7 Nov 2024 15:51:10 -0300 Subject: [PATCH 25/38] Add ChainConfig::from_internal --- zkstack_cli/crates/config/src/chain.rs | 34 ++++++++++++++++++- .../crates/config/src/zkstack_config.rs | 31 +---------------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/zkstack_cli/crates/config/src/chain.rs b/zkstack_cli/crates/config/src/chain.rs index 150745b4ce64..fc472b78e318 100644 --- a/zkstack_cli/crates/config/src/chain.rs +++ b/zkstack_cli/crates/config/src/chain.rs @@ -3,7 +3,7 @@ use std::{ path::{Path, PathBuf}, }; -use anyhow::bail; +use anyhow::{bail, Context}; use serde::{Deserialize, Serialize, Serializer}; use types::{BaseToken, L1BatchCommitmentMode, L1Network, ProverMode, WalletCreation}; use xshell::Shell; @@ -170,6 +170,38 @@ impl ChainConfig { evm_emulator: self.evm_emulator, } } + + pub fn from_internal( + chain_internal: ChainConfigInternal, + shell: Shell, + ) -> anyhow::Result { + let l1_network = chain_internal.l1_network.context("L1 Network not found")?; + let link_to_code = chain_internal + .link_to_code + .context("Link to code not found")?; + let artifacts = chain_internal + .artifacts_path + .context("Artifacts path not found")?; + + Ok(Self { + id: chain_internal.id, + name: chain_internal.name, + chain_id: chain_internal.chain_id, + prover_version: chain_internal.prover_version, + configs: chain_internal.configs, + rocks_db_path: chain_internal.rocks_db_path, + external_node_config_path: chain_internal.external_node_config_path, + l1_network, + l1_batch_commit_data_generator_mode: chain_internal.l1_batch_commit_data_generator_mode, + base_token: chain_internal.base_token, + wallet_creation: chain_internal.wallet_creation, + legacy_bridge: chain_internal.legacy_bridge, + link_to_code, + artifacts, + evm_emulator: chain_internal.evm_emulator, + shell: shell.into(), + }) + } } impl ChainConfigInternal { diff --git a/zkstack_cli/crates/config/src/zkstack_config.rs b/zkstack_cli/crates/config/src/zkstack_config.rs index 7e31df0d24d3..99c7360f4cc2 100644 --- a/zkstack_cli/crates/config/src/zkstack_config.rs +++ b/zkstack_cli/crates/config/src/zkstack_config.rs @@ -1,4 +1,3 @@ -use anyhow::Context; use xshell::Shell; use crate::{ChainConfig, ChainConfigInternal, EcosystemConfig}; @@ -14,35 +13,7 @@ impl ZkStackConfig { Ok(ZkStackConfig::EcosystemConfig(ecosystem)) } else { let chain_internal = ChainConfigInternal::from_file(shell)?; - - let l1_network = chain_internal.l1_network.context("L1 Network not found")?; - let link_to_code = chain_internal - .link_to_code - .context("Link to code not found")?; - let artifacts = chain_internal - .artifacts_path - .context("Artifacts path not found")?; - - let chain = ChainConfig { - id: chain_internal.id, - name: chain_internal.name, - chain_id: chain_internal.chain_id, - prover_version: chain_internal.prover_version, - configs: chain_internal.configs, - rocks_db_path: chain_internal.rocks_db_path, - external_node_config_path: chain_internal.external_node_config_path, - l1_network, - l1_batch_commit_data_generator_mode: chain_internal - .l1_batch_commit_data_generator_mode, - base_token: chain_internal.base_token, - wallet_creation: chain_internal.wallet_creation, - legacy_bridge: chain_internal.legacy_bridge, - link_to_code, - artifacts, - evm_emulator: chain_internal.evm_emulator, - shell: shell.clone().into(), - }; - + let chain = ChainConfig::from_internal(chain_internal, shell.clone())?; Ok(ZkStackConfig::ChainConfig(chain)) } } From bf1f8da46320e9e4cc98ed9ff6d8d4a91601bf11 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 11 Nov 2024 07:54:50 -0300 Subject: [PATCH 26/38] Rename ZkStackConfig::load_current_chain to current_chain --- zkstack_cli/crates/config/src/zkstack_config.rs | 2 +- zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs | 2 +- zkstack_cli/crates/zkstack/src/commands/chain/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zkstack_cli/crates/config/src/zkstack_config.rs b/zkstack_cli/crates/config/src/zkstack_config.rs index 99c7360f4cc2..852fcad86d3d 100644 --- a/zkstack_cli/crates/config/src/zkstack_config.rs +++ b/zkstack_cli/crates/config/src/zkstack_config.rs @@ -18,7 +18,7 @@ impl ZkStackConfig { } } - pub fn load_current_chain(shell: &Shell) -> anyhow::Result { + pub fn current_chain(shell: &Shell) -> anyhow::Result { match ZkStackConfig::from_file(shell)? { ZkStackConfig::EcosystemConfig(ecosystem) => ecosystem.load_current_chain(), ZkStackConfig::ChainConfig(chain) => Ok(chain), diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs index d8ca6762def7..e4e668b7d6a1 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/consensus/mod.rs @@ -193,7 +193,7 @@ impl Setup { } fn new(shell: &Shell) -> anyhow::Result { - let chain = ZkStackConfig::load_current_chain(shell)?; + let chain = ZkStackConfig::current_chain(shell)?; let contracts = chain .get_contracts_config() .context("get_contracts_config()")?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs index 239a05704b32..6645f533f55c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs @@ -87,7 +87,7 @@ pub(crate) async fn run(shell: &Shell, cmd: ChainCommands) -> anyhow::Result<()> return create::run(args, shell); } - let chain = ZkStackConfig::load_current_chain(shell).context(MSG_CHAIN_NOT_FOUND_ERR)?; + let chain = ZkStackConfig::current_chain(shell).context(MSG_CHAIN_NOT_FOUND_ERR)?; match cmd { ChainCommands::Create(args) => create::run(args, shell), From b2d73882587fdd60e3505e397aeb1c13b89f3878 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 11 Nov 2024 08:01:19 -0300 Subject: [PATCH 27/38] Add ZkStackConfig::ecosystem --- zkstack_cli/crates/config/src/zkstack_config.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zkstack_cli/crates/config/src/zkstack_config.rs b/zkstack_cli/crates/config/src/zkstack_config.rs index 852fcad86d3d..fabb3c5c4d68 100644 --- a/zkstack_cli/crates/config/src/zkstack_config.rs +++ b/zkstack_cli/crates/config/src/zkstack_config.rs @@ -1,3 +1,4 @@ +use anyhow::bail; use xshell::Shell; use crate::{ChainConfig, ChainConfigInternal, EcosystemConfig}; @@ -24,4 +25,13 @@ impl ZkStackConfig { ZkStackConfig::ChainConfig(chain) => Ok(chain), } } + + pub fn ecosystem(shell: &Shell) -> anyhow::Result { + match ZkStackConfig::from_file(shell)? { + ZkStackConfig::EcosystemConfig(ecosystem) => Ok(ecosystem), + ZkStackConfig::ChainConfig(_) => { + bail!("Expected Ecosystem configuration, but found Chain configuration. Please run this command in an Ecosystem directory.") + } + } + } } From 6406717e65db22305e6f3dc13b06d35f1842db39 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 11 Nov 2024 09:05:30 -0300 Subject: [PATCH 28/38] Make EcosystemConfig::from_file private --- zkstack_cli/crates/config/src/ecosystem.rs | 2 +- zkstack_cli/crates/config/src/zkstack_config.rs | 8 +++----- .../commands/chain/accept_chain_ownership.rs | 4 ++-- .../src/commands/chain/build_transactions.rs | 5 +++-- .../crates/zkstack/src/commands/chain/create.rs | 6 +++--- .../src/commands/chain/deploy_l2_contracts.rs | 3 ++- .../zkstack/src/commands/chain/init/configs.rs | 4 ++-- .../zkstack/src/commands/chain/init/mod.rs | 6 ++++-- .../src/commands/chain/register_chain.rs | 3 ++- .../chain/set_token_multiplier_setter.rs | 7 +++++-- .../crates/zkstack/src/commands/containers.rs | 7 +++++-- .../src/commands/dev/commands/clean/mod.rs | 4 ++-- .../src/commands/dev/commands/config_writer.rs | 4 ++-- .../src/commands/dev/commands/contracts.rs | 4 ++-- .../dev/commands/database/check_sqlx_data.rs | 4 ++-- .../commands/dev/commands/database/migrate.rs | 4 ++-- .../dev/commands/database/new_migration.rs | 4 ++-- .../commands/dev/commands/database/prepare.rs | 4 ++-- .../src/commands/dev/commands/database/reset.rs | 4 ++-- .../src/commands/dev/commands/database/setup.rs | 4 ++-- .../zkstack/src/commands/dev/commands/fmt.rs | 6 +++--- .../src/commands/dev/commands/genesis.rs | 4 ++-- .../zkstack/src/commands/dev/commands/lint.rs | 4 ++-- .../src/commands/dev/commands/prover/info.rs | 4 ++-- .../dev/commands/prover/insert_batch.rs | 4 ++-- .../dev/commands/prover/insert_version.rs | 4 ++-- .../dev/commands/send_transactions/mod.rs | 4 ++-- .../src/commands/dev/commands/snapshot.rs | 4 ++-- .../src/commands/dev/commands/status/args.rs | 4 ++-- .../src/commands/dev/commands/test/build.rs | 4 ++-- .../src/commands/dev/commands/test/fees.rs | 4 ++-- .../commands/dev/commands/test/integration.rs | 4 ++-- .../commands/dev/commands/test/l1_contracts.rs | 4 ++-- .../src/commands/dev/commands/test/loadtest.rs | 4 ++-- .../src/commands/dev/commands/test/prover.rs | 4 ++-- .../src/commands/dev/commands/test/recovery.rs | 4 ++-- .../src/commands/dev/commands/test/revert.rs | 4 ++-- .../src/commands/dev/commands/test/rust.rs | 4 ++-- .../src/commands/dev/commands/test/upgrade.rs | 4 ++-- .../src/commands/dev/commands/test/wallet.rs | 4 ++-- .../crates/zkstack/src/commands/dev/dals.rs | 4 ++-- .../crates/zkstack/src/commands/dev/mod.rs | 2 +- .../commands/ecosystem/build_transactions.rs | 4 ++-- .../src/commands/ecosystem/change_default.rs | 4 ++-- .../zkstack/src/commands/ecosystem/create.rs | 17 +++++++++++------ .../zkstack/src/commands/ecosystem/init.rs | 3 ++- .../zkstack/src/commands/explorer/backend.rs | 4 ++-- .../zkstack/src/commands/explorer/init.rs | 5 +++-- .../crates/zkstack/src/commands/explorer/run.rs | 4 ++-- .../zkstack/src/commands/external_node/init.rs | 6 ++++-- .../commands/external_node/prepare_configs.rs | 5 +++-- .../zkstack/src/commands/external_node/run.rs | 4 ++-- .../crates/zkstack/src/commands/portal.rs | 3 ++- .../src/commands/prover/compressor_keys.rs | 4 ++-- .../crates/zkstack/src/commands/prover/init.rs | 6 +++--- .../src/commands/prover/init_bellman_cuda.rs | 4 ++-- .../crates/zkstack/src/commands/prover/run.rs | 4 ++-- .../zkstack/src/commands/prover/setup_keys.rs | 4 ++-- .../crates/zkstack/src/commands/update.rs | 6 +++--- zkstack_cli/crates/zkstack/src/main.rs | 4 ++-- zkstack_cli/crates/zkstack/src/utils/ports.rs | 6 +++--- 61 files changed, 148 insertions(+), 128 deletions(-) diff --git a/zkstack_cli/crates/config/src/ecosystem.rs b/zkstack_cli/crates/config/src/ecosystem.rs index 9b9a15a80a39..fc3a2c5b71f9 100644 --- a/zkstack_cli/crates/config/src/ecosystem.rs +++ b/zkstack_cli/crates/config/src/ecosystem.rs @@ -104,7 +104,7 @@ impl EcosystemConfig { self.shell.get().expect("Must be initialized") } - pub fn from_file(shell: &Shell) -> Result { + pub(crate) fn from_file(shell: &Shell) -> Result { let Ok(path) = find_file(shell, shell.current_dir(), CONFIG_NAME) else { return Err(EcosystemConfigFromFileError::NotExists { path: shell.current_dir(), diff --git a/zkstack_cli/crates/config/src/zkstack_config.rs b/zkstack_cli/crates/config/src/zkstack_config.rs index fabb3c5c4d68..041575e945f2 100644 --- a/zkstack_cli/crates/config/src/zkstack_config.rs +++ b/zkstack_cli/crates/config/src/zkstack_config.rs @@ -27,11 +27,9 @@ impl ZkStackConfig { } pub fn ecosystem(shell: &Shell) -> anyhow::Result { - match ZkStackConfig::from_file(shell)? { - ZkStackConfig::EcosystemConfig(ecosystem) => Ok(ecosystem), - ZkStackConfig::ChainConfig(_) => { - bail!("Expected Ecosystem configuration, but found Chain configuration. Please run this command in an Ecosystem directory.") - } + match EcosystemConfig::from_file(shell) { + Ok(ecosystem) => Ok(ecosystem), + Err(e) => bail!(e), } } } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs b/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs index cf3e2981b3c7..2ecb80b1fed6 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs @@ -1,6 +1,6 @@ use anyhow::Context; use common::{forge::ForgeScriptArgs, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::Shell; use crate::{ @@ -12,7 +12,7 @@ use crate::{ }; pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_INITIALIZED)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs b/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs index d3953c656596..5af70ec176e9 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs @@ -1,7 +1,8 @@ use anyhow::Context; use common::{git, logger, spinner::Spinner}; use config::{ - copy_configs, traits::SaveConfigWithBasePath, update_from_chain_config, EcosystemConfig, + copy_configs, traits::SaveConfigWithBasePath, update_from_chain_config, + zkstack_config::ZkStackConfig, }; use ethers::utils::hex::ToHex; use xshell::Shell; @@ -27,7 +28,7 @@ const SCRIPT_CONFIG_FILE_SRC: &str = const SCRIPT_CONFIG_FILE_DST: &str = "register-hyperchain.toml"; pub(crate) async fn run(args: BuildTransactionsArgs, shell: &Shell) -> anyhow::Result<()> { - let config = EcosystemConfig::from_file(shell)?; + let config = ZkStackConfig::ecosystem(shell)?; let chain_config = config .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/create.rs b/zkstack_cli/crates/zkstack/src/commands/chain/create.rs index bdf5711e3213..1ed218fed851 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/create.rs @@ -3,8 +3,8 @@ use std::cell::OnceCell; use anyhow::Context; use common::{logger, spinner::Spinner}; use config::{ - create_local_configs_dir, create_wallets, traits::SaveConfigWithBasePath, ChainConfig, - EcosystemConfig, + create_local_configs_dir, create_wallets, traits::SaveConfigWithBasePath, + zkstack_config::ZkStackConfig, ChainConfig, EcosystemConfig, }; use xshell::Shell; use zksync_basic_types::L2ChainId; @@ -18,7 +18,7 @@ use crate::{ }; pub fn run(args: ChainCreateArgs, shell: &Shell) -> anyhow::Result<()> { - let mut ecosystem_config = EcosystemConfig::from_file(shell)?; + let mut ecosystem_config = ZkStackConfig::ecosystem(shell)?; create(args, &mut ecosystem_config, shell) } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs index 091bef86d26d..874dc9bf6a16 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs @@ -18,6 +18,7 @@ use config::{ script_params::DEPLOY_L2_CONTRACTS_SCRIPT_PARAMS, }, traits::{ReadConfig, SaveConfig, SaveConfigWithBasePath}, + zkstack_config::ZkStackConfig, ChainConfig, ContractsConfig, EcosystemConfig, }; use xshell::Shell; @@ -43,7 +44,7 @@ pub async fn run( shell: &Shell, deploy_option: Deploy2ContractsOption, ) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_INITIALIZED)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs b/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs index 31c5c681e7d3..83873ecffc0c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs @@ -2,7 +2,7 @@ use anyhow::Context; use common::logger; use config::{ copy_configs, set_l1_rpc_url, traits::SaveConfigWithBasePath, update_from_chain_config, - ChainConfig, ContractsConfig, EcosystemConfig, + zkstack_config::ZkStackConfig, ChainConfig, ContractsConfig, EcosystemConfig, }; use ethers::types::Address; use xshell::Shell; @@ -26,7 +26,7 @@ use crate::{ }; pub async fn run(args: InitConfigsArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; 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 d92c56d2eb10..5759e7783f14 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs @@ -1,7 +1,9 @@ use anyhow::Context; use clap::{command, Parser, Subcommand}; use common::{git, logger, spinner::Spinner}; -use config::{traits::SaveConfigWithBasePath, ChainConfig, EcosystemConfig}; +use config::{ + traits::SaveConfigWithBasePath, zkstack_config::ZkStackConfig, ChainConfig, EcosystemConfig, +}; use types::BaseToken; use xshell::Shell; @@ -54,7 +56,7 @@ pub(crate) async fn run(args: ChainInitCommand, shell: &Shell) -> anyhow::Result } async fn run_init(args: InitArgs, shell: &Shell) -> anyhow::Result<()> { - let config = EcosystemConfig::from_file(shell)?; + let config = ZkStackConfig::ecosystem(shell)?; let chain_config = config .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs b/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs index 65ee05a1ea5f..08a38fdf9018 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs @@ -10,6 +10,7 @@ use config::{ script_params::REGISTER_CHAIN_SCRIPT_PARAMS, }, traits::{ReadConfig, SaveConfig, SaveConfigWithBasePath}, + zkstack_config::ZkStackConfig, ChainConfig, ContractsConfig, EcosystemConfig, }; use xshell::Shell; @@ -23,7 +24,7 @@ use crate::{ }; pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_INITIALIZED)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs b/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs index 4a6cd31b2c0a..36ddc4b6f07a 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs @@ -5,7 +5,10 @@ use common::{ spinner::Spinner, wallets::Wallet, }; -use config::{forge_interface::script_params::ACCEPT_GOVERNANCE_SCRIPT_PARAMS, EcosystemConfig}; +use config::{ + forge_interface::script_params::ACCEPT_GOVERNANCE_SCRIPT_PARAMS, zkstack_config::ZkStackConfig, + EcosystemConfig, +}; use ethers::{abi::parse_abi, contract::BaseContract, utils::hex}; use lazy_static::lazy_static; use xshell::Shell; @@ -30,7 +33,7 @@ lazy_static! { } pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_INITIALIZED)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/containers.rs b/zkstack_cli/crates/zkstack/src/commands/containers.rs index 8367289bd67f..9c83f7010e49 100644 --- a/zkstack_cli/crates/zkstack/src/commands/containers.rs +++ b/zkstack_cli/crates/zkstack/src/commands/containers.rs @@ -2,7 +2,10 @@ use std::path::PathBuf; use anyhow::{anyhow, Context}; use common::{docker, logger, spinner::Spinner}; -use config::{EcosystemConfig, DOCKER_COMPOSE_FILE, ERA_OBSERVABILITY_COMPOSE_FILE}; +use config::{ + zkstack_config::ZkStackConfig, EcosystemConfig, DOCKER_COMPOSE_FILE, + ERA_OBSERVABILITY_COMPOSE_FILE, +}; use xshell::Shell; use super::args::ContainersArgs; @@ -17,7 +20,7 @@ use crate::{ pub fn run(shell: &Shell, args: ContainersArgs) -> anyhow::Result<()> { let args = args.fill_values_with_prompt(); - let ecosystem = EcosystemConfig::from_file(shell).context(MSG_FAILED_TO_FIND_ECOSYSTEM_ERR)?; + let ecosystem = ZkStackConfig::ecosystem(shell).context(MSG_FAILED_TO_FIND_ECOSYSTEM_ERR)?; initialize_docker(shell, &ecosystem)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/clean/mod.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/clean/mod.rs index 0929f5e4623f..c6793be5ada5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/clean/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/clean/mod.rs @@ -1,7 +1,7 @@ use anyhow::Context; use clap::Subcommand; use common::{docker, logger}; -use config::{EcosystemConfig, DOCKER_COMPOSE_FILE}; +use config::{zkstack_config::ZkStackConfig, EcosystemConfig, DOCKER_COMPOSE_FILE}; use xshell::Shell; use crate::commands::dev::messages::{ @@ -19,7 +19,7 @@ pub enum CleanCommands { } pub fn run(shell: &Shell, args: CleanCommands) -> anyhow::Result<()> { - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; match args { CleanCommands::All => { containers(shell)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/config_writer.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/config_writer.rs index 70238ed15f32..55dc74e52969 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/config_writer.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/config_writer.rs @@ -1,7 +1,7 @@ use anyhow::Context; use clap::Parser; use common::{logger, Prompt}; -use config::{override_config, EcosystemConfig}; +use config::{override_config, zkstack_config::ZkStackConfig}; use xshell::Shell; use crate::commands::dev::messages::{ @@ -24,7 +24,7 @@ impl ConfigWriterArgs { pub fn run(shell: &Shell, args: ConfigWriterArgs) -> anyhow::Result<()> { let path = args.get_config_path().into(); - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; let chain = ecosystem .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/contracts.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/contracts.rs index fbafaec09e6e..ac908550bd39 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/contracts.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/contracts.rs @@ -8,7 +8,7 @@ use common::{ logger, spinner::Spinner, }; -use config::EcosystemConfig; +use config::{zkstack_config::ZkStackConfig, EcosystemConfig}; use xshell::Shell; use crate::commands::dev::messages::{ @@ -121,7 +121,7 @@ pub fn run(shell: &Shell, args: ContractsArgs) -> anyhow::Result<()> { logger::info(MSG_BUILDING_CONTRACTS); - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; contracts .iter() diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/check_sqlx_data.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/check_sqlx_data.rs index 990fca78641f..cea8efd7f67f 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/check_sqlx_data.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/check_sqlx_data.rs @@ -1,7 +1,7 @@ use std::path::Path; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use super::args::DatabaseCommonArgs; @@ -21,7 +21,7 @@ pub fn run(shell: &Shell, args: DatabaseCommonArgs) -> anyhow::Result<()> { return Ok(()); } - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; logger::info(msg_database_info(MSG_DATABASE_CHECK_SQLX_DATA_GERUND)); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/migrate.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/migrate.rs index fd22f769742e..c502305d83a9 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/migrate.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/migrate.rs @@ -1,7 +1,7 @@ use std::path::Path; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use super::args::DatabaseCommonArgs; @@ -21,7 +21,7 @@ pub fn run(shell: &Shell, args: DatabaseCommonArgs) -> anyhow::Result<()> { } logger::info(msg_database_info(MSG_DATABASE_MIGRATE_GERUND)); - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let dals = get_dals(shell, &args.selected_dals, &args.urls)?; for dal in dals { diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/new_migration.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/new_migration.rs index 2d9fa1030538..aa44b670e0bb 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/new_migration.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/new_migration.rs @@ -1,7 +1,7 @@ use std::path::Path; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use super::args::new_migration::{DatabaseNewMigrationArgs, SelectedDatabase}; @@ -17,7 +17,7 @@ pub fn run(shell: &Shell, args: DatabaseNewMigrationArgs) -> anyhow::Result<()> SelectedDatabase::Core => get_core_dal(shell, None)?, SelectedDatabase::Prover => get_prover_dal(shell, None)?, }; - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; generate_migration(shell, ecosystem_config.link_to_code, dal, args.name)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/prepare.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/prepare.rs index 288a68452fd5..4f792a886806 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/prepare.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/prepare.rs @@ -1,7 +1,7 @@ use std::path::Path; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use super::args::DatabaseCommonArgs; @@ -20,7 +20,7 @@ pub fn run(shell: &Shell, args: DatabaseCommonArgs) -> anyhow::Result<()> { return Ok(()); } - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; logger::info(msg_database_info(MSG_DATABASE_PREPARE_GERUND)); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/reset.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/reset.rs index 55d5ab1cbfcb..a38ce3a41afd 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/reset.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/reset.rs @@ -1,7 +1,7 @@ use std::path::Path; use common::logger; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::Shell; use super::{args::DatabaseCommonArgs, drop::drop_database, setup::setup_database}; @@ -20,7 +20,7 @@ pub async fn run(shell: &Shell, args: DatabaseCommonArgs) -> anyhow::Result<()> return Ok(()); } - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; logger::info(msg_database_info(MSG_DATABASE_RESET_GERUND)); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/setup.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/setup.rs index 74ade66ba481..3dd4b8be4b83 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/setup.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/setup.rs @@ -1,7 +1,7 @@ use std::path::Path; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use super::args::DatabaseCommonArgs; @@ -20,7 +20,7 @@ pub fn run(shell: &Shell, args: DatabaseCommonArgs) -> anyhow::Result<()> { return Ok(()); } - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; logger::info(msg_database_info(MSG_DATABASE_SETUP_GERUND)); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/fmt.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/fmt.rs index ebaf27845e0a..2e4acf285970 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/fmt.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/fmt.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; use clap::Parser; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use super::sql_fmt::format_sql; @@ -83,8 +83,8 @@ pub struct FmtArgs { pub formatter: Option, } -pub async fn run(shell: Shell, args: FmtArgs) -> anyhow::Result<()> { - let ecosystem = EcosystemConfig::from_file(&shell)?; +pub async fn run(shell: &Shell, args: FmtArgs) -> anyhow::Result<()> { + let ecosystem = ZkStackConfig::ecosystem(shell)?; match args.formatter { None => { let mut tasks = vec![]; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/genesis.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/genesis.rs index 683ffe199161..6d0b328f2f4b 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/genesis.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/genesis.rs @@ -1,6 +1,6 @@ use anyhow::Context; use common::{cmd::Cmd, spinner::Spinner}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use crate::{ @@ -12,7 +12,7 @@ use crate::{ }; pub(crate) async fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; let chain = ecosystem .load_chain(Some(ecosystem.current_chain().to_string())) .context(MSG_CHAIN_NOT_FOUND_ERR)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/lint.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/lint.rs index 04955726706f..18bb15823e49 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/lint.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/lint.rs @@ -7,7 +7,7 @@ use std::{ use anyhow::{bail, Context}; use clap::Parser; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::{zkstack_config::ZkStackConfig, EcosystemConfig}; use xshell::{cmd, Shell}; use crate::commands::{ @@ -49,7 +49,7 @@ pub fn run(shell: &Shell, args: LintArgs) -> anyhow::Result<()> { logger::info(msg_running_linters_for_files(&targets)); - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; for target in targets { match target { diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/info.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/info.rs index 84873e931b3e..a87632416fc6 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/info.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/info.rs @@ -5,13 +5,13 @@ use std::{ use anyhow::Context as _; use common::logger; -use config::{ChainConfig, EcosystemConfig}; +use config::{zkstack_config::ZkStackConfig, ChainConfig}; use xshell::{cmd, Shell}; use crate::commands::dev::messages::MSG_CHAIN_NOT_FOUND_ERR; pub async fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .expect(MSG_CHAIN_NOT_FOUND_ERR); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_batch.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_batch.rs index 0e0c0ba33af4..d9ae27cd700b 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_batch.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_batch.rs @@ -1,5 +1,5 @@ use common::{check_prerequisites, cmd::Cmd, logger, PROVER_CLI_PREREQUISITE}; -use config::{get_link_to_prover, EcosystemConfig}; +use config::{get_link_to_prover, zkstack_config::ZkStackConfig}; use xshell::{cmd, Shell}; use crate::commands::dev::{ @@ -13,7 +13,7 @@ use crate::commands::dev::{ pub async fn run(shell: &Shell, args: InsertBatchArgs) -> anyhow::Result<()> { check_prerequisites(shell, &PROVER_CLI_PREREQUISITE, false); - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .expect(MSG_CHAIN_NOT_FOUND_ERR); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_version.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_version.rs index f7bd175f577a..6dd2b029c26e 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_version.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_version.rs @@ -1,5 +1,5 @@ use common::{check_prerequisites, cmd::Cmd, logger, PROVER_CLI_PREREQUISITE}; -use config::{get_link_to_prover, EcosystemConfig}; +use config::{get_link_to_prover, zkstack_config::ZkStackConfig}; use xshell::{cmd, Shell}; use crate::commands::dev::{ @@ -13,7 +13,7 @@ use crate::commands::dev::{ pub async fn run(shell: &Shell, args: InsertVersionArgs) -> anyhow::Result<()> { check_prerequisites(shell, &PROVER_CLI_PREREQUISITE, false); - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .expect(MSG_CHAIN_NOT_FOUND_ERR); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/mod.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/mod.rs index 2f54579ade9e..a58d331afcc5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/mod.rs @@ -10,7 +10,7 @@ use anyhow::Context; use args::SendTransactionsArgs; use chrono::Local; use common::{ethereum::create_ethers_client, logger}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use ethers::{abi::Bytes, providers::Middleware, types::TransactionRequest, utils::hex}; use serde::Deserialize; use tokio::time::sleep; @@ -52,7 +52,7 @@ struct Txns { pub async fn run(shell: &Shell, args: SendTransactionsArgs) -> anyhow::Result<()> { let args = args.fill_values_with_prompt(); - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_id = ecosystem_config.l1_network.chain_id(); // Read the JSON file diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/snapshot.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/snapshot.rs index 8e4c7183cb55..22b370af7c65 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/snapshot.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/snapshot.rs @@ -1,7 +1,7 @@ use anyhow::Context; use clap::Subcommand; use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use crate::commands::dev::messages::{MSG_CHAIN_NOT_FOUND_ERR, MSG_RUNNING_SNAPSHOT_CREATOR}; @@ -22,7 +22,7 @@ pub(crate) async fn run(shell: &Shell, args: SnapshotCommands) -> anyhow::Result } async fn create(shell: &Shell) -> anyhow::Result<()> { - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; let chain = ecosystem .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/args.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/args.rs index 5ac52bf854a6..82535d76eaa5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/args.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/args.rs @@ -1,6 +1,6 @@ use anyhow::Context; use clap::Parser; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::Shell; use crate::{ @@ -29,7 +29,7 @@ impl StatusArgs { if let Some(url) = &self.url { Ok(url.clone()) } else { - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; let chain = ecosystem .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/build.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/build.rs index dea6a46bbef6..2cfe86ea8e8a 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/build.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/build.rs @@ -1,10 +1,10 @@ -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::Shell; use super::utils::{build_contracts, install_and_build_dependencies}; pub fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; install_and_build_dependencies(shell, &ecosystem_config)?; build_contracts(shell, &ecosystem_config)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/fees.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/fees.rs index e58a70e6b7cb..95a3d8f8b655 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/fees.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/fees.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; use anyhow::Context; use common::{cmd::Cmd, config::global_config, logger}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use super::{ @@ -18,7 +18,7 @@ use crate::commands::dev::{ }; pub async fn run(shell: &Shell, args: FeesArgs) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; shell.change_dir(ecosystem_config.link_to_code.join(TS_INTEGRATION_PATH)); let chain_config = ecosystem_config .load_current_chain() diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/integration.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/integration.rs index 8e9e421c2f4e..b7fc6d586f3d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/integration.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/integration.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; use anyhow::Context; use common::{cmd::Cmd, config::global_config, logger}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use super::{ @@ -18,7 +18,7 @@ use crate::commands::dev::messages::{ }; pub async fn run(shell: &Shell, args: IntegrationArgs) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/l1_contracts.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/l1_contracts.rs index 7d163daed671..18c103e129c2 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/l1_contracts.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/l1_contracts.rs @@ -1,11 +1,11 @@ use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use crate::commands::dev::messages::MSG_L1_CONTRACTS_TEST_SUCCESS; pub fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; let _dir_guard = shell.push_dir(&ecosystem.link_to_code); Cmd::new(cmd!(shell, "yarn l1-contracts test")) diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/loadtest.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/loadtest.rs index 72a8f97ff97d..2cdcf573db96 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/loadtest.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/loadtest.rs @@ -1,12 +1,12 @@ use anyhow::Context; use common::{cmd::Cmd, config::global_config, logger}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::{cmd, Shell}; use crate::commands::dev::messages::MSG_CHAIN_NOT_FOUND_ERR; pub fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/prover.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/prover.rs index 200baf57215c..4ac9f8254963 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/prover.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/prover.rs @@ -1,7 +1,7 @@ use std::str::FromStr; use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use url::Url; use xshell::{cmd, Shell}; @@ -13,7 +13,7 @@ use crate::commands::dev::{ }; pub async fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; let dals = vec![Dal { url: Url::from_str(TEST_DATABASE_PROVER_URL)?, path: PROVER_DAL_PATH.to_string(), diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/recovery.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/recovery.rs index ae889969fd2c..ce669c9336cf 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/recovery.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/recovery.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; use anyhow::Context; use common::{cmd::Cmd, logger, server::Server, spinner::Spinner}; -use config::EcosystemConfig; +use config::{zkstack_config::ZkStackConfig, EcosystemConfig}; use xshell::{cmd, Shell}; use super::{ @@ -17,7 +17,7 @@ use crate::commands::dev::messages::{ const RECOVERY_TESTS_PATH: &str = "core/tests/recovery-test"; pub async fn run(shell: &Shell, args: RecoveryArgs) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; shell.change_dir(ecosystem_config.link_to_code.join(RECOVERY_TESTS_PATH)); logger::info(MSG_RECOVERY_TEST_RUN_INFO); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/revert.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/revert.rs index dc95c88db205..5358cf8e8b2c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/revert.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/revert.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; use anyhow::Context; use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::{zkstack_config::ZkStackConfig, EcosystemConfig}; use xshell::{cmd, Shell}; use super::{ @@ -17,7 +17,7 @@ use crate::commands::dev::messages::{ const REVERT_TESTS_PATH: &str = "core/tests/revert-test"; pub async fn run(shell: &Shell, args: RevertArgs) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; shell.change_dir(ecosystem_config.link_to_code.join(REVERT_TESTS_PATH)); logger::info(MSG_REVERT_TEST_RUN_INFO); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/rust.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/rust.rs index 8c0c707f6a2e..6f98b24cb301 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/rust.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/rust.rs @@ -2,7 +2,7 @@ use std::str::FromStr; use anyhow::Context; use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use url::Url; use xshell::{cmd, Shell}; @@ -18,7 +18,7 @@ use crate::commands::dev::{ }; pub async fn run(shell: &Shell, args: RustArgs) -> anyhow::Result<()> { - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; let chain = ecosystem .clone() .load_chain(Some(ecosystem.default_chain)) diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/upgrade.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/upgrade.rs index 707e0086ed15..c056521afd60 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/upgrade.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/upgrade.rs @@ -1,5 +1,5 @@ use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use config::{zkstack_config::ZkStackConfig, EcosystemConfig}; use xshell::{cmd, Shell}; use super::{args::upgrade::UpgradeArgs, utils::install_and_build_dependencies}; @@ -8,7 +8,7 @@ use crate::commands::dev::messages::{MSG_UPGRADE_TEST_RUN_INFO, MSG_UPGRADE_TEST const UPGRADE_TESTS_PATH: &str = "core/tests/upgrade-test"; pub fn run(shell: &Shell, args: UpgradeArgs) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; shell.change_dir(ecosystem_config.link_to_code.join(UPGRADE_TESTS_PATH)); logger::info(MSG_UPGRADE_TEST_RUN_INFO); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/wallet.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/wallet.rs index 6953014bf92b..4f23670484bd 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/wallet.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/wallet.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; use anyhow::Context; use common::logger; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::Shell; use super::utils::{TestWallets, TEST_WALLETS_PATH}; @@ -13,7 +13,7 @@ use crate::commands::dev::messages::{ pub fn run(shell: &Shell) -> anyhow::Result<()> { logger::info(MSG_TEST_WALLETS_INFO); - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/dals.rs b/zkstack_cli/crates/zkstack/src/commands/dev/dals.rs index 9626edfed732..fc2317f0a4f2 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/dals.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/dals.rs @@ -1,5 +1,5 @@ use anyhow::Context as _; -use config::{EcosystemConfig, SecretsConfig}; +use config::{zkstack_config::ZkStackConfig, SecretsConfig}; use url::Url; use xshell::Shell; @@ -88,7 +88,7 @@ pub fn get_core_dal(shell: &Shell, url: Option) -> anyhow::Result { } fn get_secrets(shell: &Shell) -> anyhow::Result { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/mod.rs b/zkstack_cli/crates/zkstack/src/commands/dev/mod.rs index 409c3a764eb1..e4dd486b010d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/mod.rs @@ -56,7 +56,7 @@ pub async fn run(shell: &Shell, args: DevCommands) -> anyhow::Result<()> { DevCommands::Clean(command) => commands::clean::run(shell, command)?, DevCommands::Snapshot(command) => commands::snapshot::run(shell, command).await?, DevCommands::Lint(args) => commands::lint::run(shell, args)?, - DevCommands::Fmt(args) => commands::fmt::run(shell.clone(), args).await?, + DevCommands::Fmt(args) => commands::fmt::run(shell, args).await?, DevCommands::Prover(command) => commands::prover::run(shell, command).await?, DevCommands::Contracts(args) => commands::contracts::run(shell, args)?, DevCommands::ConfigWriter(args) => commands::config_writer::run(shell, args)?, diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/build_transactions.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/build_transactions.rs index ff7132360972..8e3585dfb0b9 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/build_transactions.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/build_transactions.rs @@ -1,6 +1,6 @@ use anyhow::Context; use common::{git, logger, spinner::Spinner}; -use config::{traits::SaveConfigWithBasePath, EcosystemConfig}; +use config::{traits::SaveConfigWithBasePath, zkstack_config::ZkStackConfig}; use xshell::Shell; use super::{ @@ -24,7 +24,7 @@ const SCRIPT_CONFIG_FILE_DST: &str = "config-deploy-l1.toml"; pub async fn run(args: BuildTransactionsArgs, shell: &Shell) -> anyhow::Result<()> { let args = args.fill_values_with_prompt(); - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; git::submodule_update(shell, ecosystem_config.link_to_code.clone())?; diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/change_default.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/change_default.rs index 3bd392c0558d..d175c4c5f857 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/change_default.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/change_default.rs @@ -1,5 +1,5 @@ use common::PromptSelect; -use config::{traits::SaveConfigWithBasePath, EcosystemConfig}; +use config::{traits::SaveConfigWithBasePath, zkstack_config::ZkStackConfig}; use xshell::Shell; use crate::{ @@ -8,7 +8,7 @@ use crate::{ }; pub fn run(args: ChangeDefaultChain, shell: &Shell) -> anyhow::Result<()> { - let mut ecosystem_config = EcosystemConfig::from_file(shell)?; + let mut ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chains = ecosystem_config.list_of_chains(); let chain_name = args.name.unwrap_or_else(|| { diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs index 356b5322980f..6ca3df550f81 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs @@ -4,8 +4,8 @@ use anyhow::{bail, Context}; use common::{git, logger, spinner::Spinner}; use config::{ create_local_configs_dir, create_wallets, get_default_era_chain_id, - traits::SaveConfigWithBasePath, EcosystemConfig, EcosystemConfigFromFileError, - ZKSYNC_ERA_GIT_REPO, + traits::SaveConfigWithBasePath, zkstack_config::ZkStackConfig, EcosystemConfig, + EcosystemConfigFromFileError, ZKSYNC_ERA_GIT_REPO, }; use xshell::Shell; @@ -30,12 +30,17 @@ use crate::{ }; pub fn run(args: EcosystemCreateArgs, shell: &Shell) -> anyhow::Result<()> { - match EcosystemConfig::from_file(shell) { + match ZkStackConfig::ecosystem(shell) { Ok(_) => bail!(MSG_ECOSYSTEM_ALREADY_EXISTS_ERR), - Err(EcosystemConfigFromFileError::InvalidConfig { .. }) => { - bail!(MSG_ECOSYSTEM_CONFIG_INVALID_ERR) + Err(e) => { + if let Some(EcosystemConfigFromFileError::NotExists { .. }) = + e.downcast_ref::() + { + create(args, shell)?; + } else { + bail!(MSG_ECOSYSTEM_CONFIG_INVALID_ERR) + } } - Err(EcosystemConfigFromFileError::NotExists { .. }) => create(args, shell)?, }; Ok(()) diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs index 06b9b9161112..3c7e729e29b7 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs @@ -18,6 +18,7 @@ use config::{ script_params::DEPLOY_ERC20_SCRIPT_PARAMS, }, traits::{FileConfigWithDefaultName, ReadConfig, SaveConfig, SaveConfigWithBasePath}, + zkstack_config::ZkStackConfig, ContractsConfig, EcosystemConfig, }; use types::L1Network; @@ -47,7 +48,7 @@ use crate::{ }; pub async fn run(args: EcosystemInitArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; git::submodule_update(shell, ecosystem_config.link_to_code.clone())?; diff --git a/zkstack_cli/crates/zkstack/src/commands/explorer/backend.rs b/zkstack_cli/crates/zkstack/src/commands/explorer/backend.rs index 29cc2ecfbff0..b87c7db1f514 100644 --- a/zkstack_cli/crates/zkstack/src/commands/explorer/backend.rs +++ b/zkstack_cli/crates/zkstack/src/commands/explorer/backend.rs @@ -2,7 +2,7 @@ use std::path::Path; use anyhow::Context; use common::docker; -use config::{explorer_compose::ExplorerBackendComposeConfig, EcosystemConfig}; +use config::{explorer_compose::ExplorerBackendComposeConfig, zkstack_config::ZkStackConfig}; use xshell::Shell; use crate::messages::{ @@ -11,7 +11,7 @@ use crate::messages::{ }; pub(crate) fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/explorer/init.rs b/zkstack_cli/crates/zkstack/src/commands/explorer/init.rs index 096c45da5d8f..fae81a849508 100644 --- a/zkstack_cli/crates/zkstack/src/commands/explorer/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/explorer/init.rs @@ -4,7 +4,8 @@ use config::{ explorer::{ExplorerChainConfig, ExplorerConfig}, explorer_compose::{ExplorerBackendComposeConfig, ExplorerBackendConfig, ExplorerBackendPorts}, traits::{ConfigWithL2RpcUrl, SaveConfig}, - ChainConfig, EcosystemConfig, + zkstack_config::ZkStackConfig, + ChainConfig, }; use slugify_rs::slugify; use url::Url; @@ -22,7 +23,7 @@ use crate::{ }; pub(crate) async fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; // If specific chain is provided, initialize only that chain; otherwise, initialize all chains let chains_enabled = match global_config().chain_name { Some(ref chain_name) => vec![chain_name.clone()], diff --git a/zkstack_cli/crates/zkstack/src/commands/explorer/run.rs b/zkstack_cli/crates/zkstack/src/commands/explorer/run.rs index a6519f62edba..84a2a8b4e772 100644 --- a/zkstack_cli/crates/zkstack/src/commands/explorer/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/explorer/run.rs @@ -2,7 +2,7 @@ use std::path::Path; use anyhow::Context; use common::{config::global_config, docker, logger}; -use config::{explorer::*, traits::SaveConfig, AppsEcosystemConfig, EcosystemConfig}; +use config::{explorer::*, traits::SaveConfig, zkstack_config::ZkStackConfig, AppsEcosystemConfig}; use xshell::Shell; use crate::{ @@ -15,7 +15,7 @@ use crate::{ }; pub(crate) fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let ecosystem_path = shell.current_dir(); // Get ecosystem level apps.yaml config let apps_config = AppsEcosystemConfig::read_or_create_default(shell)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/external_node/init.rs b/zkstack_cli/crates/zkstack/src/commands/external_node/init.rs index 184151764961..282e951c6ef3 100644 --- a/zkstack_cli/crates/zkstack/src/commands/external_node/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/external_node/init.rs @@ -3,7 +3,9 @@ use common::{ db::{drop_db_if_exists, init_db, migrate_db, DatabaseConfig}, spinner::Spinner, }; -use config::{traits::ReadConfigWithBasePath, ChainConfig, EcosystemConfig, SecretsConfig}; +use config::{ + traits::ReadConfigWithBasePath, zkstack_config::ZkStackConfig, ChainConfig, SecretsConfig, +}; use xshell::Shell; use crate::{ @@ -17,7 +19,7 @@ use crate::{ }; pub async fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() diff --git a/zkstack_cli/crates/zkstack/src/commands/external_node/prepare_configs.rs b/zkstack_cli/crates/zkstack/src/commands/external_node/prepare_configs.rs index d714a0f8e843..519c42ad9fd6 100644 --- a/zkstack_cli/crates/zkstack/src/commands/external_node/prepare_configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/external_node/prepare_configs.rs @@ -6,7 +6,8 @@ use config::{ external_node::ENConfig, set_rocks_db_config, traits::{FileConfigWithDefaultName, SaveConfigWithBasePath}, - ChainConfig, EcosystemConfig, GeneralConfig, SecretsConfig, + zkstack_config::ZkStackConfig, + ChainConfig, GeneralConfig, SecretsConfig, }; use xshell::Shell; use zksync_basic_types::url::SensitiveUrl; @@ -33,7 +34,7 @@ use crate::{ pub fn run(shell: &Shell, args: PrepareConfigArgs) -> anyhow::Result<()> { logger::info(MSG_PREPARING_EN_CONFIGS); - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let mut chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_INITIALIZED)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/external_node/run.rs b/zkstack_cli/crates/zkstack/src/commands/external_node/run.rs index 46c98119f893..8ee563056573 100644 --- a/zkstack_cli/crates/zkstack/src/commands/external_node/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/external_node/run.rs @@ -1,6 +1,6 @@ use anyhow::Context; use common::logger; -use config::{ChainConfig, EcosystemConfig}; +use config::{zkstack_config::ZkStackConfig, ChainConfig}; use xshell::Shell; use crate::{ @@ -10,7 +10,7 @@ use crate::{ }; pub async fn run(shell: &Shell, args: RunExternalNodeArgs) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() diff --git a/zkstack_cli/crates/zkstack/src/commands/portal.rs b/zkstack_cli/crates/zkstack/src/commands/portal.rs index f9e7fe358609..3cf8fc4c866c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/portal.rs +++ b/zkstack_cli/crates/zkstack/src/commands/portal.rs @@ -5,6 +5,7 @@ use common::{config::global_config, docker, ethereum, logger}; use config::{ portal::*, traits::{ConfigWithL2RpcUrl, SaveConfig}, + zkstack_config::ZkStackConfig, AppsEcosystemConfig, ChainConfig, EcosystemConfig, }; use ethers::types::Address; @@ -118,7 +119,7 @@ async fn validate_portal_config( } pub async fn run(shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config: EcosystemConfig = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; // Get ecosystem level apps.yaml config let apps_config = AppsEcosystemConfig::read_or_create_default(shell)?; // Display all chains, unless --chain is passed diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs b/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs index a3d40c957281..7d2cb98bfe5e 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs @@ -1,6 +1,6 @@ use anyhow::Context; use common::spinner::Spinner; -use config::{get_link_to_prover, EcosystemConfig, GeneralConfig}; +use config::{get_link_to_prover, zkstack_config::ZkStackConfig, EcosystemConfig, GeneralConfig}; use xshell::Shell; use super::args::compressor_keys::CompressorKeysArgs; @@ -10,7 +10,7 @@ use crate::messages::{ }; pub(crate) async fn run(shell: &Shell, args: CompressorKeysArgs) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain_config = ecosystem_config .load_current_chain() .context(MSG_CHAIN_NOT_FOUND_ERR)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/init.rs b/zkstack_cli/crates/zkstack/src/commands/prover/init.rs index ad92180aea9b..fb3b487e687b 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/init.rs @@ -10,7 +10,7 @@ use common::{ }; use config::{ copy_configs, get_link_to_prover, set_prover_database, traits::SaveConfigWithBasePath, - EcosystemConfig, + zkstack_config::ZkStackConfig, EcosystemConfig, }; use xshell::{cmd, Shell}; use zksync_config::{configs::object_store::ObjectStoreMode, ObjectStoreConfig}; @@ -34,7 +34,7 @@ use crate::{ }; pub(crate) async fn run(args: ProverInitArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let default_compressor_key_path = get_default_compressor_keys_path(&ecosystem_config)?; @@ -112,7 +112,7 @@ fn get_object_store_config( let object_store = match config { Some(ProofStorageConfig::FileBacked(config)) => Some(init_file_backed_proof_storage( shell, - &EcosystemConfig::from_file(shell)?, + &ZkStackConfig::ecosystem(shell)?, config, )?), Some(ProofStorageConfig::GCS(config)) => Some(ObjectStoreConfig { diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/init_bellman_cuda.rs b/zkstack_cli/crates/zkstack/src/commands/prover/init_bellman_cuda.rs index 615ef841488b..03ff41fca8b0 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/init_bellman_cuda.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/init_bellman_cuda.rs @@ -1,6 +1,6 @@ use anyhow::Context; use common::{check_prerequisites, cmd::Cmd, git, logger, spinner::Spinner, GPU_PREREQUISITES}; -use config::{traits::SaveConfigWithBasePath, EcosystemConfig}; +use config::{traits::SaveConfigWithBasePath, zkstack_config::ZkStackConfig}; use xshell::{cmd, Shell}; use super::args::init_bellman_cuda::InitBellmanCudaArgs; @@ -15,7 +15,7 @@ use crate::{ pub(crate) async fn run(shell: &Shell, args: InitBellmanCudaArgs) -> anyhow::Result<()> { check_prerequisites(shell, &GPU_PREREQUISITES, false); - let mut ecosystem_config = EcosystemConfig::from_file(shell)?; + let mut ecosystem_config = ZkStackConfig::ecosystem(shell)?; let args = args.fill_values_with_prompt(); diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/run.rs b/zkstack_cli/crates/zkstack/src/commands/prover/run.rs index 85495d124041..8e6c5e48cc53 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/run.rs @@ -2,7 +2,7 @@ use std::path::{Path, PathBuf}; use anyhow::{anyhow, Context}; use common::{check_prerequisites, cmd::Cmd, logger, GPU_PREREQUISITES}; -use config::{get_link_to_prover, ChainConfig, EcosystemConfig}; +use config::{get_link_to_prover, zkstack_config::ZkStackConfig, ChainConfig}; use xshell::{cmd, Shell}; use super::args::run::{ProverComponent, ProverRunArgs}; @@ -18,7 +18,7 @@ use crate::messages::{ pub(crate) async fn run(args: ProverRunArgs, shell: &Shell) -> anyhow::Result<()> { let args = args.fill_values_with_prompt()?; - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; let chain = ecosystem_config .load_current_chain() .expect(MSG_CHAIN_NOT_FOUND_ERR); diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/setup_keys.rs b/zkstack_cli/crates/zkstack/src/commands/prover/setup_keys.rs index ae0480e872dd..6820cce47483 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/setup_keys.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/setup_keys.rs @@ -2,7 +2,7 @@ use anyhow::Ok; use common::{ check_prerequisites, cmd::Cmd, logger, spinner::Spinner, GCLOUD_PREREQUISITE, GPU_PREREQUISITES, }; -use config::{get_link_to_prover, EcosystemConfig}; +use config::{get_link_to_prover, zkstack_config::ZkStackConfig}; use xshell::{cmd, Shell}; use crate::{ @@ -12,7 +12,7 @@ use crate::{ pub(crate) async fn run(args: SetupKeysArgs, shell: &Shell) -> anyhow::Result<()> { let args = args.fill_values_with_prompt(); - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; if args.mode == Mode::Generate { check_prerequisites(shell, &GPU_PREREQUISITES, false); diff --git a/zkstack_cli/crates/zkstack/src/commands/update.rs b/zkstack_cli/crates/zkstack/src/commands/update.rs index 534d490e6cae..43f15703b159 100644 --- a/zkstack_cli/crates/zkstack/src/commands/update.rs +++ b/zkstack_cli/crates/zkstack/src/commands/update.rs @@ -8,8 +8,8 @@ use common::{ yaml::{merge_yaml, ConfigDiff}, }; use config::{ - ChainConfig, EcosystemConfig, CONTRACTS_FILE, EN_CONFIG_FILE, ERA_OBSERBAVILITY_DIR, - GENERAL_FILE, GENESIS_FILE, SECRETS_FILE, + zkstack_config::ZkStackConfig, ChainConfig, EcosystemConfig, CONTRACTS_FILE, EN_CONFIG_FILE, + ERA_OBSERBAVILITY_DIR, GENERAL_FILE, GENESIS_FILE, SECRETS_FILE, }; use xshell::Shell; @@ -27,7 +27,7 @@ use crate::{ pub async fn run(shell: &Shell, args: UpdateArgs) -> anyhow::Result<()> { logger::info(MSG_UPDATING_ZKSYNC); - let ecosystem = EcosystemConfig::from_file(shell)?; + let ecosystem = ZkStackConfig::ecosystem(shell)?; if !args.only_config { update_repo(shell, &ecosystem)?; diff --git a/zkstack_cli/crates/zkstack/src/main.rs b/zkstack_cli/crates/zkstack/src/main.rs index 768fa298ee88..d721ceaab71f 100644 --- a/zkstack_cli/crates/zkstack/src/main.rs +++ b/zkstack_cli/crates/zkstack/src/main.rs @@ -10,7 +10,7 @@ use common::{ init_prompt_theme, logger, version::version_message, }; -use config::EcosystemConfig; +use config::zkstack_config::ZkStackConfig; use xshell::Shell; use crate::commands::{ @@ -143,7 +143,7 @@ async fn run_subcommand(zkstack_args: ZkStack) -> anyhow::Result<()> { fn init_global_config_inner(shell: &Shell, zkstack_args: &ZkStackGlobalArgs) -> anyhow::Result<()> { if let Some(name) = &zkstack_args.chain { - if let Ok(config) = EcosystemConfig::from_file(shell) { + if let Ok(config) = ZkStackConfig::ecosystem(shell) { let chains = config.list_of_chains(); if !chains.contains(name) { anyhow::bail!( diff --git a/zkstack_cli/crates/zkstack/src/utils/ports.rs b/zkstack_cli/crates/zkstack/src/utils/ports.rs index 6c299b999136..c03c5dfcf9fc 100644 --- a/zkstack_cli/crates/zkstack/src/utils/ports.rs +++ b/zkstack_cli/crates/zkstack/src/utils/ports.rs @@ -2,8 +2,8 @@ use std::{collections::HashMap, fmt, net::SocketAddr, ops::Range, path::Path}; use anyhow::{bail, Context, Result}; use config::{ - explorer_compose::ExplorerBackendPorts, EcosystemConfig, DEFAULT_EXPLORER_API_PORT, - DEFAULT_EXPLORER_DATA_FETCHER_PORT, DEFAULT_EXPLORER_WORKER_PORT, + explorer_compose::ExplorerBackendPorts, zkstack_config::ZkStackConfig, + DEFAULT_EXPLORER_API_PORT, DEFAULT_EXPLORER_DATA_FETCHER_PORT, DEFAULT_EXPLORER_WORKER_PORT, }; use serde_yaml::Value; use url::Url; @@ -206,7 +206,7 @@ impl EcosystemPortsScanner { /// Scans the ecosystem directory for YAML files and extracts port information. /// Specifically, it looks for keys ending with "port" or "ports" and collects their values. pub fn scan(shell: &Shell) -> Result { - let ecosystem_config = EcosystemConfig::from_file(shell)?; + let ecosystem_config = ZkStackConfig::ecosystem(shell)?; // Create a list of directories to scan: // - Ecosystem configs directory From 2c5cf589dd23062ab22aefaac4e1d7028892dd21 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 11 Nov 2024 09:09:23 -0300 Subject: [PATCH 29/38] Make ChainConfigInternal::from_file private --- zkstack_cli/crates/config/src/chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zkstack_cli/crates/config/src/chain.rs b/zkstack_cli/crates/config/src/chain.rs index fc472b78e318..84e3481e95e9 100644 --- a/zkstack_cli/crates/config/src/chain.rs +++ b/zkstack_cli/crates/config/src/chain.rs @@ -205,7 +205,7 @@ impl ChainConfig { } impl ChainConfigInternal { - pub fn from_file(shell: &Shell) -> anyhow::Result { + pub(crate) fn from_file(shell: &Shell) -> anyhow::Result { let Ok(path) = find_file(shell, shell.current_dir(), CONFIG_NAME) else { bail!("Chain config not found") }; From f69f271206baea954de0307dd4ae45634e926bf7 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 11 Nov 2024 09:10:42 -0300 Subject: [PATCH 30/38] Make ChainConfig::from_internal private --- zkstack_cli/crates/config/src/chain.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zkstack_cli/crates/config/src/chain.rs b/zkstack_cli/crates/config/src/chain.rs index 84e3481e95e9..d01b32fd7d58 100644 --- a/zkstack_cli/crates/config/src/chain.rs +++ b/zkstack_cli/crates/config/src/chain.rs @@ -171,7 +171,7 @@ impl ChainConfig { } } - pub fn from_internal( + pub(crate) fn from_internal( chain_internal: ChainConfigInternal, shell: Shell, ) -> anyhow::Result { From df2cc9e04effa53179d0306b5a6f65788dd73473 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 13 Nov 2024 07:59:26 -0300 Subject: [PATCH 31/38] fmt --- zkstack_cli/crates/zkstack/src/commands/chain/server.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/server.rs b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs index 97ff9f077412..badf3d5ec2be 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/server.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/server.rs @@ -11,6 +11,7 @@ use config::{ }; use xshell::{cmd, Shell}; +use super::args::run_server::{RunServerArgs, ServerArgs, ServerCommand}; use crate::{ commands::args::WaitArgs, messages::{ @@ -19,8 +20,6 @@ use crate::{ }, }; -use super::args::run_server::{RunServerArgs, ServerArgs, ServerCommand}; - pub async fn run(shell: &Shell, args: ServerArgs, chain: ChainConfig) -> anyhow::Result<()> { match ServerCommand::from(args) { ServerCommand::Run(args) => run_server(args, &chain, shell), From e792afe721aca1b8b8d4d368f152ba7bacd85e58 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 13 Nov 2024 08:02:01 -0300 Subject: [PATCH 32/38] Add autocompletion files --- .../crates/zkstack/completion/zkstack.fish | 706 ++ .../crates/zkstack/completion/zkstack.sh | 7840 +++++++++++++++++ 2 files changed, 8546 insertions(+) create mode 100644 zkstack_cli/crates/zkstack/completion/zkstack.fish create mode 100644 zkstack_cli/crates/zkstack/completion/zkstack.sh diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.fish b/zkstack_cli/crates/zkstack/completion/zkstack.fish new file mode 100644 index 000000000000..a56b33242a3f --- /dev/null +++ b/zkstack_cli/crates/zkstack/completion/zkstack.fish @@ -0,0 +1,706 @@ +# Print an optspec for argparse to handle cmd's options that are independent of any subcommand. +function __fish_zkstack_global_optspecs + string join \n v/verbose chain= ignore-prerequisites h/help V/version +end + +function __fish_zkstack_needs_command + # Figure out if the current invocation already has a command. + set -l cmd (commandline -opc) + set -e cmd[1] + argparse -s (__fish_zkstack_global_optspecs) -- $cmd 2>/dev/null + or return + if set -q argv[1] + # Also print the command, so this can be used to figure out what it is. + echo $argv[1] + return 1 + end + return 0 +end + +function __fish_zkstack_using_subcommand + set -l cmd (__fish_zkstack_needs_command) + test -z "$cmd" + and return 1 + contains -- $cmd[1] $argv +end + +complete -c zkstack -n "__fish_zkstack_needs_command" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_needs_command" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_needs_command" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_needs_command" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_needs_command" -s V -l version -d 'Print version' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "autocomplete" -d 'Create shell autocompletion files' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "ecosystem" -d 'Ecosystem related commands' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "chain" -d 'Chain related commands' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "dev" -d 'Supervisor related commands' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "prover" -d 'Prover related commands' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "external-node" -d 'External Node related commands' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "containers" -d 'Run containers for local development' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "portal" -d 'Run dapp-portal' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "explorer" -d 'Run block-explorer' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "update" -d 'Update ZKsync' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "markdown" -d 'Print markdown help' +complete -c zkstack -n "__fish_zkstack_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand autocomplete" -l generate -d 'The shell to generate the autocomplete script for' -r -f -a "{bash\t'',elvish\t'',fish\t'',powershell\t'',zsh\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand autocomplete" -s o -l out -d 'The out directory to write the autocomplete script to' -r -F +complete -c zkstack -n "__fish_zkstack_using_subcommand autocomplete" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand autocomplete" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand autocomplete" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand autocomplete" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -f -a "create" -d 'Create a new ecosystem and chain, setting necessary configurations for later initialization' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -f -a "build-transactions" -d 'Create transactions to build ecosystem contracts' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -f -a "init" -d 'Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -f -a "change-default-chain" -d 'Change the default chain' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -f -a "setup-observability" -d 'Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and not __fish_seen_subcommand_from create build-transactions init change-default-chain setup-observability help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l ecosystem-name -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l l1-network -d 'L1 Network' -r -f -a "{localhost\t'',sepolia\t'',holesky\t'',mainnet\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l link-to-code -d 'Code link' -r -f -a "(__fish_complete_directories)" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l chain-name -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l chain-id -d 'Chain ID' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l prover-mode -d 'Prover options' -r -f -a "{no-proofs\t'',gpu\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l wallet-creation -d 'Wallet options' -r -f -a "{localhost\t'Load wallets from localhost mnemonic, they are funded for localhost env',random\t'Generate random wallets',empty\t'Generate placeholder wallets',in-file\t'Specify file with wallets'}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l wallet-path -d 'Wallet path' -r -F +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l l1-batch-commit-data-generator-mode -d 'Commit data generation mode' -r -f -a "{rollup\t'',validium\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l base-token-address -d 'Base token address' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l base-token-price-nominator -d 'Base token nominator' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l base-token-price-denominator -d 'Base token denominator' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l set-as-default -d 'Set as default chain' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l evm-emulator -d 'Enable EVM emulator' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l start-containers -d 'Start reth and postgres containers after creation' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l legacy-bridge +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -l sender -d 'Address of the transaction sender' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -l l1-rpc-url -d 'L1 RPC URL' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -s o -l out -d 'Output directory for the generated files' -r -F +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from build-transactions" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l deploy-erc20 -d 'Deploy ERC20 contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l deploy-ecosystem -d 'Deploy ecosystem contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l ecosystem-contracts-path -d 'Path to ecosystem contracts' -r -F +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l l1-rpc-url -d 'L1 RPC URL' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l deploy-paymaster -d 'Deploy Paymaster contract' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l server-db-url -d 'Server database url without database name' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l server-db-name -d 'Server database name' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -s o -l observability -d 'Enable Grafana' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -s d -l dont-drop +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l ecosystem-only -d 'Initialize ecosystem only and skip chain initialization (chain can be initialized later with `chain init` subcommand)' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l dev -d 'Use defaults for all options and flags. Suitable for local development' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l no-port-reallocation -d 'Do not reallocate ports' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from init" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from change-default-chain" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from change-default-chain" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from change-default-chain" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from change-default-chain" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from setup-observability" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from setup-observability" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from setup-observability" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from setup-observability" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from help" -f -a "create" -d 'Create a new ecosystem and chain, setting necessary configurations for later initialization' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from help" -f -a "build-transactions" -d 'Create transactions to build ecosystem contracts' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from help" -f -a "init" -d 'Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from help" -f -a "change-default-chain" -d 'Change the default chain' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from help" -f -a "setup-observability" -d 'Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "create" -d 'Create a new chain, setting the necessary configurations for later initialization' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "build-transactions" -d 'Create unsigned transactions for chain deployment' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "init" -d 'Initialize chain, deploying necessary contracts and performing on-chain operations' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "genesis" -d 'Run server genesis' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "register-chain" -d 'Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note: After completion, L2 governor can accept ownership by running `accept-chain-ownership`' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-l2-contracts" -d 'Deploy all L2 contracts (executed by L1 governor)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "accept-chain-ownership" -d 'Accept ownership of L2 chain (executed by L2 governor). This command should be run after `register-chain` to accept ownership of newly created DiamondProxy contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "initialize-bridges" -d 'Initialize bridges on L2' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-consensus-registry" -d 'Deploy L2 consensus registry' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-multicall3" -d 'Deploy L2 multicall3' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-timestamp-asserter" -d 'Deploy L2 TimestampAsserter' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-upgrader" -d 'Deploy Default Upgrader' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "deploy-paymaster" -d 'Deploy paymaster smart contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "update-token-multiplier-setter" -d 'Update Token Multiplier Setter address on L1' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "server" -d 'Run server' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "contract-verifier" -d 'Run contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "consensus" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and not __fish_seen_subcommand_from create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l chain-name -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l chain-id -d 'Chain ID' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l prover-mode -d 'Prover options' -r -f -a "{no-proofs\t'',gpu\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l wallet-creation -d 'Wallet options' -r -f -a "{localhost\t'Load wallets from localhost mnemonic, they are funded for localhost env',random\t'Generate random wallets',empty\t'Generate placeholder wallets',in-file\t'Specify file with wallets'}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l wallet-path -d 'Wallet path' -r -F +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l l1-batch-commit-data-generator-mode -d 'Commit data generation mode' -r -f -a "{rollup\t'',validium\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l base-token-address -d 'Base token address' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l base-token-price-nominator -d 'Base token nominator' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l base-token-price-denominator -d 'Base token denominator' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l set-as-default -d 'Set as default chain' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l evm-emulator -d 'Enable EVM emulator' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l legacy-bridge +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -s o -l out -d 'Output directory for the generated files' -r -F +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -l l1-rpc-url -d 'L1 RPC URL' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from build-transactions" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l server-db-url -d 'Server database url without database name' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l server-db-name -d 'Server database name' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l deploy-paymaster -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l l1-rpc-url -d 'L1 RPC URL' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -s d -l dont-drop +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l no-port-reallocation -d 'Do not reallocate ports' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l dev -d 'Use defaults for all options and flags. Suitable for local development' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -f -a "configs" -d 'Initialize chain configs' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -l server-db-url -d 'Server database url without database name' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -l server-db-name -d 'Server database name' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -s d -l dev -d 'Use default database urls and names' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -s d -l dont-drop +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -f -a "init-database" -d 'Initialize databases' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -f -a "server" -d 'Runs server genesis' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from genesis" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from register-chain" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-l2-contracts" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from accept-chain-ownership" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from initialize-bridges" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-consensus-registry" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-multicall3" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-timestamp-asserter" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-upgrader" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from deploy-paymaster" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -l verify -d 'Verify deployed contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -l verifier -d 'Verifier to use' -r -f -a "{etherscan\t'',sourcify\t'',blockscout\t'',oklink\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -l verifier-url -d 'Verifier URL, if using a custom provider' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -l verifier-api-key -d 'Verifier API key' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -s a -l additional-args -d 'List of additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -l resume +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from update-token-multiplier-setter" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l components -d 'Components of server to run' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -s a -l additional-args -d 'Additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l genesis -d 'Run server in genesis mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l uring -d 'Enables uring support for RocksDB' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -f -a "build" -d 'Builds server' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -f -a "run" -d 'Runs server' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -f -a "wait" -d 'Waits for server to start' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from server" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -f -a "build" -d 'Build contract verifier binary' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -f -a "run" -d 'Run contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -f -a "wait" -d 'Wait for contract verifier to start' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -f -a "init" -d 'Download required binaries for contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from contract-verifier" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -f -a "set-attester-committee" -d 'Sets the attester committee in the consensus registry contract to `consensus.genesis_spec.attesters` in general.yaml' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -f -a "get-attester-committee" -d 'Fetches the attester committee from the consensus registry contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -f -a "wait-for-registry" -d 'Wait until the consensus registry contract is deployed to L2' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from consensus" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "create" -d 'Create a new chain, setting the necessary configurations for later initialization' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "build-transactions" -d 'Create unsigned transactions for chain deployment' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "init" -d 'Initialize chain, deploying necessary contracts and performing on-chain operations' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "genesis" -d 'Run server genesis' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "register-chain" -d 'Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note: After completion, L2 governor can accept ownership by running `accept-chain-ownership`' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "deploy-l2-contracts" -d 'Deploy all L2 contracts (executed by L1 governor)' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "accept-chain-ownership" -d 'Accept ownership of L2 chain (executed by L2 governor). This command should be run after `register-chain` to accept ownership of newly created DiamondProxy contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "initialize-bridges" -d 'Initialize bridges on L2' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "deploy-consensus-registry" -d 'Deploy L2 consensus registry' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "deploy-multicall3" -d 'Deploy L2 multicall3' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "deploy-timestamp-asserter" -d 'Deploy L2 TimestampAsserter' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "deploy-upgrader" -d 'Deploy Default Upgrader' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "deploy-paymaster" -d 'Deploy paymaster smart contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "update-token-multiplier-setter" -d 'Update Token Multiplier Setter address on L1' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "server" -d 'Run server' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "contract-verifier" -d 'Run contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "consensus" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "database" -d 'Database related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "test" -d 'Run tests' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "clean" -d 'Clean artifacts' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "snapshot" -d 'Snapshots creator' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "lint" -d 'Lint code' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "fmt" -d 'Format code' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "prover" -d 'Protocol version used by provers' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "contracts" -d 'Build contracts' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "config-writer" -d 'Overwrite general config' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "send-transactions" -d 'Send transactions from file' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "status" -d 'Get status of the server' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "generate-genesis" -d 'Generate new genesis file based on current contracts' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and not __fish_seen_subcommand_from database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -f -a "check-sqlx-data" -d 'Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -f -a "drop" -d 'Drop databases. If no databases are selected, all databases will be dropped.' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -f -a "migrate" -d 'Migrate databases. If no databases are selected, all databases will be migrated.' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -f -a "new-migration" -d 'Create new migration' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -f -a "prepare" -d 'Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -f -a "reset" -d 'Reset databases. If no databases are selected, all databases will be reset.' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -f -a "setup" -d 'Setup databases. If no databases are selected, all databases will be setup.' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from database" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "integration" -d 'Run integration tests' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "fees" -d 'Run fees test' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "revert" -d 'Run revert tests' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "recovery" -d 'Run recovery tests' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "upgrade" -d 'Run upgrade tests' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "build" -d 'Build all test dependencies' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "rust" -d 'Run unit-tests, accepts optional cargo test flags' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "l1-contracts" -d 'Run L1 contracts tests' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "prover" -d 'Run prover tests' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "wallet" -d 'Print test wallets information' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "loadtest" -d 'Run loadtest' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from test" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from clean" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from clean" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from clean" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from clean" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from clean" -f -a "all" -d 'Remove containers and contracts cache' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from clean" -f -a "containers" -d 'Remove containers and docker volumes' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from clean" -f -a "contracts-cache" -d 'Remove contracts caches' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from clean" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from snapshot" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from snapshot" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from snapshot" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from snapshot" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from snapshot" -f -a "create" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from snapshot" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from lint" -s t -l targets -r -f -a "{md\t'',sol\t'',js\t'',ts\t'',rs\t'',contracts\t'',autocompletion\t'',rust-toolchain\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from lint" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from lint" -s c -l check +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from lint" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from lint" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from lint" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from fmt" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from fmt" -s c -l check +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from fmt" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from fmt" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from fmt" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from fmt" -f -a "rustfmt" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from fmt" -f -a "contract" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from fmt" -f -a "prettier" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from fmt" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from prover" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from prover" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from prover" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from prover" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from prover" -f -a "info" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from prover" -f -a "insert-batch" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from prover" -f -a "insert-version" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from prover" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from contracts" -l l1-contracts -d 'Build L1 contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from contracts" -l l2-contracts -d 'Build L2 contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from contracts" -l system-contracts -d 'Build system contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from contracts" -l test-contracts -d 'Build test contracts' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from contracts" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from contracts" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from contracts" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from contracts" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from config-writer" -s p -l path -d 'Path to the config file to override' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from config-writer" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from config-writer" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from config-writer" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from config-writer" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from send-transactions" -l file -r -F +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from send-transactions" -l private-key -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from send-transactions" -l l1-rpc-url -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from send-transactions" -l confirmations -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from send-transactions" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from send-transactions" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from send-transactions" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from send-transactions" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from status" -s u -l url -d 'URL of the health check endpoint' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from status" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from status" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from status" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from status" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from status" -f -a "ports" -d 'Show used ports' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from status" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from generate-genesis" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from generate-genesis" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from generate-genesis" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from generate-genesis" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "database" -d 'Database related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "test" -d 'Run tests' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "clean" -d 'Clean artifacts' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "snapshot" -d 'Snapshots creator' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "lint" -d 'Lint code' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "fmt" -d 'Format code' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "prover" -d 'Protocol version used by provers' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "contracts" -d 'Build contracts' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "config-writer" -d 'Overwrite general config' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "send-transactions" -d 'Send transactions from file' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "status" -d 'Get status of the server' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "generate-genesis" -d 'Generate new genesis file based on current contracts' +complete -c zkstack -n "__fish_zkstack_using_subcommand dev; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -f -a "init" -d 'Initialize prover' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -f -a "setup-keys" -d 'Generate setup keys' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -f -a "run" -d 'Run prover' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -f -a "init-bellman-cuda" -d 'Initialize bellman-cuda' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -f -a "compressor-keys" -d 'Download compressor keys' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and not __fish_seen_subcommand_from init setup-keys run init-bellman-cuda compressor-keys help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l proof-store-dir -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l bucket-base-url -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l credentials-file -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l bucket-name -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l location -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l project-id -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l shall-save-to-public-bucket -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l public-store-dir -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l public-bucket-base-url -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l public-credentials-file -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l public-bucket-name -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l public-location -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l public-project-id -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l bellman-cuda-dir -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l bellman-cuda -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l setup-compressor-key -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l path -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l region -r -f -a "{us\t'',europe\t'',asia\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l mode -r -f -a "{download\t'',generate\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l setup-keys -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l setup-database -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l prover-db-url -d 'Prover database url without database name' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l prover-db-name -d 'Prover database name' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -s u -l use-default -d 'Use default database urls and names' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -s d -l dont-drop -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l cloud-type -r -f -a "{gcp\t'',local\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l dev +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l clone +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from setup-keys" -l region -r -f -a "{us\t'',europe\t'',asia\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from setup-keys" -l mode -r -f -a "{download\t'',generate\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from setup-keys" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from setup-keys" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from setup-keys" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from setup-keys" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l component -r -f -a "{gateway\t'',witness-generator\t'',witness-vector-generator\t'',prover\t'',circuit-prover\t'',compressor\t'',prover-job-monitor\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l round -r -f -a "{all-rounds\t'',basic-circuits\t'',leaf-aggregation\t'',node-aggregation\t'',recursion-tip\t'',scheduler\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l threads -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l max-allocation -d 'Memory allocation limit in bytes (for prover component)' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l witness-vector-generator-count -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l max-allocation -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l docker -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l tag -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from run" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init-bellman-cuda" -l bellman-cuda-dir -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init-bellman-cuda" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init-bellman-cuda" -l clone +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init-bellman-cuda" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init-bellman-cuda" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from init-bellman-cuda" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -l path -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from compressor-keys" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from help" -f -a "init" -d 'Initialize prover' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from help" -f -a "setup-keys" -d 'Generate setup keys' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from help" -f -a "run" -d 'Run prover' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from help" -f -a "init-bellman-cuda" -d 'Initialize bellman-cuda' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from help" -f -a "compressor-keys" -d 'Download compressor keys' +complete -c zkstack -n "__fish_zkstack_using_subcommand prover; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -f -a "configs" -d 'Prepare configs for EN' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -f -a "init" -d 'Init databases' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -f -a "build" -d 'Build external node' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -f -a "run" -d 'Run external node' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -f -a "wait" -d 'Wait for external node to start' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and not __fish_seen_subcommand_from configs init build run wait help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from configs" -l db-url -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from configs" -l db-name -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from configs" -l l1-rpc-url -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from configs" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from configs" -s u -l use-default -d 'Use default database urls and names' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from configs" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from configs" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from configs" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from init" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from init" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from init" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from init" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from build" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from build" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from build" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from build" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from run" -l components -d 'Components of server to run' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from run" -l enable-consensus -d 'Enable consensus' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from run" -s a -l additional-args -d 'Additional arguments that can be passed through the CLI' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from run" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from run" -l reinit +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from run" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from run" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from run" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from wait" -s t -l timeout -d 'Wait timeout in seconds' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from wait" -l poll-interval -d 'Poll interval in milliseconds' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from wait" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from wait" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from wait" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from wait" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from help" -f -a "configs" -d 'Prepare configs for EN' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from help" -f -a "init" -d 'Init databases' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from help" -f -a "build" -d 'Build external node' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from help" -f -a "run" -d 'Run external node' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from help" -f -a "wait" -d 'Wait for external node to start' +complete -c zkstack -n "__fish_zkstack_using_subcommand external-node; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand containers" -s o -l observability -d 'Enable Grafana' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand containers" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand containers" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand containers" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand containers" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand portal" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand portal" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand portal" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand portal" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and not __fish_seen_subcommand_from init run-backend run help" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and not __fish_seen_subcommand_from init run-backend run help" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and not __fish_seen_subcommand_from init run-backend run help" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and not __fish_seen_subcommand_from init run-backend run help" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and not __fish_seen_subcommand_from init run-backend run help" -f -a "init" -d 'Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and not __fish_seen_subcommand_from init run-backend run help" -f -a "run-backend" -d 'Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and not __fish_seen_subcommand_from init run-backend run help" -f -a "run" -d 'Run explorer app' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and not __fish_seen_subcommand_from init run-backend run help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from init" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from init" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from init" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from init" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from run-backend" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from run-backend" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from run-backend" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from run-backend" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from run" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from run" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from run" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from run" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from help" -f -a "init" -d 'Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from help" -f -a "run-backend" -d 'Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from help" -f -a "run" -d 'Run explorer app' +complete -c zkstack -n "__fish_zkstack_using_subcommand explorer; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand update" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand update" -s c -l only-config -d 'Update only the config files' +complete -c zkstack -n "__fish_zkstack_using_subcommand update" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand update" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand update" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand markdown" -l chain -d 'Chain to use' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand markdown" -s v -l verbose -d 'Verbose mode' +complete -c zkstack -n "__fish_zkstack_using_subcommand markdown" -l ignore-prerequisites -d 'Ignores prerequisites checks' +complete -c zkstack -n "__fish_zkstack_using_subcommand markdown" -s h -l help -d 'Print help' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "autocomplete" -d 'Create shell autocompletion files' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "ecosystem" -d 'Ecosystem related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "chain" -d 'Chain related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "dev" -d 'Supervisor related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "prover" -d 'Prover related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "external-node" -d 'External Node related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "containers" -d 'Run containers for local development' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "portal" -d 'Run dapp-portal' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "explorer" -d 'Run block-explorer' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "update" -d 'Update ZKsync' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "markdown" -d 'Print markdown help' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and not __fish_seen_subcommand_from autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from ecosystem" -f -a "create" -d 'Create a new ecosystem and chain, setting necessary configurations for later initialization' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from ecosystem" -f -a "build-transactions" -d 'Create transactions to build ecosystem contracts' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from ecosystem" -f -a "init" -d 'Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from ecosystem" -f -a "change-default-chain" -d 'Change the default chain' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from ecosystem" -f -a "setup-observability" -d 'Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "create" -d 'Create a new chain, setting the necessary configurations for later initialization' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "build-transactions" -d 'Create unsigned transactions for chain deployment' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "init" -d 'Initialize chain, deploying necessary contracts and performing on-chain operations' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "genesis" -d 'Run server genesis' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "register-chain" -d 'Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note: After completion, L2 governor can accept ownership by running `accept-chain-ownership`' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "deploy-l2-contracts" -d 'Deploy all L2 contracts (executed by L1 governor)' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "accept-chain-ownership" -d 'Accept ownership of L2 chain (executed by L2 governor). This command should be run after `register-chain` to accept ownership of newly created DiamondProxy contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "initialize-bridges" -d 'Initialize bridges on L2' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "deploy-consensus-registry" -d 'Deploy L2 consensus registry' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "deploy-multicall3" -d 'Deploy L2 multicall3' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "deploy-timestamp-asserter" -d 'Deploy L2 TimestampAsserter' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "deploy-upgrader" -d 'Deploy Default Upgrader' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "deploy-paymaster" -d 'Deploy paymaster smart contract' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "update-token-multiplier-setter" -d 'Update Token Multiplier Setter address on L1' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "server" -d 'Run server' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "contract-verifier" -d 'Run contract verifier' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from chain" -f -a "consensus" +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "database" -d 'Database related commands' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "test" -d 'Run tests' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "clean" -d 'Clean artifacts' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "snapshot" -d 'Snapshots creator' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "lint" -d 'Lint code' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "fmt" -d 'Format code' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "prover" -d 'Protocol version used by provers' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "contracts" -d 'Build contracts' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "config-writer" -d 'Overwrite general config' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "send-transactions" -d 'Send transactions from file' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "status" -d 'Get status of the server' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from dev" -f -a "generate-genesis" -d 'Generate new genesis file based on current contracts' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from prover" -f -a "init" -d 'Initialize prover' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from prover" -f -a "setup-keys" -d 'Generate setup keys' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from prover" -f -a "run" -d 'Run prover' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from prover" -f -a "init-bellman-cuda" -d 'Initialize bellman-cuda' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from prover" -f -a "compressor-keys" -d 'Download compressor keys' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from external-node" -f -a "configs" -d 'Prepare configs for EN' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from external-node" -f -a "init" -d 'Init databases' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from external-node" -f -a "build" -d 'Build external node' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from external-node" -f -a "run" -d 'Run external node' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from external-node" -f -a "wait" -d 'Wait for external node to start' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from explorer" -f -a "init" -d 'Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from explorer" -f -a "run-backend" -d 'Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' +complete -c zkstack -n "__fish_zkstack_using_subcommand help; and __fish_seen_subcommand_from explorer" -f -a "run" -d 'Run explorer app' diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.sh b/zkstack_cli/crates/zkstack/completion/zkstack.sh new file mode 100644 index 000000000000..b8e6437ace00 --- /dev/null +++ b/zkstack_cli/crates/zkstack/completion/zkstack.sh @@ -0,0 +1,7840 @@ +_zkstack() { + local i cur prev opts cmd + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + cmd="" + opts="" + + for i in ${COMP_WORDS[@]} + do + case "${cmd},${i}" in + ",$1") + cmd="zkstack" + ;; + zkstack,autocomplete) + cmd="zkstack__autocomplete" + ;; + zkstack,chain) + cmd="zkstack__chain" + ;; + zkstack,containers) + cmd="zkstack__containers" + ;; + zkstack,dev) + cmd="zkstack__dev" + ;; + zkstack,ecosystem) + cmd="zkstack__ecosystem" + ;; + zkstack,explorer) + cmd="zkstack__explorer" + ;; + zkstack,external-node) + cmd="zkstack__external__node" + ;; + zkstack,help) + cmd="zkstack__help" + ;; + zkstack,markdown) + cmd="zkstack__markdown" + ;; + zkstack,portal) + cmd="zkstack__portal" + ;; + zkstack,prover) + cmd="zkstack__prover" + ;; + zkstack,update) + cmd="zkstack__update" + ;; + zkstack__chain,accept-chain-ownership) + cmd="zkstack__chain__accept__chain__ownership" + ;; + zkstack__chain,build-transactions) + cmd="zkstack__chain__build__transactions" + ;; + zkstack__chain,consensus) + cmd="zkstack__chain__consensus" + ;; + zkstack__chain,contract-verifier) + cmd="zkstack__chain__contract__verifier" + ;; + zkstack__chain,create) + cmd="zkstack__chain__create" + ;; + zkstack__chain,deploy-consensus-registry) + cmd="zkstack__chain__deploy__consensus__registry" + ;; + zkstack__chain,deploy-l2-contracts) + cmd="zkstack__chain__deploy__l2__contracts" + ;; + zkstack__chain,deploy-multicall3) + cmd="zkstack__chain__deploy__multicall3" + ;; + zkstack__chain,deploy-paymaster) + cmd="zkstack__chain__deploy__paymaster" + ;; + zkstack__chain,deploy-timestamp-asserter) + cmd="zkstack__chain__deploy__timestamp__asserter" + ;; + zkstack__chain,deploy-upgrader) + cmd="zkstack__chain__deploy__upgrader" + ;; + zkstack__chain,genesis) + cmd="zkstack__chain__genesis" + ;; + zkstack__chain,help) + cmd="zkstack__chain__help" + ;; + zkstack__chain,init) + cmd="zkstack__chain__init" + ;; + zkstack__chain,initialize-bridges) + cmd="zkstack__chain__initialize__bridges" + ;; + zkstack__chain,register-chain) + cmd="zkstack__chain__register__chain" + ;; + zkstack__chain,server) + cmd="zkstack__chain__server" + ;; + zkstack__chain,update-token-multiplier-setter) + cmd="zkstack__chain__update__token__multiplier__setter" + ;; + zkstack__chain__consensus,get-attester-committee) + cmd="zkstack__chain__consensus__get__attester__committee" + ;; + zkstack__chain__consensus,help) + cmd="zkstack__chain__consensus__help" + ;; + zkstack__chain__consensus,set-attester-committee) + cmd="zkstack__chain__consensus__set__attester__committee" + ;; + zkstack__chain__consensus,wait-for-registry) + cmd="zkstack__chain__consensus__wait__for__registry" + ;; + zkstack__chain__consensus__help,get-attester-committee) + cmd="zkstack__chain__consensus__help__get__attester__committee" + ;; + zkstack__chain__consensus__help,help) + cmd="zkstack__chain__consensus__help__help" + ;; + zkstack__chain__consensus__help,set-attester-committee) + cmd="zkstack__chain__consensus__help__set__attester__committee" + ;; + zkstack__chain__consensus__help,wait-for-registry) + cmd="zkstack__chain__consensus__help__wait__for__registry" + ;; + zkstack__chain__contract__verifier,build) + cmd="zkstack__chain__contract__verifier__build" + ;; + zkstack__chain__contract__verifier,help) + cmd="zkstack__chain__contract__verifier__help" + ;; + zkstack__chain__contract__verifier,init) + cmd="zkstack__chain__contract__verifier__init" + ;; + zkstack__chain__contract__verifier,run) + cmd="zkstack__chain__contract__verifier__run" + ;; + zkstack__chain__contract__verifier,wait) + cmd="zkstack__chain__contract__verifier__wait" + ;; + zkstack__chain__contract__verifier__help,build) + cmd="zkstack__chain__contract__verifier__help__build" + ;; + zkstack__chain__contract__verifier__help,help) + cmd="zkstack__chain__contract__verifier__help__help" + ;; + zkstack__chain__contract__verifier__help,init) + cmd="zkstack__chain__contract__verifier__help__init" + ;; + zkstack__chain__contract__verifier__help,run) + cmd="zkstack__chain__contract__verifier__help__run" + ;; + zkstack__chain__contract__verifier__help,wait) + cmd="zkstack__chain__contract__verifier__help__wait" + ;; + zkstack__chain__genesis,help) + cmd="zkstack__chain__genesis__help" + ;; + zkstack__chain__genesis,init-database) + cmd="zkstack__chain__genesis__init__database" + ;; + zkstack__chain__genesis,server) + cmd="zkstack__chain__genesis__server" + ;; + zkstack__chain__genesis__help,help) + cmd="zkstack__chain__genesis__help__help" + ;; + zkstack__chain__genesis__help,init-database) + cmd="zkstack__chain__genesis__help__init__database" + ;; + zkstack__chain__genesis__help,server) + cmd="zkstack__chain__genesis__help__server" + ;; + zkstack__chain__help,accept-chain-ownership) + cmd="zkstack__chain__help__accept__chain__ownership" + ;; + zkstack__chain__help,build-transactions) + cmd="zkstack__chain__help__build__transactions" + ;; + zkstack__chain__help,consensus) + cmd="zkstack__chain__help__consensus" + ;; + zkstack__chain__help,contract-verifier) + cmd="zkstack__chain__help__contract__verifier" + ;; + zkstack__chain__help,create) + cmd="zkstack__chain__help__create" + ;; + zkstack__chain__help,deploy-consensus-registry) + cmd="zkstack__chain__help__deploy__consensus__registry" + ;; + zkstack__chain__help,deploy-l2-contracts) + cmd="zkstack__chain__help__deploy__l2__contracts" + ;; + zkstack__chain__help,deploy-multicall3) + cmd="zkstack__chain__help__deploy__multicall3" + ;; + zkstack__chain__help,deploy-paymaster) + cmd="zkstack__chain__help__deploy__paymaster" + ;; + zkstack__chain__help,deploy-timestamp-asserter) + cmd="zkstack__chain__help__deploy__timestamp__asserter" + ;; + zkstack__chain__help,deploy-upgrader) + cmd="zkstack__chain__help__deploy__upgrader" + ;; + zkstack__chain__help,genesis) + cmd="zkstack__chain__help__genesis" + ;; + zkstack__chain__help,help) + cmd="zkstack__chain__help__help" + ;; + zkstack__chain__help,init) + cmd="zkstack__chain__help__init" + ;; + zkstack__chain__help,initialize-bridges) + cmd="zkstack__chain__help__initialize__bridges" + ;; + zkstack__chain__help,register-chain) + cmd="zkstack__chain__help__register__chain" + ;; + zkstack__chain__help,server) + cmd="zkstack__chain__help__server" + ;; + zkstack__chain__help,update-token-multiplier-setter) + cmd="zkstack__chain__help__update__token__multiplier__setter" + ;; + zkstack__chain__help__consensus,get-attester-committee) + cmd="zkstack__chain__help__consensus__get__attester__committee" + ;; + zkstack__chain__help__consensus,set-attester-committee) + cmd="zkstack__chain__help__consensus__set__attester__committee" + ;; + zkstack__chain__help__consensus,wait-for-registry) + cmd="zkstack__chain__help__consensus__wait__for__registry" + ;; + zkstack__chain__help__contract__verifier,build) + cmd="zkstack__chain__help__contract__verifier__build" + ;; + zkstack__chain__help__contract__verifier,init) + cmd="zkstack__chain__help__contract__verifier__init" + ;; + zkstack__chain__help__contract__verifier,run) + cmd="zkstack__chain__help__contract__verifier__run" + ;; + zkstack__chain__help__contract__verifier,wait) + cmd="zkstack__chain__help__contract__verifier__wait" + ;; + zkstack__chain__help__genesis,init-database) + cmd="zkstack__chain__help__genesis__init__database" + ;; + zkstack__chain__help__genesis,server) + cmd="zkstack__chain__help__genesis__server" + ;; + zkstack__chain__help__init,configs) + cmd="zkstack__chain__help__init__configs" + ;; + zkstack__chain__help__server,build) + cmd="zkstack__chain__help__server__build" + ;; + zkstack__chain__help__server,run) + cmd="zkstack__chain__help__server__run" + ;; + zkstack__chain__help__server,wait) + cmd="zkstack__chain__help__server__wait" + ;; + zkstack__chain__init,configs) + cmd="zkstack__chain__init__configs" + ;; + zkstack__chain__init,help) + cmd="zkstack__chain__init__help" + ;; + zkstack__chain__init__help,configs) + cmd="zkstack__chain__init__help__configs" + ;; + zkstack__chain__init__help,help) + cmd="zkstack__chain__init__help__help" + ;; + zkstack__chain__server,build) + cmd="zkstack__chain__server__build" + ;; + zkstack__chain__server,help) + cmd="zkstack__chain__server__help" + ;; + zkstack__chain__server,run) + cmd="zkstack__chain__server__run" + ;; + zkstack__chain__server,wait) + cmd="zkstack__chain__server__wait" + ;; + zkstack__chain__server__help,build) + cmd="zkstack__chain__server__help__build" + ;; + zkstack__chain__server__help,help) + cmd="zkstack__chain__server__help__help" + ;; + zkstack__chain__server__help,run) + cmd="zkstack__chain__server__help__run" + ;; + zkstack__chain__server__help,wait) + cmd="zkstack__chain__server__help__wait" + ;; + zkstack__dev,clean) + cmd="zkstack__dev__clean" + ;; + zkstack__dev,config-writer) + cmd="zkstack__dev__config__writer" + ;; + zkstack__dev,contracts) + cmd="zkstack__dev__contracts" + ;; + zkstack__dev,database) + cmd="zkstack__dev__database" + ;; + zkstack__dev,fmt) + cmd="zkstack__dev__fmt" + ;; + zkstack__dev,generate-genesis) + cmd="zkstack__dev__generate__genesis" + ;; + zkstack__dev,help) + cmd="zkstack__dev__help" + ;; + zkstack__dev,lint) + cmd="zkstack__dev__lint" + ;; + zkstack__dev,prover) + cmd="zkstack__dev__prover" + ;; + zkstack__dev,send-transactions) + cmd="zkstack__dev__send__transactions" + ;; + zkstack__dev,snapshot) + cmd="zkstack__dev__snapshot" + ;; + zkstack__dev,status) + cmd="zkstack__dev__status" + ;; + zkstack__dev,test) + cmd="zkstack__dev__test" + ;; + zkstack__dev__clean,all) + cmd="zkstack__dev__clean__all" + ;; + zkstack__dev__clean,containers) + cmd="zkstack__dev__clean__containers" + ;; + zkstack__dev__clean,contracts-cache) + cmd="zkstack__dev__clean__contracts__cache" + ;; + zkstack__dev__clean,help) + cmd="zkstack__dev__clean__help" + ;; + zkstack__dev__clean__help,all) + cmd="zkstack__dev__clean__help__all" + ;; + zkstack__dev__clean__help,containers) + cmd="zkstack__dev__clean__help__containers" + ;; + zkstack__dev__clean__help,contracts-cache) + cmd="zkstack__dev__clean__help__contracts__cache" + ;; + zkstack__dev__clean__help,help) + cmd="zkstack__dev__clean__help__help" + ;; + zkstack__dev__database,check-sqlx-data) + cmd="zkstack__dev__database__check__sqlx__data" + ;; + zkstack__dev__database,drop) + cmd="zkstack__dev__database__drop" + ;; + zkstack__dev__database,help) + cmd="zkstack__dev__database__help" + ;; + zkstack__dev__database,migrate) + cmd="zkstack__dev__database__migrate" + ;; + zkstack__dev__database,new-migration) + cmd="zkstack__dev__database__new__migration" + ;; + zkstack__dev__database,prepare) + cmd="zkstack__dev__database__prepare" + ;; + zkstack__dev__database,reset) + cmd="zkstack__dev__database__reset" + ;; + zkstack__dev__database,setup) + cmd="zkstack__dev__database__setup" + ;; + zkstack__dev__database__help,check-sqlx-data) + cmd="zkstack__dev__database__help__check__sqlx__data" + ;; + zkstack__dev__database__help,drop) + cmd="zkstack__dev__database__help__drop" + ;; + zkstack__dev__database__help,help) + cmd="zkstack__dev__database__help__help" + ;; + zkstack__dev__database__help,migrate) + cmd="zkstack__dev__database__help__migrate" + ;; + zkstack__dev__database__help,new-migration) + cmd="zkstack__dev__database__help__new__migration" + ;; + zkstack__dev__database__help,prepare) + cmd="zkstack__dev__database__help__prepare" + ;; + zkstack__dev__database__help,reset) + cmd="zkstack__dev__database__help__reset" + ;; + zkstack__dev__database__help,setup) + cmd="zkstack__dev__database__help__setup" + ;; + zkstack__dev__fmt,contract) + cmd="zkstack__dev__fmt__contract" + ;; + zkstack__dev__fmt,help) + cmd="zkstack__dev__fmt__help" + ;; + zkstack__dev__fmt,prettier) + cmd="zkstack__dev__fmt__prettier" + ;; + zkstack__dev__fmt,rustfmt) + cmd="zkstack__dev__fmt__rustfmt" + ;; + zkstack__dev__fmt__help,contract) + cmd="zkstack__dev__fmt__help__contract" + ;; + zkstack__dev__fmt__help,help) + cmd="zkstack__dev__fmt__help__help" + ;; + zkstack__dev__fmt__help,prettier) + cmd="zkstack__dev__fmt__help__prettier" + ;; + zkstack__dev__fmt__help,rustfmt) + cmd="zkstack__dev__fmt__help__rustfmt" + ;; + zkstack__dev__help,clean) + cmd="zkstack__dev__help__clean" + ;; + zkstack__dev__help,config-writer) + cmd="zkstack__dev__help__config__writer" + ;; + zkstack__dev__help,contracts) + cmd="zkstack__dev__help__contracts" + ;; + zkstack__dev__help,database) + cmd="zkstack__dev__help__database" + ;; + zkstack__dev__help,fmt) + cmd="zkstack__dev__help__fmt" + ;; + zkstack__dev__help,generate-genesis) + cmd="zkstack__dev__help__generate__genesis" + ;; + zkstack__dev__help,help) + cmd="zkstack__dev__help__help" + ;; + zkstack__dev__help,lint) + cmd="zkstack__dev__help__lint" + ;; + zkstack__dev__help,prover) + cmd="zkstack__dev__help__prover" + ;; + zkstack__dev__help,send-transactions) + cmd="zkstack__dev__help__send__transactions" + ;; + zkstack__dev__help,snapshot) + cmd="zkstack__dev__help__snapshot" + ;; + zkstack__dev__help,status) + cmd="zkstack__dev__help__status" + ;; + zkstack__dev__help,test) + cmd="zkstack__dev__help__test" + ;; + zkstack__dev__help__clean,all) + cmd="zkstack__dev__help__clean__all" + ;; + zkstack__dev__help__clean,containers) + cmd="zkstack__dev__help__clean__containers" + ;; + zkstack__dev__help__clean,contracts-cache) + cmd="zkstack__dev__help__clean__contracts__cache" + ;; + zkstack__dev__help__database,check-sqlx-data) + cmd="zkstack__dev__help__database__check__sqlx__data" + ;; + zkstack__dev__help__database,drop) + cmd="zkstack__dev__help__database__drop" + ;; + zkstack__dev__help__database,migrate) + cmd="zkstack__dev__help__database__migrate" + ;; + zkstack__dev__help__database,new-migration) + cmd="zkstack__dev__help__database__new__migration" + ;; + zkstack__dev__help__database,prepare) + cmd="zkstack__dev__help__database__prepare" + ;; + zkstack__dev__help__database,reset) + cmd="zkstack__dev__help__database__reset" + ;; + zkstack__dev__help__database,setup) + cmd="zkstack__dev__help__database__setup" + ;; + zkstack__dev__help__fmt,contract) + cmd="zkstack__dev__help__fmt__contract" + ;; + zkstack__dev__help__fmt,prettier) + cmd="zkstack__dev__help__fmt__prettier" + ;; + zkstack__dev__help__fmt,rustfmt) + cmd="zkstack__dev__help__fmt__rustfmt" + ;; + zkstack__dev__help__prover,info) + cmd="zkstack__dev__help__prover__info" + ;; + zkstack__dev__help__prover,insert-batch) + cmd="zkstack__dev__help__prover__insert__batch" + ;; + zkstack__dev__help__prover,insert-version) + cmd="zkstack__dev__help__prover__insert__version" + ;; + zkstack__dev__help__snapshot,create) + cmd="zkstack__dev__help__snapshot__create" + ;; + zkstack__dev__help__status,ports) + cmd="zkstack__dev__help__status__ports" + ;; + zkstack__dev__help__test,build) + cmd="zkstack__dev__help__test__build" + ;; + zkstack__dev__help__test,fees) + cmd="zkstack__dev__help__test__fees" + ;; + zkstack__dev__help__test,integration) + cmd="zkstack__dev__help__test__integration" + ;; + zkstack__dev__help__test,l1-contracts) + cmd="zkstack__dev__help__test__l1__contracts" + ;; + zkstack__dev__help__test,loadtest) + cmd="zkstack__dev__help__test__loadtest" + ;; + zkstack__dev__help__test,prover) + cmd="zkstack__dev__help__test__prover" + ;; + zkstack__dev__help__test,recovery) + cmd="zkstack__dev__help__test__recovery" + ;; + zkstack__dev__help__test,revert) + cmd="zkstack__dev__help__test__revert" + ;; + zkstack__dev__help__test,rust) + cmd="zkstack__dev__help__test__rust" + ;; + zkstack__dev__help__test,upgrade) + cmd="zkstack__dev__help__test__upgrade" + ;; + zkstack__dev__help__test,wallet) + cmd="zkstack__dev__help__test__wallet" + ;; + zkstack__dev__prover,help) + cmd="zkstack__dev__prover__help" + ;; + zkstack__dev__prover,info) + cmd="zkstack__dev__prover__info" + ;; + zkstack__dev__prover,insert-batch) + cmd="zkstack__dev__prover__insert__batch" + ;; + zkstack__dev__prover,insert-version) + cmd="zkstack__dev__prover__insert__version" + ;; + zkstack__dev__prover__help,help) + cmd="zkstack__dev__prover__help__help" + ;; + zkstack__dev__prover__help,info) + cmd="zkstack__dev__prover__help__info" + ;; + zkstack__dev__prover__help,insert-batch) + cmd="zkstack__dev__prover__help__insert__batch" + ;; + zkstack__dev__prover__help,insert-version) + cmd="zkstack__dev__prover__help__insert__version" + ;; + zkstack__dev__snapshot,create) + cmd="zkstack__dev__snapshot__create" + ;; + zkstack__dev__snapshot,help) + cmd="zkstack__dev__snapshot__help" + ;; + zkstack__dev__snapshot__help,create) + cmd="zkstack__dev__snapshot__help__create" + ;; + zkstack__dev__snapshot__help,help) + cmd="zkstack__dev__snapshot__help__help" + ;; + zkstack__dev__status,help) + cmd="zkstack__dev__status__help" + ;; + zkstack__dev__status,ports) + cmd="zkstack__dev__status__ports" + ;; + zkstack__dev__status__help,help) + cmd="zkstack__dev__status__help__help" + ;; + zkstack__dev__status__help,ports) + cmd="zkstack__dev__status__help__ports" + ;; + zkstack__dev__test,build) + cmd="zkstack__dev__test__build" + ;; + zkstack__dev__test,fees) + cmd="zkstack__dev__test__fees" + ;; + zkstack__dev__test,help) + cmd="zkstack__dev__test__help" + ;; + zkstack__dev__test,integration) + cmd="zkstack__dev__test__integration" + ;; + zkstack__dev__test,l1-contracts) + cmd="zkstack__dev__test__l1__contracts" + ;; + zkstack__dev__test,loadtest) + cmd="zkstack__dev__test__loadtest" + ;; + zkstack__dev__test,prover) + cmd="zkstack__dev__test__prover" + ;; + zkstack__dev__test,recovery) + cmd="zkstack__dev__test__recovery" + ;; + zkstack__dev__test,revert) + cmd="zkstack__dev__test__revert" + ;; + zkstack__dev__test,rust) + cmd="zkstack__dev__test__rust" + ;; + zkstack__dev__test,upgrade) + cmd="zkstack__dev__test__upgrade" + ;; + zkstack__dev__test,wallet) + cmd="zkstack__dev__test__wallet" + ;; + zkstack__dev__test__help,build) + cmd="zkstack__dev__test__help__build" + ;; + zkstack__dev__test__help,fees) + cmd="zkstack__dev__test__help__fees" + ;; + zkstack__dev__test__help,help) + cmd="zkstack__dev__test__help__help" + ;; + zkstack__dev__test__help,integration) + cmd="zkstack__dev__test__help__integration" + ;; + zkstack__dev__test__help,l1-contracts) + cmd="zkstack__dev__test__help__l1__contracts" + ;; + zkstack__dev__test__help,loadtest) + cmd="zkstack__dev__test__help__loadtest" + ;; + zkstack__dev__test__help,prover) + cmd="zkstack__dev__test__help__prover" + ;; + zkstack__dev__test__help,recovery) + cmd="zkstack__dev__test__help__recovery" + ;; + zkstack__dev__test__help,revert) + cmd="zkstack__dev__test__help__revert" + ;; + zkstack__dev__test__help,rust) + cmd="zkstack__dev__test__help__rust" + ;; + zkstack__dev__test__help,upgrade) + cmd="zkstack__dev__test__help__upgrade" + ;; + zkstack__dev__test__help,wallet) + cmd="zkstack__dev__test__help__wallet" + ;; + zkstack__ecosystem,build-transactions) + cmd="zkstack__ecosystem__build__transactions" + ;; + zkstack__ecosystem,change-default-chain) + cmd="zkstack__ecosystem__change__default__chain" + ;; + zkstack__ecosystem,create) + cmd="zkstack__ecosystem__create" + ;; + zkstack__ecosystem,help) + cmd="zkstack__ecosystem__help" + ;; + zkstack__ecosystem,init) + cmd="zkstack__ecosystem__init" + ;; + zkstack__ecosystem,setup-observability) + cmd="zkstack__ecosystem__setup__observability" + ;; + zkstack__ecosystem__help,build-transactions) + cmd="zkstack__ecosystem__help__build__transactions" + ;; + zkstack__ecosystem__help,change-default-chain) + cmd="zkstack__ecosystem__help__change__default__chain" + ;; + zkstack__ecosystem__help,create) + cmd="zkstack__ecosystem__help__create" + ;; + zkstack__ecosystem__help,help) + cmd="zkstack__ecosystem__help__help" + ;; + zkstack__ecosystem__help,init) + cmd="zkstack__ecosystem__help__init" + ;; + zkstack__ecosystem__help,setup-observability) + cmd="zkstack__ecosystem__help__setup__observability" + ;; + zkstack__explorer,help) + cmd="zkstack__explorer__help" + ;; + zkstack__explorer,init) + cmd="zkstack__explorer__init" + ;; + zkstack__explorer,run) + cmd="zkstack__explorer__run" + ;; + zkstack__explorer,run-backend) + cmd="zkstack__explorer__run__backend" + ;; + zkstack__explorer__help,help) + cmd="zkstack__explorer__help__help" + ;; + zkstack__explorer__help,init) + cmd="zkstack__explorer__help__init" + ;; + zkstack__explorer__help,run) + cmd="zkstack__explorer__help__run" + ;; + zkstack__explorer__help,run-backend) + cmd="zkstack__explorer__help__run__backend" + ;; + zkstack__external__node,build) + cmd="zkstack__external__node__build" + ;; + zkstack__external__node,configs) + cmd="zkstack__external__node__configs" + ;; + zkstack__external__node,help) + cmd="zkstack__external__node__help" + ;; + zkstack__external__node,init) + cmd="zkstack__external__node__init" + ;; + zkstack__external__node,run) + cmd="zkstack__external__node__run" + ;; + zkstack__external__node,wait) + cmd="zkstack__external__node__wait" + ;; + zkstack__external__node__help,build) + cmd="zkstack__external__node__help__build" + ;; + zkstack__external__node__help,configs) + cmd="zkstack__external__node__help__configs" + ;; + zkstack__external__node__help,help) + cmd="zkstack__external__node__help__help" + ;; + zkstack__external__node__help,init) + cmd="zkstack__external__node__help__init" + ;; + zkstack__external__node__help,run) + cmd="zkstack__external__node__help__run" + ;; + zkstack__external__node__help,wait) + cmd="zkstack__external__node__help__wait" + ;; + zkstack__help,autocomplete) + cmd="zkstack__help__autocomplete" + ;; + zkstack__help,chain) + cmd="zkstack__help__chain" + ;; + zkstack__help,containers) + cmd="zkstack__help__containers" + ;; + zkstack__help,dev) + cmd="zkstack__help__dev" + ;; + zkstack__help,ecosystem) + cmd="zkstack__help__ecosystem" + ;; + zkstack__help,explorer) + cmd="zkstack__help__explorer" + ;; + zkstack__help,external-node) + cmd="zkstack__help__external__node" + ;; + zkstack__help,help) + cmd="zkstack__help__help" + ;; + zkstack__help,markdown) + cmd="zkstack__help__markdown" + ;; + zkstack__help,portal) + cmd="zkstack__help__portal" + ;; + zkstack__help,prover) + cmd="zkstack__help__prover" + ;; + zkstack__help,update) + cmd="zkstack__help__update" + ;; + zkstack__help__chain,accept-chain-ownership) + cmd="zkstack__help__chain__accept__chain__ownership" + ;; + zkstack__help__chain,build-transactions) + cmd="zkstack__help__chain__build__transactions" + ;; + zkstack__help__chain,consensus) + cmd="zkstack__help__chain__consensus" + ;; + zkstack__help__chain,contract-verifier) + cmd="zkstack__help__chain__contract__verifier" + ;; + zkstack__help__chain,create) + cmd="zkstack__help__chain__create" + ;; + zkstack__help__chain,deploy-consensus-registry) + cmd="zkstack__help__chain__deploy__consensus__registry" + ;; + zkstack__help__chain,deploy-l2-contracts) + cmd="zkstack__help__chain__deploy__l2__contracts" + ;; + zkstack__help__chain,deploy-multicall3) + cmd="zkstack__help__chain__deploy__multicall3" + ;; + zkstack__help__chain,deploy-paymaster) + cmd="zkstack__help__chain__deploy__paymaster" + ;; + zkstack__help__chain,deploy-timestamp-asserter) + cmd="zkstack__help__chain__deploy__timestamp__asserter" + ;; + zkstack__help__chain,deploy-upgrader) + cmd="zkstack__help__chain__deploy__upgrader" + ;; + zkstack__help__chain,genesis) + cmd="zkstack__help__chain__genesis" + ;; + zkstack__help__chain,init) + cmd="zkstack__help__chain__init" + ;; + zkstack__help__chain,initialize-bridges) + cmd="zkstack__help__chain__initialize__bridges" + ;; + zkstack__help__chain,register-chain) + cmd="zkstack__help__chain__register__chain" + ;; + zkstack__help__chain,server) + cmd="zkstack__help__chain__server" + ;; + zkstack__help__chain,update-token-multiplier-setter) + cmd="zkstack__help__chain__update__token__multiplier__setter" + ;; + zkstack__help__chain__consensus,get-attester-committee) + cmd="zkstack__help__chain__consensus__get__attester__committee" + ;; + zkstack__help__chain__consensus,set-attester-committee) + cmd="zkstack__help__chain__consensus__set__attester__committee" + ;; + zkstack__help__chain__consensus,wait-for-registry) + cmd="zkstack__help__chain__consensus__wait__for__registry" + ;; + zkstack__help__chain__contract__verifier,build) + cmd="zkstack__help__chain__contract__verifier__build" + ;; + zkstack__help__chain__contract__verifier,init) + cmd="zkstack__help__chain__contract__verifier__init" + ;; + zkstack__help__chain__contract__verifier,run) + cmd="zkstack__help__chain__contract__verifier__run" + ;; + zkstack__help__chain__contract__verifier,wait) + cmd="zkstack__help__chain__contract__verifier__wait" + ;; + zkstack__help__chain__genesis,init-database) + cmd="zkstack__help__chain__genesis__init__database" + ;; + zkstack__help__chain__genesis,server) + cmd="zkstack__help__chain__genesis__server" + ;; + zkstack__help__chain__init,configs) + cmd="zkstack__help__chain__init__configs" + ;; + zkstack__help__chain__server,build) + cmd="zkstack__help__chain__server__build" + ;; + zkstack__help__chain__server,run) + cmd="zkstack__help__chain__server__run" + ;; + zkstack__help__chain__server,wait) + cmd="zkstack__help__chain__server__wait" + ;; + zkstack__help__dev,clean) + cmd="zkstack__help__dev__clean" + ;; + zkstack__help__dev,config-writer) + cmd="zkstack__help__dev__config__writer" + ;; + zkstack__help__dev,contracts) + cmd="zkstack__help__dev__contracts" + ;; + zkstack__help__dev,database) + cmd="zkstack__help__dev__database" + ;; + zkstack__help__dev,fmt) + cmd="zkstack__help__dev__fmt" + ;; + zkstack__help__dev,generate-genesis) + cmd="zkstack__help__dev__generate__genesis" + ;; + zkstack__help__dev,lint) + cmd="zkstack__help__dev__lint" + ;; + zkstack__help__dev,prover) + cmd="zkstack__help__dev__prover" + ;; + zkstack__help__dev,send-transactions) + cmd="zkstack__help__dev__send__transactions" + ;; + zkstack__help__dev,snapshot) + cmd="zkstack__help__dev__snapshot" + ;; + zkstack__help__dev,status) + cmd="zkstack__help__dev__status" + ;; + zkstack__help__dev,test) + cmd="zkstack__help__dev__test" + ;; + zkstack__help__dev__clean,all) + cmd="zkstack__help__dev__clean__all" + ;; + zkstack__help__dev__clean,containers) + cmd="zkstack__help__dev__clean__containers" + ;; + zkstack__help__dev__clean,contracts-cache) + cmd="zkstack__help__dev__clean__contracts__cache" + ;; + zkstack__help__dev__database,check-sqlx-data) + cmd="zkstack__help__dev__database__check__sqlx__data" + ;; + zkstack__help__dev__database,drop) + cmd="zkstack__help__dev__database__drop" + ;; + zkstack__help__dev__database,migrate) + cmd="zkstack__help__dev__database__migrate" + ;; + zkstack__help__dev__database,new-migration) + cmd="zkstack__help__dev__database__new__migration" + ;; + zkstack__help__dev__database,prepare) + cmd="zkstack__help__dev__database__prepare" + ;; + zkstack__help__dev__database,reset) + cmd="zkstack__help__dev__database__reset" + ;; + zkstack__help__dev__database,setup) + cmd="zkstack__help__dev__database__setup" + ;; + zkstack__help__dev__fmt,contract) + cmd="zkstack__help__dev__fmt__contract" + ;; + zkstack__help__dev__fmt,prettier) + cmd="zkstack__help__dev__fmt__prettier" + ;; + zkstack__help__dev__fmt,rustfmt) + cmd="zkstack__help__dev__fmt__rustfmt" + ;; + zkstack__help__dev__prover,info) + cmd="zkstack__help__dev__prover__info" + ;; + zkstack__help__dev__prover,insert-batch) + cmd="zkstack__help__dev__prover__insert__batch" + ;; + zkstack__help__dev__prover,insert-version) + cmd="zkstack__help__dev__prover__insert__version" + ;; + zkstack__help__dev__snapshot,create) + cmd="zkstack__help__dev__snapshot__create" + ;; + zkstack__help__dev__status,ports) + cmd="zkstack__help__dev__status__ports" + ;; + zkstack__help__dev__test,build) + cmd="zkstack__help__dev__test__build" + ;; + zkstack__help__dev__test,fees) + cmd="zkstack__help__dev__test__fees" + ;; + zkstack__help__dev__test,integration) + cmd="zkstack__help__dev__test__integration" + ;; + zkstack__help__dev__test,l1-contracts) + cmd="zkstack__help__dev__test__l1__contracts" + ;; + zkstack__help__dev__test,loadtest) + cmd="zkstack__help__dev__test__loadtest" + ;; + zkstack__help__dev__test,prover) + cmd="zkstack__help__dev__test__prover" + ;; + zkstack__help__dev__test,recovery) + cmd="zkstack__help__dev__test__recovery" + ;; + zkstack__help__dev__test,revert) + cmd="zkstack__help__dev__test__revert" + ;; + zkstack__help__dev__test,rust) + cmd="zkstack__help__dev__test__rust" + ;; + zkstack__help__dev__test,upgrade) + cmd="zkstack__help__dev__test__upgrade" + ;; + zkstack__help__dev__test,wallet) + cmd="zkstack__help__dev__test__wallet" + ;; + zkstack__help__ecosystem,build-transactions) + cmd="zkstack__help__ecosystem__build__transactions" + ;; + zkstack__help__ecosystem,change-default-chain) + cmd="zkstack__help__ecosystem__change__default__chain" + ;; + zkstack__help__ecosystem,create) + cmd="zkstack__help__ecosystem__create" + ;; + zkstack__help__ecosystem,init) + cmd="zkstack__help__ecosystem__init" + ;; + zkstack__help__ecosystem,setup-observability) + cmd="zkstack__help__ecosystem__setup__observability" + ;; + zkstack__help__explorer,init) + cmd="zkstack__help__explorer__init" + ;; + zkstack__help__explorer,run) + cmd="zkstack__help__explorer__run" + ;; + zkstack__help__explorer,run-backend) + cmd="zkstack__help__explorer__run__backend" + ;; + zkstack__help__external__node,build) + cmd="zkstack__help__external__node__build" + ;; + zkstack__help__external__node,configs) + cmd="zkstack__help__external__node__configs" + ;; + zkstack__help__external__node,init) + cmd="zkstack__help__external__node__init" + ;; + zkstack__help__external__node,run) + cmd="zkstack__help__external__node__run" + ;; + zkstack__help__external__node,wait) + cmd="zkstack__help__external__node__wait" + ;; + zkstack__help__prover,compressor-keys) + cmd="zkstack__help__prover__compressor__keys" + ;; + zkstack__help__prover,init) + cmd="zkstack__help__prover__init" + ;; + zkstack__help__prover,init-bellman-cuda) + cmd="zkstack__help__prover__init__bellman__cuda" + ;; + zkstack__help__prover,run) + cmd="zkstack__help__prover__run" + ;; + zkstack__help__prover,setup-keys) + cmd="zkstack__help__prover__setup__keys" + ;; + zkstack__prover,compressor-keys) + cmd="zkstack__prover__compressor__keys" + ;; + zkstack__prover,help) + cmd="zkstack__prover__help" + ;; + zkstack__prover,init) + cmd="zkstack__prover__init" + ;; + zkstack__prover,init-bellman-cuda) + cmd="zkstack__prover__init__bellman__cuda" + ;; + zkstack__prover,run) + cmd="zkstack__prover__run" + ;; + zkstack__prover,setup-keys) + cmd="zkstack__prover__setup__keys" + ;; + zkstack__prover__help,compressor-keys) + cmd="zkstack__prover__help__compressor__keys" + ;; + zkstack__prover__help,help) + cmd="zkstack__prover__help__help" + ;; + zkstack__prover__help,init) + cmd="zkstack__prover__help__init" + ;; + zkstack__prover__help,init-bellman-cuda) + cmd="zkstack__prover__help__init__bellman__cuda" + ;; + zkstack__prover__help,run) + cmd="zkstack__prover__help__run" + ;; + zkstack__prover__help,setup-keys) + cmd="zkstack__prover__help__setup__keys" + ;; + *) + ;; + esac + done + + case "${cmd}" in + zkstack) + opts="-v -h -V --verbose --chain --ignore-prerequisites --help --version autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__autocomplete) + opts="-o -v -h --generate --out --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --generate) + COMPREPLY=($(compgen -W "bash elvish fish powershell zsh" -- "${cur}")) + return 0 + ;; + --out) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain) + opts="-v -h --verbose --chain --ignore-prerequisites --help create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__accept__chain__ownership) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__build__transactions) + opts="-o -a -v -h --out --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --l1-rpc-url --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --out) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --l1-rpc-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus) + opts="-v -h --verbose --chain --ignore-prerequisites --help set-attester-committee get-attester-committee wait-for-registry help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__get__attester__committee) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__help) + opts="set-attester-committee get-attester-committee wait-for-registry help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__help__get__attester__committee) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__help__set__attester__committee) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__help__wait__for__registry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__set__attester__committee) + opts="-v -h --from-genesis --from-file --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --from-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__consensus__wait__for__registry) + opts="-t -v -h --timeout --poll-interval --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --timeout) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --poll-interval) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier) + opts="-v -h --verbose --chain --ignore-prerequisites --help build run wait init help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__build) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__help) + opts="build run wait init help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__help__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__help__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__help__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__help__wait) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__init) + opts="-v -h --zksolc-version --zkvyper-version --solc-version --era-vm-solc-version --vyper-version --only --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --zksolc-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --zkvyper-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --solc-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --era-vm-solc-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --vyper-version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__run) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__contract__verifier__wait) + opts="-t -v -h --timeout --poll-interval --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --timeout) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --poll-interval) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__create) + opts="-v -h --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --prover-mode) + COMPREPLY=($(compgen -W "no-proofs gpu" -- "${cur}")) + return 0 + ;; + --wallet-creation) + COMPREPLY=($(compgen -W "localhost random empty in-file" -- "${cur}")) + return 0 + ;; + --wallet-path) + local oldifs + if [ -n "${IFS+x}" ]; then + oldifs="$IFS" + fi + IFS=$'\n' + COMPREPLY=($(compgen -f "${cur}")) + if [ -n "${oldifs+x}" ]; then + IFS="$oldifs" + fi + if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then + compopt -o filenames + fi + return 0 + ;; + --l1-batch-commit-data-generator-mode) + COMPREPLY=($(compgen -W "rollup validium" -- "${cur}")) + return 0 + ;; + --base-token-address) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --base-token-price-nominator) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --base-token-price-denominator) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --set-as-default) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --evm-emulator) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__deploy__consensus__registry) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__deploy__l2__contracts) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__deploy__multicall3) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__deploy__paymaster) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__deploy__timestamp__asserter) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__deploy__upgrader) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__genesis) + opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --verbose --chain --ignore-prerequisites --help init-database server help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --server-db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__genesis__help) + opts="init-database server help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__genesis__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__genesis__help__init__database) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__genesis__help__server) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__genesis__init__database) + opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --server-db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__genesis__server) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help) + opts="create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__accept__chain__ownership) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__build__transactions) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__consensus) + opts="set-attester-committee get-attester-committee wait-for-registry" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__consensus__get__attester__committee) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__consensus__set__attester__committee) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__consensus__wait__for__registry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__contract__verifier) + opts="build run wait init" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__contract__verifier__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__contract__verifier__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__contract__verifier__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__contract__verifier__wait) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__create) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__deploy__consensus__registry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__deploy__l2__contracts) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__deploy__multicall3) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__deploy__paymaster) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__deploy__timestamp__asserter) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__deploy__upgrader) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__genesis) + opts="init-database server" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__genesis__init__database) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__genesis__server) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__init) + opts="configs" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__init__configs) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__initialize__bridges) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__register__chain) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__server) + opts="build run wait" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__server__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__server__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__server__wait) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__help__update__token__multiplier__setter) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__init) + opts="-a -d -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --server-db-url --server-db-name --dont-drop --deploy-paymaster --l1-rpc-url --no-port-reallocation --dev --verbose --chain --ignore-prerequisites --help configs help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --deploy-paymaster) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --l1-rpc-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__init__configs) + opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --l1-rpc-url --no-port-reallocation --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --server-db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --l1-rpc-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__init__help) + opts="configs help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__init__help__configs) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__init__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__initialize__bridges) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__register__chain) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__server) + opts="-a -v -h --components --genesis --additional-args --uring --verbose --chain --ignore-prerequisites --help build run wait help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --components) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__server__build) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__server__help) + opts="build run wait help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__server__help__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__server__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__server__help__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__server__help__wait) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__server__run) + opts="-a -v -h --components --genesis --additional-args --uring --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --components) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__server__wait) + opts="-t -v -h --timeout --poll-interval --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --timeout) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --poll-interval) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__chain__update__token__multiplier__setter) + opts="-a -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__containers) + opts="-o -v -h --observability --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --observability) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev) + opts="-v -h --verbose --chain --ignore-prerequisites --help database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__clean) + opts="-v -h --verbose --chain --ignore-prerequisites --help all containers contracts-cache help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__clean__all) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__clean__containers) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__clean__contracts__cache) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__clean__help) + opts="all containers contracts-cache help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__clean__help__all) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__clean__help__containers) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__clean__help__contracts__cache) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__clean__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__config__writer) + opts="-p -v -h --path --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -p) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__contracts) + opts="-v -h --l1-contracts --l2-contracts --system-contracts --test-contracts --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --l1-contracts) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --l2-contracts) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --system-contracts) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --test-contracts) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database) + opts="-v -h --verbose --chain --ignore-prerequisites --help check-sqlx-data drop migrate new-migration prepare reset setup help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__check__sqlx__data) + opts="-p -c -v -h --prover --prover-url --core --core-url --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --prover) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -p) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --prover-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --core) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --core-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__drop) + opts="-p -c -v -h --prover --prover-url --core --core-url --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --prover) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -p) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --prover-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --core) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --core-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__help) + opts="check-sqlx-data drop migrate new-migration prepare reset setup help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__help__check__sqlx__data) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__help__drop) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__help__migrate) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__help__new__migration) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__help__prepare) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__help__reset) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__help__setup) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__migrate) + opts="-p -c -v -h --prover --prover-url --core --core-url --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --prover) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -p) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --prover-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --core) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --core-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__new__migration) + opts="-v -h --database --name --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --database) + COMPREPLY=($(compgen -W "prover core" -- "${cur}")) + return 0 + ;; + --name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__prepare) + opts="-p -c -v -h --prover --prover-url --core --core-url --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --prover) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -p) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --prover-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --core) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --core-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__reset) + opts="-p -c -v -h --prover --prover-url --core --core-url --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --prover) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -p) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --prover-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --core) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --core-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__database__setup) + opts="-p -c -v -h --prover --prover-url --core --core-url --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --prover) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -p) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --prover-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --core) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --core-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__fmt) + opts="-c -v -h --check --verbose --chain --ignore-prerequisites --help rustfmt contract prettier help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__fmt__contract) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__fmt__help) + opts="rustfmt contract prettier help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__fmt__help__contract) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__fmt__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__fmt__help__prettier) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__fmt__help__rustfmt) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__fmt__prettier) + opts="-t -v -h --targets --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --targets) + COMPREPLY=($(compgen -W "md sol js ts rs contracts autocompletion rust-toolchain" -- "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -W "md sol js ts rs contracts autocompletion rust-toolchain" -- "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__fmt__rustfmt) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__generate__genesis) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help) + opts="database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__clean) + opts="all containers contracts-cache" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__clean__all) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__clean__containers) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__clean__contracts__cache) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__config__writer) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__contracts) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__database) + opts="check-sqlx-data drop migrate new-migration prepare reset setup" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__database__check__sqlx__data) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__database__drop) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__database__migrate) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__database__new__migration) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__database__prepare) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__database__reset) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__database__setup) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__fmt) + opts="rustfmt contract prettier" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__fmt__contract) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__fmt__prettier) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__fmt__rustfmt) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__generate__genesis) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__lint) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__prover) + opts="info insert-batch insert-version" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__prover__info) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__prover__insert__batch) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__prover__insert__version) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__send__transactions) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__snapshot) + opts="create" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__snapshot__create) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__status) + opts="ports" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__status__ports) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test) + opts="integration fees revert recovery upgrade build rust l1-contracts prover wallet loadtest" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__fees) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__integration) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__l1__contracts) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__loadtest) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__prover) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__recovery) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__revert) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__rust) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__upgrade) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__help__test__wallet) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__lint) + opts="-c -t -v -h --check --targets --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --targets) + COMPREPLY=($(compgen -W "md sol js ts rs contracts autocompletion rust-toolchain" -- "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -W "md sol js ts rs contracts autocompletion rust-toolchain" -- "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__prover) + opts="-v -h --verbose --chain --ignore-prerequisites --help info insert-batch insert-version help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__prover__help) + opts="info insert-batch insert-version help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__prover__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__prover__help__info) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__prover__help__insert__batch) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__prover__help__insert__version) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__prover__info) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__prover__insert__batch) + opts="-v -h --number --default --version --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --number) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__prover__insert__version) + opts="-v -h --default --version --snark-wrapper --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --version) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --snark-wrapper) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__send__transactions) + opts="-v -h --file --private-key --l1-rpc-url --confirmations --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --private-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --l1-rpc-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --confirmations) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__snapshot) + opts="-v -h --verbose --chain --ignore-prerequisites --help create help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__snapshot__create) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__snapshot__help) + opts="create help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__snapshot__help__create) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__snapshot__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__status) + opts="-u -v -h --url --verbose --chain --ignore-prerequisites --help ports help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -u) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__status__help) + opts="ports help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__status__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__status__help__ports) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__status__ports) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test) + opts="-v -h --verbose --chain --ignore-prerequisites --help integration fees revert recovery upgrade build rust l1-contracts prover wallet loadtest help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__build) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__fees) + opts="-n -v -h --no-deps --no-kill --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help) + opts="integration fees revert recovery upgrade build rust l1-contracts prover wallet loadtest help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__fees) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__integration) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__l1__contracts) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__loadtest) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__prover) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__recovery) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__revert) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__rust) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__upgrade) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__help__wallet) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__integration) + opts="-e -n -t -v -h --external-node --no-deps --test-pattern --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --test-pattern) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__l1__contracts) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__loadtest) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__prover) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__recovery) + opts="-s -n -v -h --snapshot --no-deps --no-kill --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__revert) + opts="-e -n -v -h --enable-consensus --external-node --no-deps --no-kill --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__rust) + opts="-v -h --options --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --options) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__upgrade) + opts="-n -v -h --no-deps --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__dev__test__wallet) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem) + opts="-v -h --verbose --chain --ignore-prerequisites --help create build-transactions init change-default-chain setup-observability help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__build__transactions) + opts="-o -a -v -h --sender --l1-rpc-url --out --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --sender) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --l1-rpc-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --out) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__change__default__chain) + opts="-v -h --verbose --chain --ignore-prerequisites --help [NAME]" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__create) + opts="-v -h --ecosystem-name --l1-network --link-to-code --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --start-containers --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --ecosystem-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --l1-network) + COMPREPLY=($(compgen -W "localhost sepolia holesky mainnet" -- "${cur}")) + return 0 + ;; + --link-to-code) + COMPREPLY=() + if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then + compopt -o plusdirs + fi + return 0 + ;; + --chain-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --prover-mode) + COMPREPLY=($(compgen -W "no-proofs gpu" -- "${cur}")) + return 0 + ;; + --wallet-creation) + COMPREPLY=($(compgen -W "localhost random empty in-file" -- "${cur}")) + return 0 + ;; + --wallet-path) + local oldifs + if [ -n "${IFS+x}" ]; then + oldifs="$IFS" + fi + IFS=$'\n' + COMPREPLY=($(compgen -f "${cur}")) + if [ -n "${oldifs+x}" ]; then + IFS="$oldifs" + fi + if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then + compopt -o filenames + fi + return 0 + ;; + --l1-batch-commit-data-generator-mode) + COMPREPLY=($(compgen -W "rollup validium" -- "${cur}")) + return 0 + ;; + --base-token-address) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --base-token-price-nominator) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --base-token-price-denominator) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --set-as-default) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --evm-emulator) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --start-containers) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__help) + opts="create build-transactions init change-default-chain setup-observability help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__help__build__transactions) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__help__change__default__chain) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__help__create) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__help__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__help__setup__observability) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__init) + opts="-a -d -o -v -h --deploy-erc20 --deploy-ecosystem --ecosystem-contracts-path --l1-rpc-url --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --deploy-paymaster --server-db-url --server-db-name --dont-drop --ecosystem-only --dev --observability --no-port-reallocation --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --deploy-erc20) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --deploy-ecosystem) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --ecosystem-contracts-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --l1-rpc-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verify) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --verifier) + COMPREPLY=($(compgen -W "etherscan sourcify blockscout oklink" -- "${cur}")) + return 0 + ;; + --verifier-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --verifier-api-key) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --deploy-paymaster) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --server-db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --server-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --observability) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -o) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__ecosystem__setup__observability) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__explorer) + opts="-v -h --verbose --chain --ignore-prerequisites --help init run-backend run help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__explorer__help) + opts="init run-backend run help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__explorer__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__explorer__help__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__explorer__help__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__explorer__help__run__backend) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__explorer__init) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__explorer__run) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__explorer__run__backend) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node) + opts="-v -h --verbose --chain --ignore-prerequisites --help configs init build run wait help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__build) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__configs) + opts="-u -v -h --db-url --db-name --l1-rpc-url --use-default --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --l1-rpc-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__help) + opts="configs init build run wait help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__help__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__help__configs) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__help__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__help__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__help__wait) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__init) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__run) + opts="-a -v -h --reinit --components --enable-consensus --additional-args --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --components) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --enable-consensus) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --additional-args) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -a) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__external__node__wait) + opts="-t -v -h --timeout --poll-interval --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --timeout) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --poll-interval) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help) + opts="autocomplete ecosystem chain dev prover external-node containers portal explorer update markdown help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__autocomplete) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain) + opts="create build-transactions init genesis register-chain deploy-l2-contracts accept-chain-ownership initialize-bridges deploy-consensus-registry deploy-multicall3 deploy-timestamp-asserter deploy-upgrader deploy-paymaster update-token-multiplier-setter server contract-verifier consensus" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__accept__chain__ownership) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__build__transactions) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__consensus) + opts="set-attester-committee get-attester-committee wait-for-registry" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__consensus__get__attester__committee) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__consensus__set__attester__committee) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__consensus__wait__for__registry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__contract__verifier) + opts="build run wait init" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__contract__verifier__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__contract__verifier__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__contract__verifier__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__contract__verifier__wait) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__create) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__deploy__consensus__registry) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__deploy__l2__contracts) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__deploy__multicall3) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__deploy__paymaster) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__deploy__timestamp__asserter) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__deploy__upgrader) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__genesis) + opts="init-database server" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__genesis__init__database) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__genesis__server) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__init) + opts="configs" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__init__configs) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__initialize__bridges) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__register__chain) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__server) + opts="build run wait" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__server__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__server__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__server__wait) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__chain__update__token__multiplier__setter) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__containers) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev) + opts="database test clean snapshot lint fmt prover contracts config-writer send-transactions status generate-genesis" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__clean) + opts="all containers contracts-cache" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__clean__all) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__clean__containers) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__clean__contracts__cache) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__config__writer) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__contracts) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__database) + opts="check-sqlx-data drop migrate new-migration prepare reset setup" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__database__check__sqlx__data) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__database__drop) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__database__migrate) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__database__new__migration) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__database__prepare) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__database__reset) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__database__setup) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__fmt) + opts="rustfmt contract prettier" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__fmt__contract) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__fmt__prettier) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__fmt__rustfmt) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__generate__genesis) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__lint) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__prover) + opts="info insert-batch insert-version" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__prover__info) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__prover__insert__batch) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__prover__insert__version) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__send__transactions) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__snapshot) + opts="create" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__snapshot__create) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__status) + opts="ports" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__status__ports) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test) + opts="integration fees revert recovery upgrade build rust l1-contracts prover wallet loadtest" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__fees) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__integration) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__l1__contracts) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__loadtest) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__prover) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__recovery) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__revert) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__rust) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__upgrade) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__dev__test__wallet) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 5 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__ecosystem) + opts="create build-transactions init change-default-chain setup-observability" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__ecosystem__build__transactions) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__ecosystem__change__default__chain) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__ecosystem__create) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__ecosystem__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__ecosystem__setup__observability) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__explorer) + opts="init run-backend run" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__explorer__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__explorer__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__explorer__run__backend) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__external__node) + opts="configs init build run wait" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__external__node__build) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__external__node__configs) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__external__node__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__external__node__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__external__node__wait) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__markdown) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__portal) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__prover) + opts="init setup-keys run init-bellman-cuda compressor-keys" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__prover__compressor__keys) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__prover__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__prover__init__bellman__cuda) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__prover__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__prover__setup__keys) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__help__update) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__markdown) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__portal) + opts="-v -h --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover) + opts="-v -h --verbose --chain --ignore-prerequisites --help init setup-keys run init-bellman-cuda compressor-keys help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__compressor__keys) + opts="-v -h --path --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__help) + opts="init setup-keys run init-bellman-cuda compressor-keys help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__help__compressor__keys) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__help__help) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__help__init) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__help__init__bellman__cuda) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__help__run) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__help__setup__keys) + opts="" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__init) + opts="-u -d -v -h --dev --proof-store-dir --bucket-base-url --credentials-file --bucket-name --location --project-id --shall-save-to-public-bucket --public-store-dir --public-bucket-base-url --public-credentials-file --public-bucket-name --public-location --public-project-id --clone --bellman-cuda-dir --bellman-cuda --setup-compressor-key --path --region --mode --setup-keys --setup-database --prover-db-url --prover-db-name --use-default --dont-drop --cloud-type --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --proof-store-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --bucket-base-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --credentials-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --bucket-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --location) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --project-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --shall-save-to-public-bucket) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --public-store-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --public-bucket-base-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --public-credentials-file) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --public-bucket-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --public-location) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --public-project-id) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --bellman-cuda-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --bellman-cuda) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --setup-compressor-key) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --region) + COMPREPLY=($(compgen -W "us europe asia" -- "${cur}")) + return 0 + ;; + --mode) + COMPREPLY=($(compgen -W "download generate" -- "${cur}")) + return 0 + ;; + --setup-keys) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --setup-database) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --prover-db-url) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --prover-db-name) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --use-default) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -u) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --dont-drop) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + -d) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --cloud-type) + COMPREPLY=($(compgen -W "gcp local" -- "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__init__bellman__cuda) + opts="-v -h --clone --bellman-cuda-dir --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --bellman-cuda-dir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__run) + opts="-v -h --component --round --threads --max-allocation --witness-vector-generator-count --max-allocation --docker --tag --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --component) + COMPREPLY=($(compgen -W "gateway witness-generator witness-vector-generator prover circuit-prover compressor prover-job-monitor" -- "${cur}")) + return 0 + ;; + --round) + COMPREPLY=($(compgen -W "all-rounds basic-circuits leaf-aggregation node-aggregation recursion-tip scheduler" -- "${cur}")) + return 0 + ;; + --threads) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --max-allocation) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --witness-vector-generator-count) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --max-allocation) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --docker) + COMPREPLY=($(compgen -W "true false" -- "${cur}")) + return 0 + ;; + --tag) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__prover__setup__keys) + opts="-v -h --region --mode --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --region) + COMPREPLY=($(compgen -W "us europe asia" -- "${cur}")) + return 0 + ;; + --mode) + COMPREPLY=($(compgen -W "download generate" -- "${cur}")) + return 0 + ;; + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + zkstack__update) + opts="-c -v -h --only-config --verbose --chain --ignore-prerequisites --help" + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + --chain) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + esac +} + +if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then + complete -F _zkstack -o nosort -o bashdefault -o default zkstack +else + complete -F _zkstack -o bashdefault -o default zkstack +fi From c55067c86b3a2d53ceff2f9fd6a8ce777c85b786 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 13 Nov 2024 08:04:36 -0300 Subject: [PATCH 33/38] Add zsh autocomplete file --- .gitignore | 1 - .../crates/zkstack/completion/_zkstack.zsh | 5571 +++++++++++++++++ 2 files changed, 5571 insertions(+), 1 deletion(-) create mode 100644 zkstack_cli/crates/zkstack/completion/_zkstack.zsh diff --git a/.gitignore b/.gitignore index b02c7e79e139..adf3b7799618 100644 --- a/.gitignore +++ b/.gitignore @@ -120,4 +120,3 @@ configs/* era-observability/ core/tests/ts-integration/deployments-zk transactions/ -_zkstack.zsh diff --git a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh new file mode 100644 index 000000000000..4074f1df3408 --- /dev/null +++ b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh @@ -0,0 +1,5571 @@ +#compdef zkstack + +autoload -U is-at-least + +_zkstack() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + _arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_zkstack_commands" \ +"*::: :->zkstack" \ +&& ret=0 + case $state in + (zkstack) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-command-$line[1]:" + case $line[1] in + (autocomplete) +_arguments "${_arguments_options[@]}" : \ +'--generate=[The shell to generate the autocomplete script for]:GENERATOR:(bash elvish fish powershell zsh)' \ +'-o+[The out directory to write the autocomplete script to]:OUT:_files' \ +'--out=[The out directory to write the autocomplete script to]:OUT:_files' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(ecosystem) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__ecosystem_commands" \ +"*::: :->ecosystem" \ +&& ret=0 + + case $state in + (ecosystem) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-ecosystem-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +'--ecosystem-name=[]:ECOSYSTEM_NAME:_default' \ +'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ +'--link-to-code=[Code link]:LINK_TO_CODE:_files -/' \ +'--chain-name=[]:CHAIN_NAME:_default' \ +'--chain-id=[Chain ID]:CHAIN_ID:_default' \ +'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ +'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" +random\:"Generate random wallets" +empty\:"Generate placeholder wallets" +in-file\:"Specify file with wallets"))' \ +'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ +'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ +'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ +'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ +'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ +'--set-as-default=[Set as default chain]' \ +'--evm-emulator=[Enable EVM emulator]' \ +'--start-containers=[Start reth and postgres containers after creation]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--legacy-bridge[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +'--sender=[Address of the transaction sender]:SENDER:_default' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'-o+[Output directory for the generated files]:OUT:_files' \ +'--out=[Output directory for the generated files]:OUT:_files' \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--deploy-erc20=[Deploy ERC20 contracts]' \ +'--deploy-ecosystem=[Deploy ecosystem contracts]' \ +'--ecosystem-contracts-path=[Path to ecosystem contracts]:ECOSYSTEM_CONTRACTS_PATH:_files' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--deploy-paymaster=[Deploy Paymaster contract]' \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'-o+[Enable Grafana]' \ +'--observability=[Enable Grafana]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-d[]' \ +'--dont-drop[]' \ +'--ecosystem-only[Initialize ecosystem only and skip chain initialization (chain can be initialized later with \`chain init\` subcommand)]' \ +'--dev[Use defaults for all options and flags. Suitable for local development]' \ +'--no-port-reallocation[Do not reallocate ports]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(change-default-chain) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'::name:_default' \ +&& ret=0 +;; +(setup-observability) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__ecosystem__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-ecosystem-help-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(change-default-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-observability) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(chain) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain_commands" \ +"*::: :->chain" \ +&& ret=0 + + case $state in + (chain) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +'--chain-name=[]:CHAIN_NAME:_default' \ +'--chain-id=[Chain ID]:CHAIN_ID:_default' \ +'--prover-mode=[Prover options]:PROVER_MODE:(no-proofs gpu)' \ +'--wallet-creation=[Wallet options]:WALLET_CREATION:((localhost\:"Load wallets from localhost mnemonic, they are funded for localhost env" +random\:"Generate random wallets" +empty\:"Generate placeholder wallets" +in-file\:"Specify file with wallets"))' \ +'--wallet-path=[Wallet path]:WALLET_PATH:_files' \ +'--l1-batch-commit-data-generator-mode=[Commit data generation mode]:L1_BATCH_COMMIT_DATA_GENERATOR_MODE:(rollup validium)' \ +'--base-token-address=[Base token address]:BASE_TOKEN_ADDRESS:_default' \ +'--base-token-price-nominator=[Base token nominator]:BASE_TOKEN_PRICE_NOMINATOR:_default' \ +'--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ +'--set-as-default=[Set as default chain]' \ +'--evm-emulator=[Enable EVM emulator]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--legacy-bridge[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +'-o+[Output directory for the generated files]:OUT:_files' \ +'--out=[Output directory for the generated files]:OUT:_files' \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--deploy-paymaster=[]' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-d[]' \ +'--dont-drop[]' \ +'--no-port-reallocation[Do not reallocate ports]' \ +'--dev[Use defaults for all options and flags. Suitable for local development]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +":: :_zkstack__chain__init_commands" \ +"*::: :->init" \ +&& ret=0 + + case $state in + (init) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-init-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-d[Use default database urls and names]' \ +'--dev[Use default database urls and names]' \ +'-d[]' \ +'--dont-drop[]' \ +'--no-port-reallocation[Do not reallocate ports]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__init__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-init-help-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(genesis) +_arguments "${_arguments_options[@]}" : \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-d[Use default database urls and names]' \ +'--dev[Use default database urls and names]' \ +'-d[]' \ +'--dont-drop[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__genesis_commands" \ +"*::: :->genesis" \ +&& ret=0 + + case $state in + (genesis) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-genesis-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +'--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ +'--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-d[Use default database urls and names]' \ +'--dev[Use default database urls and names]' \ +'-d[]' \ +'--dont-drop[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__genesis__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-genesis-help-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(register-chain) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-multicall3) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-timestamp-asserter) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-upgrader) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(deploy-paymaster) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(update-token-multiplier-setter) +_arguments "${_arguments_options[@]}" : \ +'--verify=[Verify deployed contracts]' \ +'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \ +'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \ +'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \ +'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--resume[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +'*--components=[Components of server to run]:COMPONENTS:_default' \ +'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--genesis[Run server in genesis mode]' \ +'--uring[Enables uring support for RocksDB]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__server_commands" \ +"*::: :->server" \ +&& ret=0 + + case $state in + (server) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-server-command-$line[1]:" + case $line[1] in + (build) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'*--components=[Components of server to run]:COMPONENTS:_default' \ +'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--genesis[Run server in genesis mode]' \ +'--uring[Enables uring support for RocksDB]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +'-t+[Wait timeout in seconds]:SECONDS:_default' \ +'--timeout=[Wait timeout in seconds]:SECONDS:_default' \ +'--poll-interval=[Poll interval in milliseconds]:MILLIS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__server__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-server-help-command-$line[1]:" + case $line[1] in + (build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-command-$line[1]:" + case $line[1] in + (build) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +'-t+[Wait timeout in seconds]:SECONDS:_default' \ +'--timeout=[Wait timeout in seconds]:SECONDS:_default' \ +'--poll-interval=[Poll interval in milliseconds]:MILLIS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--zksolc-version=[Version of zksolc to install]:ZKSOLC_VERSION:_default' \ +'--zkvyper-version=[Version of zkvyper to install]:ZKVYPER_VERSION:_default' \ +'--solc-version=[Version of solc to install]:SOLC_VERSION:_default' \ +'--era-vm-solc-version=[Version of era vm solc to install]:ERA_VM_SOLC_VERSION:_default' \ +'--vyper-version=[Version of vyper to install]:VYPER_VERSION:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--only[Install only provided compilers]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__contract-verifier__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-contract-verifier-help-command-$line[1]:" + case $line[1] in + (build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__chain__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +'--from-file=[Sets the attester committee in the consensus registry contract to the committee in the yaml file. File format is definied in \`commands/consensus/proto/mod.proto\`]:FROM_FILE:_files' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--from-genesis[Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(wait-for-registry) +_arguments "${_arguments_options[@]}" : \ +'-t+[Wait timeout in seconds]:SECONDS:_default' \ +'--timeout=[Wait timeout in seconds]:SECONDS:_default' \ +'--poll-interval=[Poll interval in milliseconds]:MILLIS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__consensus__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-consensus-help-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait-for-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__init_commands" \ +"*::: :->init" \ +&& ret=0 + + case $state in + (init) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-init-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(genesis) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__genesis_commands" \ +"*::: :->genesis" \ +&& ret=0 + + case $state in + (genesis) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-genesis-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(register-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-multicall3) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-timestamp-asserter) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-upgrader) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-paymaster) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(update-token-multiplier-setter) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__server_commands" \ +"*::: :->server" \ +&& ret=0 + + case $state in + (server) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-server-command-$line[1]:" + case $line[1] in + (build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-contract-verifier-command-$line[1]:" + case $line[1] in + (build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__chain__help__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-chain-help-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait-for-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(dev) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev_commands" \ +"*::: :->dev" \ +&& ret=0 + + case $state in + (dev) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-command-$line[1]:" + case $line[1] in + (database) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-database-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +'--database=[Database to create new migration for]:DATABASE:(prover core)' \ +'--name=[Migration name]:NAME:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +'-p+[Prover database]' \ +'--prover=[Prover database]' \ +'--prover-url=[URL of the Prover database. If not specified, it is used from the current chain'\''s secrets]:PROVER_URL:_default' \ +'-c+[Core database]' \ +'--core=[Core database]' \ +'--core-url=[URL of the Core database. If not specified, it is used from the current chain'\''s secrets.]:CORE_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__database__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-database-help-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(test) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__test_commands" \ +"*::: :->test" \ +&& ret=0 + + case $state in + (test) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-test-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +'-t+[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ +'--test-pattern=[Run just the tests matching a pattern. Same as the -t flag on jest.]:TEST_PATTERN:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-e[Run tests for external node]' \ +'--external-node[Run tests for external node]' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'--no-kill[The test will not kill all the nodes during execution]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--enable-consensus[Enable consensus]' \ +'-e[Run tests for external node]' \ +'--external-node[Run tests for external node]' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'--no-kill[The test will not kill all the nodes during execution]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-s[Run recovery from a snapshot instead of genesis]' \ +'--snapshot[Run recovery from a snapshot instead of genesis]' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'--no-kill[The test will not kill all the nodes during execution]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-n[Do not install or build dependencies]' \ +'--no-deps[Do not install or build dependencies]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +'--options=[Cargo test flags]:OPTIONS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__test__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-test-help-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(clean) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__clean_commands" \ +"*::: :->clean" \ +&& ret=0 + + case $state in + (clean) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-clean-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__clean__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-clean-help-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(snapshot) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__snapshot_commands" \ +"*::: :->snapshot" \ +&& ret=0 + + case $state in + (snapshot) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__snapshot__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-snapshot-help-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(lint) +_arguments "${_arguments_options[@]}" : \ +'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion rust-toolchain)' \ +'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion rust-toolchain)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-c[]' \ +'--check[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-c[]' \ +'--check[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__fmt_commands" \ +"*::: :->fmt" \ +&& ret=0 + + case $state in + (fmt) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-fmt-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +'*-t+[]:TARGETS:(md sol js ts rs contracts autocompletion rust-toolchain)' \ +'*--targets=[]:TARGETS:(md sol js ts rs contracts autocompletion rust-toolchain)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__fmt__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-fmt-help-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-prover-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +'--number=[]:NUMBER:_default' \ +'--version=[]:VERSION:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--default[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +'--version=[]:VERSION:_default' \ +'--snark-wrapper=[]:SNARK_WRAPPER:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--default[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__prover__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-prover-help-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(contracts) +_arguments "${_arguments_options[@]}" : \ +'--l1-contracts=[Build L1 contracts]' \ +'--l2-contracts=[Build L2 contracts]' \ +'--system-contracts=[Build system contracts]' \ +'--test-contracts=[Build test contracts]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(config-writer) +_arguments "${_arguments_options[@]}" : \ +'-p+[Path to the config file to override]:PATH:_default' \ +'--path=[Path to the config file to override]:PATH:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(send-transactions) +_arguments "${_arguments_options[@]}" : \ +'--file=[]:FILE:_files' \ +'--private-key=[]:PRIVATE_KEY:_default' \ +'--l1-rpc-url=[]:L1_RPC_URL:_default' \ +'--confirmations=[]:CONFIRMATIONS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" : \ +'-u+[URL of the health check endpoint]:URL:_default' \ +'--url=[URL of the health check endpoint]:URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__dev__status_commands" \ +"*::: :->status" \ +&& ret=0 + + case $state in + (status) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-status-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__status__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-status-help-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(generate-genesis) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-command-$line[1]:" + case $line[1] in + (database) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-database-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(test) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__test_commands" \ +"*::: :->test" \ +&& ret=0 + + case $state in + (test) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-test-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(clean) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__clean_commands" \ +"*::: :->clean" \ +&& ret=0 + + case $state in + (clean) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-clean-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(snapshot) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__snapshot_commands" \ +"*::: :->snapshot" \ +&& ret=0 + + case $state in + (snapshot) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-snapshot-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(lint) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__fmt_commands" \ +"*::: :->fmt" \ +&& ret=0 + + case $state in + (fmt) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-fmt-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-prover-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(config-writer) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(send-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__dev__help__status_commands" \ +"*::: :->status" \ +&& ret=0 + + case $state in + (status) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-dev-help-status-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(generate-genesis) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-prover-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +'--proof-store-dir=[]:PROOF_STORE_DIR:_default' \ +'--bucket-base-url=[]:BUCKET_BASE_URL:_default' \ +'--credentials-file=[]:CREDENTIALS_FILE:_default' \ +'--bucket-name=[]:BUCKET_NAME:_default' \ +'--location=[]:LOCATION:_default' \ +'--project-id=[]:PROJECT_ID:_default' \ +'--shall-save-to-public-bucket=[]:SHALL_SAVE_TO_PUBLIC_BUCKET:(true false)' \ +'--public-store-dir=[]:PUBLIC_STORE_DIR:_default' \ +'--public-bucket-base-url=[]:PUBLIC_BUCKET_BASE_URL:_default' \ +'--public-credentials-file=[]:PUBLIC_CREDENTIALS_FILE:_default' \ +'--public-bucket-name=[]:PUBLIC_BUCKET_NAME:_default' \ +'--public-location=[]:PUBLIC_LOCATION:_default' \ +'--public-project-id=[]:PUBLIC_PROJECT_ID:_default' \ +'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ +'--bellman-cuda=[]' \ +'--setup-compressor-key=[]' \ +'--path=[]:PATH:_default' \ +'--region=[]:REGION:(us europe asia)' \ +'--mode=[]:MODE:(download generate)' \ +'--setup-keys=[]' \ +'--setup-database=[]:SETUP_DATABASE:(true false)' \ +'--prover-db-url=[Prover database url without database name]:PROVER_DB_URL:_default' \ +'--prover-db-name=[Prover database name]:PROVER_DB_NAME:_default' \ +'-u+[Use default database urls and names]:USE_DEFAULT:(true false)' \ +'--use-default=[Use default database urls and names]:USE_DEFAULT:(true false)' \ +'-d+[]:DONT_DROP:(true false)' \ +'--dont-drop=[]:DONT_DROP:(true false)' \ +'--cloud-type=[]:CLOUD_TYPE:(gcp local)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--dev[]' \ +'(--bellman-cuda-dir)--clone[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(setup-keys) +_arguments "${_arguments_options[@]}" : \ +'--region=[]:REGION:(us europe asia)' \ +'--mode=[]:MODE:(download generate)' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'--component=[]:COMPONENT:(gateway witness-generator witness-vector-generator prover circuit-prover compressor prover-job-monitor)' \ +'--round=[]:ROUND:(all-rounds basic-circuits leaf-aggregation node-aggregation recursion-tip scheduler)' \ +'--threads=[]:THREADS:_default' \ +'--max-allocation=[Memory allocation limit in bytes (for prover component)]:MAX_ALLOCATION:_default' \ +'--witness-vector-generator-count=[]:WITNESS_VECTOR_GENERATOR_COUNT:_default' \ +'--max-allocation=[]:MAX_ALLOCATION:_default' \ +'--docker=[]:DOCKER:(true false)' \ +'--tag=[]:TAG:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init-bellman-cuda) +_arguments "${_arguments_options[@]}" : \ +'(--clone)--bellman-cuda-dir=[]:BELLMAN_CUDA_DIR:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'(--bellman-cuda-dir)--clone[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(compressor-keys) +_arguments "${_arguments_options[@]}" : \ +'--path=[]:PATH:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__prover__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-prover-help-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init-bellman-cuda) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(compressor-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(external-node) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__external-node_commands" \ +"*::: :->external-node" \ +&& ret=0 + + case $state in + (external-node) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-external-node-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +'--db-url=[]:DB_URL:_default' \ +'--db-name=[]:DB_NAME:_default' \ +'--l1-rpc-url=[]:L1_RPC_URL:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-u[Use default database urls and names]' \ +'--use-default[Use default database urls and names]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'*--components=[Components of server to run]:COMPONENTS:_default' \ +'--enable-consensus=[Enable consensus]' \ +'*-a+[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'*--additional-args=[Additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'--reinit[]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +'-t+[Wait timeout in seconds]:SECONDS:_default' \ +'--timeout=[Wait timeout in seconds]:SECONDS:_default' \ +'--poll-interval=[Poll interval in milliseconds]:MILLIS:_default' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__external-node__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-external-node-help-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +'-o+[Enable Grafana]' \ +'--observability=[Enable Grafana]' \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(portal) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(explorer) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_zkstack__explorer_commands" \ +"*::: :->explorer" \ +&& ret=0 + + case $state in + (explorer) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-explorer-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run-backend) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__explorer__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-explorer-help-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run-backend) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(update) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-c[Update only the config files]' \ +'--only-config[Update only the config files]' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(markdown) +_arguments "${_arguments_options[@]}" : \ +'--chain=[Chain to use]:CHAIN:_default' \ +'-v[Verbose mode]' \ +'--verbose[Verbose mode]' \ +'--ignore-prerequisites[Ignores prerequisites checks]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-command-$line[1]:" + case $line[1] in + (autocomplete) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(ecosystem) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__ecosystem_commands" \ +"*::: :->ecosystem" \ +&& ret=0 + + case $state in + (ecosystem) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-ecosystem-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(change-default-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-observability) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(chain) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain_commands" \ +"*::: :->chain" \ +&& ret=0 + + case $state in + (chain) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__init_commands" \ +"*::: :->init" \ +&& ret=0 + + case $state in + (init) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-init-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(genesis) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__genesis_commands" \ +"*::: :->genesis" \ +&& ret=0 + + case $state in + (genesis) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-genesis-command-$line[1]:" + case $line[1] in + (init-database) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(register-chain) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-l2-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(accept-chain-ownership) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(initialize-bridges) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-consensus-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-multicall3) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-timestamp-asserter) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-upgrader) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(deploy-paymaster) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(update-token-multiplier-setter) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(server) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__server_commands" \ +"*::: :->server" \ +&& ret=0 + + case $state in + (server) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-server-command-$line[1]:" + case $line[1] in + (build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(contract-verifier) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__contract-verifier_commands" \ +"*::: :->contract-verifier" \ +&& ret=0 + + case $state in + (contract-verifier) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-contract-verifier-command-$line[1]:" + case $line[1] in + (build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(consensus) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__chain__consensus_commands" \ +"*::: :->consensus" \ +&& ret=0 + + case $state in + (consensus) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-chain-consensus-command-$line[1]:" + case $line[1] in + (set-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(get-attester-committee) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait-for-registry) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(dev) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev_commands" \ +"*::: :->dev" \ +&& ret=0 + + case $state in + (dev) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-command-$line[1]:" + case $line[1] in + (database) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-database-command-$line[1]:" + case $line[1] in + (check-sqlx-data) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(migrate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(new-migration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prepare) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(test) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__test_commands" \ +"*::: :->test" \ +&& ret=0 + + case $state in + (test) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-test-command-$line[1]:" + case $line[1] in + (integration) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fees) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(recovery) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(upgrade) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(rust) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(l1-contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wallet) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(loadtest) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(clean) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__clean_commands" \ +"*::: :->clean" \ +&& ret=0 + + case $state in + (clean) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-clean-command-$line[1]:" + case $line[1] in + (all) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contracts-cache) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(snapshot) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__snapshot_commands" \ +"*::: :->snapshot" \ +&& ret=0 + + case $state in + (snapshot) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-snapshot-command-$line[1]:" + case $line[1] in + (create) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(lint) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(fmt) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__fmt_commands" \ +"*::: :->fmt" \ +&& ret=0 + + case $state in + (fmt) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-fmt-command-$line[1]:" + case $line[1] in + (rustfmt) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(contract) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(prettier) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-prover-command-$line[1]:" + case $line[1] in + (info) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-batch) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(insert-version) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(contracts) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(config-writer) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(send-transactions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__dev__status_commands" \ +"*::: :->status" \ +&& ret=0 + + case $state in + (status) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-dev-status-command-$line[1]:" + case $line[1] in + (ports) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(generate-genesis) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(prover) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__prover_commands" \ +"*::: :->prover" \ +&& ret=0 + + case $state in + (prover) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-prover-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(setup-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init-bellman-cuda) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(compressor-keys) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(external-node) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__external-node_commands" \ +"*::: :->external-node" \ +&& ret=0 + + case $state in + (external-node) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-external-node-command-$line[1]:" + case $line[1] in + (configs) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(build) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(wait) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(containers) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(portal) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(explorer) +_arguments "${_arguments_options[@]}" : \ +":: :_zkstack__help__explorer_commands" \ +"*::: :->explorer" \ +&& ret=0 + + case $state in + (explorer) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:zkstack-help-explorer-command-$line[1]:" + case $line[1] in + (init) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run-backend) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(update) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(markdown) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +} + +(( $+functions[_zkstack_commands] )) || +_zkstack_commands() { + local commands; commands=( +'autocomplete:Create shell autocompletion files' \ +'ecosystem:Ecosystem related commands' \ +'chain:Chain related commands' \ +'dev:Supervisor related commands' \ +'prover:Prover related commands' \ +'external-node:External Node related commands' \ +'containers:Run containers for local development' \ +'portal:Run dapp-portal' \ +'explorer:Run block-explorer' \ +'update:Update ZKsync' \ +'markdown:Print markdown help' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack commands' commands "$@" +} +(( $+functions[_zkstack__autocomplete_commands] )) || +_zkstack__autocomplete_commands() { + local commands; commands=() + _describe -t commands 'zkstack autocomplete commands' commands "$@" +} +(( $+functions[_zkstack__chain_commands] )) || +_zkstack__chain_commands() { + local commands; commands=( +'create:Create a new chain, setting the necessary configurations for later initialization' \ +'build-transactions:Create unsigned transactions for chain deployment' \ +'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ +'genesis:Run server genesis' \ +'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ +'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ +'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ +'initialize-bridges:Initialize bridges on L2' \ +'deploy-consensus-registry:Deploy L2 consensus registry' \ +'deploy-multicall3:Deploy L2 multicall3' \ +'deploy-timestamp-asserter:Deploy L2 TimestampAsserter' \ +'deploy-upgrader:Deploy Default Upgrader' \ +'deploy-paymaster:Deploy paymaster smart contract' \ +'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain commands' commands "$@" +} +(( $+functions[_zkstack__chain__accept-chain-ownership_commands] )) || +_zkstack__chain__accept-chain-ownership_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain accept-chain-ownership commands' commands "$@" +} +(( $+functions[_zkstack__chain__build-transactions_commands] )) || +_zkstack__chain__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus_commands] )) || +_zkstack__chain__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'wait-for-registry:Wait until the consensus registry contract is deployed to L2' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain consensus commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__get-attester-committee_commands] )) || +_zkstack__chain__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help_commands] )) || +_zkstack__chain__consensus__help_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'wait-for-registry:Wait until the consensus registry contract is deployed to L2' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain consensus help commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__get-attester-committee_commands] )) || +_zkstack__chain__consensus__help__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__help_commands] )) || +_zkstack__chain__consensus__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__set-attester-committee_commands] )) || +_zkstack__chain__consensus__help__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__help__wait-for-registry_commands] )) || +_zkstack__chain__consensus__help__wait-for-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus help wait-for-registry commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__set-attester-committee_commands] )) || +_zkstack__chain__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__consensus__wait-for-registry_commands] )) || +_zkstack__chain__consensus__wait-for-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain consensus wait-for-registry commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier_commands] )) || +_zkstack__chain__contract-verifier_commands() { + local commands; commands=( +'build:Build contract verifier binary' \ +'run:Run contract verifier' \ +'wait:Wait for contract verifier to start' \ +'init:Download required binaries for contract verifier' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__build_commands] )) || +_zkstack__chain__contract-verifier__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier build commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help_commands] )) || +_zkstack__chain__contract-verifier__help_commands() { + local commands; commands=( +'build:Build contract verifier binary' \ +'run:Run contract verifier' \ +'wait:Wait for contract verifier to start' \ +'init:Download required binaries for contract verifier' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain contract-verifier help commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__build_commands] )) || +_zkstack__chain__contract-verifier__help__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help build commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__help_commands] )) || +_zkstack__chain__contract-verifier__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__init_commands] )) || +_zkstack__chain__contract-verifier__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help init commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__run_commands] )) || +_zkstack__chain__contract-verifier__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help run commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__help__wait_commands] )) || +_zkstack__chain__contract-verifier__help__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier help wait commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__init_commands] )) || +_zkstack__chain__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__run_commands] )) || +_zkstack__chain__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier run commands' commands "$@" +} +(( $+functions[_zkstack__chain__contract-verifier__wait_commands] )) || +_zkstack__chain__contract-verifier__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain contract-verifier wait commands' commands "$@" +} +(( $+functions[_zkstack__chain__create_commands] )) || +_zkstack__chain__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain create commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-consensus-registry_commands] )) || +_zkstack__chain__deploy-consensus-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-consensus-registry commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-l2-contracts_commands] )) || +_zkstack__chain__deploy-l2-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-l2-contracts commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-multicall3_commands] )) || +_zkstack__chain__deploy-multicall3_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-multicall3 commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-paymaster_commands] )) || +_zkstack__chain__deploy-paymaster_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-paymaster commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-timestamp-asserter_commands] )) || +_zkstack__chain__deploy-timestamp-asserter_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-timestamp-asserter commands' commands "$@" +} +(( $+functions[_zkstack__chain__deploy-upgrader_commands] )) || +_zkstack__chain__deploy-upgrader_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain deploy-upgrader commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis_commands] )) || +_zkstack__chain__genesis_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain genesis commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help_commands] )) || +_zkstack__chain__genesis__help_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain genesis help commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help__help_commands] )) || +_zkstack__chain__genesis__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help__init-database_commands] )) || +_zkstack__chain__genesis__help__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis help init-database commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__help__server_commands] )) || +_zkstack__chain__genesis__help__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis help server commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__init-database_commands] )) || +_zkstack__chain__genesis__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis init-database commands' commands "$@" +} +(( $+functions[_zkstack__chain__genesis__server_commands] )) || +_zkstack__chain__genesis__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain genesis server commands' commands "$@" +} +(( $+functions[_zkstack__chain__help_commands] )) || +_zkstack__chain__help_commands() { + local commands; commands=( +'create:Create a new chain, setting the necessary configurations for later initialization' \ +'build-transactions:Create unsigned transactions for chain deployment' \ +'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ +'genesis:Run server genesis' \ +'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ +'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ +'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ +'initialize-bridges:Initialize bridges on L2' \ +'deploy-consensus-registry:Deploy L2 consensus registry' \ +'deploy-multicall3:Deploy L2 multicall3' \ +'deploy-timestamp-asserter:Deploy L2 TimestampAsserter' \ +'deploy-upgrader:Deploy Default Upgrader' \ +'deploy-paymaster:Deploy paymaster smart contract' \ +'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain help commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__accept-chain-ownership_commands] )) || +_zkstack__chain__help__accept-chain-ownership_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help accept-chain-ownership commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__build-transactions_commands] )) || +_zkstack__chain__help__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus_commands] )) || +_zkstack__chain__help__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'wait-for-registry:Wait until the consensus registry contract is deployed to L2' \ + ) + _describe -t commands 'zkstack chain help consensus commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus__get-attester-committee_commands] )) || +_zkstack__chain__help__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus__set-attester-committee_commands] )) || +_zkstack__chain__help__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__consensus__wait-for-registry_commands] )) || +_zkstack__chain__help__consensus__wait-for-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help consensus wait-for-registry commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier_commands] )) || +_zkstack__chain__help__contract-verifier_commands() { + local commands; commands=( +'build:Build contract verifier binary' \ +'run:Run contract verifier' \ +'wait:Wait for contract verifier to start' \ +'init:Download required binaries for contract verifier' \ + ) + _describe -t commands 'zkstack chain help contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__build_commands] )) || +_zkstack__chain__help__contract-verifier__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier build commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__init_commands] )) || +_zkstack__chain__help__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__run_commands] )) || +_zkstack__chain__help__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier run commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__contract-verifier__wait_commands] )) || +_zkstack__chain__help__contract-verifier__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help contract-verifier wait commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__create_commands] )) || +_zkstack__chain__help__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help create commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-consensus-registry_commands] )) || +_zkstack__chain__help__deploy-consensus-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-consensus-registry commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-l2-contracts_commands] )) || +_zkstack__chain__help__deploy-l2-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-l2-contracts commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-multicall3_commands] )) || +_zkstack__chain__help__deploy-multicall3_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-multicall3 commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-paymaster_commands] )) || +_zkstack__chain__help__deploy-paymaster_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-paymaster commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-timestamp-asserter_commands] )) || +_zkstack__chain__help__deploy-timestamp-asserter_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-timestamp-asserter commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__deploy-upgrader_commands] )) || +_zkstack__chain__help__deploy-upgrader_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help deploy-upgrader commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__genesis_commands] )) || +_zkstack__chain__help__genesis_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ + ) + _describe -t commands 'zkstack chain help genesis commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__genesis__init-database_commands] )) || +_zkstack__chain__help__genesis__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help genesis init-database commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__genesis__server_commands] )) || +_zkstack__chain__help__genesis__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help genesis server commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__help_commands] )) || +_zkstack__chain__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__init_commands] )) || +_zkstack__chain__help__init_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ + ) + _describe -t commands 'zkstack chain help init commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__init__configs_commands] )) || +_zkstack__chain__help__init__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help init configs commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__initialize-bridges_commands] )) || +_zkstack__chain__help__initialize-bridges_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help initialize-bridges commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__register-chain_commands] )) || +_zkstack__chain__help__register-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help register-chain commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__server_commands] )) || +_zkstack__chain__help__server_commands() { + local commands; commands=( +'build:Builds server' \ +'run:Runs server' \ +'wait:Waits for server to start' \ + ) + _describe -t commands 'zkstack chain help server commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__server__build_commands] )) || +_zkstack__chain__help__server__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help server build commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__server__run_commands] )) || +_zkstack__chain__help__server__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help server run commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__server__wait_commands] )) || +_zkstack__chain__help__server__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help server wait commands' commands "$@" +} +(( $+functions[_zkstack__chain__help__update-token-multiplier-setter_commands] )) || +_zkstack__chain__help__update-token-multiplier-setter_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain help update-token-multiplier-setter commands' commands "$@" +} +(( $+functions[_zkstack__chain__init_commands] )) || +_zkstack__chain__init_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain init commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__configs_commands] )) || +_zkstack__chain__init__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain init configs commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__help_commands] )) || +_zkstack__chain__init__help_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain init help commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__help__configs_commands] )) || +_zkstack__chain__init__help__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain init help configs commands' commands "$@" +} +(( $+functions[_zkstack__chain__init__help__help_commands] )) || +_zkstack__chain__init__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain init help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__initialize-bridges_commands] )) || +_zkstack__chain__initialize-bridges_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain initialize-bridges commands' commands "$@" +} +(( $+functions[_zkstack__chain__register-chain_commands] )) || +_zkstack__chain__register-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain register-chain commands' commands "$@" +} +(( $+functions[_zkstack__chain__server_commands] )) || +_zkstack__chain__server_commands() { + local commands; commands=( +'build:Builds server' \ +'run:Runs server' \ +'wait:Waits for server to start' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain server commands' commands "$@" +} +(( $+functions[_zkstack__chain__server__build_commands] )) || +_zkstack__chain__server__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server build commands' commands "$@" +} +(( $+functions[_zkstack__chain__server__help_commands] )) || +_zkstack__chain__server__help_commands() { + local commands; commands=( +'build:Builds server' \ +'run:Runs server' \ +'wait:Waits for server to start' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack chain server help commands' commands "$@" +} +(( $+functions[_zkstack__chain__server__help__build_commands] )) || +_zkstack__chain__server__help__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server help build commands' commands "$@" +} +(( $+functions[_zkstack__chain__server__help__help_commands] )) || +_zkstack__chain__server__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server help help commands' commands "$@" +} +(( $+functions[_zkstack__chain__server__help__run_commands] )) || +_zkstack__chain__server__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server help run commands' commands "$@" +} +(( $+functions[_zkstack__chain__server__help__wait_commands] )) || +_zkstack__chain__server__help__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server help wait commands' commands "$@" +} +(( $+functions[_zkstack__chain__server__run_commands] )) || +_zkstack__chain__server__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server run commands' commands "$@" +} +(( $+functions[_zkstack__chain__server__wait_commands] )) || +_zkstack__chain__server__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain server wait commands' commands "$@" +} +(( $+functions[_zkstack__chain__update-token-multiplier-setter_commands] )) || +_zkstack__chain__update-token-multiplier-setter_commands() { + local commands; commands=() + _describe -t commands 'zkstack chain update-token-multiplier-setter commands' commands "$@" +} +(( $+functions[_zkstack__containers_commands] )) || +_zkstack__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack containers commands' commands "$@" +} +(( $+functions[_zkstack__dev_commands] )) || +_zkstack__dev_commands() { + local commands; commands=( +'database:Database related commands' \ +'test:Run tests' \ +'clean:Clean artifacts' \ +'snapshot:Snapshots creator' \ +'lint:Lint code' \ +'fmt:Format code' \ +'prover:Protocol version used by provers' \ +'contracts:Build contracts' \ +'config-writer:Overwrite general config' \ +'send-transactions:Send transactions from file' \ +'status:Get status of the server' \ +'generate-genesis:Generate new genesis file based on current contracts' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean_commands] )) || +_zkstack__dev__clean_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev clean commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__all_commands] )) || +_zkstack__dev__clean__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean all commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__containers_commands] )) || +_zkstack__dev__clean__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean containers commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__contracts-cache_commands] )) || +_zkstack__dev__clean__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help_commands] )) || +_zkstack__dev__clean__help_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev clean help commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__all_commands] )) || +_zkstack__dev__clean__help__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help all commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__containers_commands] )) || +_zkstack__dev__clean__help__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help containers commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__contracts-cache_commands] )) || +_zkstack__dev__clean__help__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__dev__clean__help__help_commands] )) || +_zkstack__dev__clean__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev clean help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__config-writer_commands] )) || +_zkstack__dev__config-writer_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev config-writer commands' commands "$@" +} +(( $+functions[_zkstack__dev__contracts_commands] )) || +_zkstack__dev__contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__database_commands] )) || +_zkstack__dev__database_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev database commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__check-sqlx-data_commands] )) || +_zkstack__dev__database__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__drop_commands] )) || +_zkstack__dev__database__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database drop commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help_commands] )) || +_zkstack__dev__database__help_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev database help commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__check-sqlx-data_commands] )) || +_zkstack__dev__database__help__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__drop_commands] )) || +_zkstack__dev__database__help__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help drop commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__help_commands] )) || +_zkstack__dev__database__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__migrate_commands] )) || +_zkstack__dev__database__help__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help migrate commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__new-migration_commands] )) || +_zkstack__dev__database__help__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help new-migration commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__prepare_commands] )) || +_zkstack__dev__database__help__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help prepare commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__reset_commands] )) || +_zkstack__dev__database__help__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help reset commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__help__setup_commands] )) || +_zkstack__dev__database__help__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database help setup commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__migrate_commands] )) || +_zkstack__dev__database__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database migrate commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__new-migration_commands] )) || +_zkstack__dev__database__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database new-migration commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__prepare_commands] )) || +_zkstack__dev__database__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database prepare commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__reset_commands] )) || +_zkstack__dev__database__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database reset commands' commands "$@" +} +(( $+functions[_zkstack__dev__database__setup_commands] )) || +_zkstack__dev__database__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev database setup commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt_commands] )) || +_zkstack__dev__fmt_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev fmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__contract_commands] )) || +_zkstack__dev__fmt__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt contract commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help_commands] )) || +_zkstack__dev__fmt__help_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev fmt help commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__contract_commands] )) || +_zkstack__dev__fmt__help__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help contract commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__help_commands] )) || +_zkstack__dev__fmt__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__prettier_commands] )) || +_zkstack__dev__fmt__help__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help prettier commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__help__rustfmt_commands] )) || +_zkstack__dev__fmt__help__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt help rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__prettier_commands] )) || +_zkstack__dev__fmt__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt prettier commands' commands "$@" +} +(( $+functions[_zkstack__dev__fmt__rustfmt_commands] )) || +_zkstack__dev__fmt__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev fmt rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__generate-genesis_commands] )) || +_zkstack__dev__generate-genesis_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev generate-genesis commands' commands "$@" +} +(( $+functions[_zkstack__dev__help_commands] )) || +_zkstack__dev__help_commands() { + local commands; commands=( +'database:Database related commands' \ +'test:Run tests' \ +'clean:Clean artifacts' \ +'snapshot:Snapshots creator' \ +'lint:Lint code' \ +'fmt:Format code' \ +'prover:Protocol version used by provers' \ +'contracts:Build contracts' \ +'config-writer:Overwrite general config' \ +'send-transactions:Send transactions from file' \ +'status:Get status of the server' \ +'generate-genesis:Generate new genesis file based on current contracts' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev help commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean_commands] )) || +_zkstack__dev__help__clean_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ + ) + _describe -t commands 'zkstack dev help clean commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean__all_commands] )) || +_zkstack__dev__help__clean__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help clean all commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean__containers_commands] )) || +_zkstack__dev__help__clean__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help clean containers commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__clean__contracts-cache_commands] )) || +_zkstack__dev__help__clean__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help clean contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__config-writer_commands] )) || +_zkstack__dev__help__config-writer_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help config-writer commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__contracts_commands] )) || +_zkstack__dev__help__contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database_commands] )) || +_zkstack__dev__help__database_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ + ) + _describe -t commands 'zkstack dev help database commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__check-sqlx-data_commands] )) || +_zkstack__dev__help__database__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__drop_commands] )) || +_zkstack__dev__help__database__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database drop commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__migrate_commands] )) || +_zkstack__dev__help__database__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database migrate commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__new-migration_commands] )) || +_zkstack__dev__help__database__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database new-migration commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__prepare_commands] )) || +_zkstack__dev__help__database__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database prepare commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__reset_commands] )) || +_zkstack__dev__help__database__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database reset commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__database__setup_commands] )) || +_zkstack__dev__help__database__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help database setup commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt_commands] )) || +_zkstack__dev__help__fmt_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ + ) + _describe -t commands 'zkstack dev help fmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt__contract_commands] )) || +_zkstack__dev__help__fmt__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help fmt contract commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt__prettier_commands] )) || +_zkstack__dev__help__fmt__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help fmt prettier commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__fmt__rustfmt_commands] )) || +_zkstack__dev__help__fmt__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help fmt rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__generate-genesis_commands] )) || +_zkstack__dev__help__generate-genesis_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help generate-genesis commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__help_commands] )) || +_zkstack__dev__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__lint_commands] )) || +_zkstack__dev__help__lint_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help lint commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover_commands] )) || +_zkstack__dev__help__prover_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ + ) + _describe -t commands 'zkstack dev help prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover__info_commands] )) || +_zkstack__dev__help__prover__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help prover info commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover__insert-batch_commands] )) || +_zkstack__dev__help__prover__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help prover insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__prover__insert-version_commands] )) || +_zkstack__dev__help__prover__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help prover insert-version commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__send-transactions_commands] )) || +_zkstack__dev__help__send-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help send-transactions commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__snapshot_commands] )) || +_zkstack__dev__help__snapshot_commands() { + local commands; commands=( +'create:' \ + ) + _describe -t commands 'zkstack dev help snapshot commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__snapshot__create_commands] )) || +_zkstack__dev__help__snapshot__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help snapshot create commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__status_commands] )) || +_zkstack__dev__help__status_commands() { + local commands; commands=( +'ports:Show used ports' \ + ) + _describe -t commands 'zkstack dev help status commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__status__ports_commands] )) || +_zkstack__dev__help__status__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help status ports commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test_commands] )) || +_zkstack__dev__help__test_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ + ) + _describe -t commands 'zkstack dev help test commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__build_commands] )) || +_zkstack__dev__help__test__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test build commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__fees_commands] )) || +_zkstack__dev__help__test__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test fees commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__integration_commands] )) || +_zkstack__dev__help__test__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test integration commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__l1-contracts_commands] )) || +_zkstack__dev__help__test__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__loadtest_commands] )) || +_zkstack__dev__help__test__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test loadtest commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__prover_commands] )) || +_zkstack__dev__help__test__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__recovery_commands] )) || +_zkstack__dev__help__test__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test recovery commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__revert_commands] )) || +_zkstack__dev__help__test__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test revert commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__rust_commands] )) || +_zkstack__dev__help__test__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test rust commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__upgrade_commands] )) || +_zkstack__dev__help__test__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test upgrade commands' commands "$@" +} +(( $+functions[_zkstack__dev__help__test__wallet_commands] )) || +_zkstack__dev__help__test__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev help test wallet commands' commands "$@" +} +(( $+functions[_zkstack__dev__lint_commands] )) || +_zkstack__dev__lint_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev lint commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover_commands] )) || +_zkstack__dev__prover_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help_commands] )) || +_zkstack__dev__prover__help_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev prover help commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__help_commands] )) || +_zkstack__dev__prover__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__info_commands] )) || +_zkstack__dev__prover__help__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help info commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__insert-batch_commands] )) || +_zkstack__dev__prover__help__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__help__insert-version_commands] )) || +_zkstack__dev__prover__help__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover help insert-version commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__info_commands] )) || +_zkstack__dev__prover__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover info commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__insert-batch_commands] )) || +_zkstack__dev__prover__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__dev__prover__insert-version_commands] )) || +_zkstack__dev__prover__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev prover insert-version commands' commands "$@" +} +(( $+functions[_zkstack__dev__send-transactions_commands] )) || +_zkstack__dev__send-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev send-transactions commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot_commands] )) || +_zkstack__dev__snapshot_commands() { + local commands; commands=( +'create:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev snapshot commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__create_commands] )) || +_zkstack__dev__snapshot__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev snapshot create commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__help_commands] )) || +_zkstack__dev__snapshot__help_commands() { + local commands; commands=( +'create:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev snapshot help commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__help__create_commands] )) || +_zkstack__dev__snapshot__help__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev snapshot help create commands' commands "$@" +} +(( $+functions[_zkstack__dev__snapshot__help__help_commands] )) || +_zkstack__dev__snapshot__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev snapshot help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__status_commands] )) || +_zkstack__dev__status_commands() { + local commands; commands=( +'ports:Show used ports' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev status commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__help_commands] )) || +_zkstack__dev__status__help_commands() { + local commands; commands=( +'ports:Show used ports' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev status help commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__help__help_commands] )) || +_zkstack__dev__status__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev status help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__help__ports_commands] )) || +_zkstack__dev__status__help__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev status help ports commands' commands "$@" +} +(( $+functions[_zkstack__dev__status__ports_commands] )) || +_zkstack__dev__status__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev status ports commands' commands "$@" +} +(( $+functions[_zkstack__dev__test_commands] )) || +_zkstack__dev__test_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev test commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__build_commands] )) || +_zkstack__dev__test__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test build commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__fees_commands] )) || +_zkstack__dev__test__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test fees commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help_commands] )) || +_zkstack__dev__test__help_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack dev test help commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__build_commands] )) || +_zkstack__dev__test__help__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help build commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__fees_commands] )) || +_zkstack__dev__test__help__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help fees commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__help_commands] )) || +_zkstack__dev__test__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help help commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__integration_commands] )) || +_zkstack__dev__test__help__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help integration commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__l1-contracts_commands] )) || +_zkstack__dev__test__help__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__loadtest_commands] )) || +_zkstack__dev__test__help__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help loadtest commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__prover_commands] )) || +_zkstack__dev__test__help__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__recovery_commands] )) || +_zkstack__dev__test__help__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help recovery commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__revert_commands] )) || +_zkstack__dev__test__help__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help revert commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__rust_commands] )) || +_zkstack__dev__test__help__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help rust commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__upgrade_commands] )) || +_zkstack__dev__test__help__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help upgrade commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__help__wallet_commands] )) || +_zkstack__dev__test__help__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test help wallet commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__integration_commands] )) || +_zkstack__dev__test__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test integration commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__l1-contracts_commands] )) || +_zkstack__dev__test__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__loadtest_commands] )) || +_zkstack__dev__test__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test loadtest commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__prover_commands] )) || +_zkstack__dev__test__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test prover commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__recovery_commands] )) || +_zkstack__dev__test__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test recovery commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__revert_commands] )) || +_zkstack__dev__test__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test revert commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__rust_commands] )) || +_zkstack__dev__test__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test rust commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__upgrade_commands] )) || +_zkstack__dev__test__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test upgrade commands' commands "$@" +} +(( $+functions[_zkstack__dev__test__wallet_commands] )) || +_zkstack__dev__test__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack dev test wallet commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem_commands] )) || +_zkstack__ecosystem_commands() { + local commands; commands=( +'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ +'build-transactions:Create transactions to build ecosystem contracts' \ +'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ +'change-default-chain:Change the default chain' \ +'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack ecosystem commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__build-transactions_commands] )) || +_zkstack__ecosystem__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__change-default-chain_commands] )) || +_zkstack__ecosystem__change-default-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem change-default-chain commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__create_commands] )) || +_zkstack__ecosystem__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem create commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help_commands] )) || +_zkstack__ecosystem__help_commands() { + local commands; commands=( +'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ +'build-transactions:Create transactions to build ecosystem contracts' \ +'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ +'change-default-chain:Change the default chain' \ +'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack ecosystem help commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__build-transactions_commands] )) || +_zkstack__ecosystem__help__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__change-default-chain_commands] )) || +_zkstack__ecosystem__help__change-default-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help change-default-chain commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__create_commands] )) || +_zkstack__ecosystem__help__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help create commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__help_commands] )) || +_zkstack__ecosystem__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help help commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__init_commands] )) || +_zkstack__ecosystem__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help init commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__help__setup-observability_commands] )) || +_zkstack__ecosystem__help__setup-observability_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem help setup-observability commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__init_commands] )) || +_zkstack__ecosystem__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem init commands' commands "$@" +} +(( $+functions[_zkstack__ecosystem__setup-observability_commands] )) || +_zkstack__ecosystem__setup-observability_commands() { + local commands; commands=() + _describe -t commands 'zkstack ecosystem setup-observability commands' commands "$@" +} +(( $+functions[_zkstack__explorer_commands] )) || +_zkstack__explorer_commands() { + local commands; commands=( +'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ +'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ +'run:Run explorer app' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack explorer commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help_commands] )) || +_zkstack__explorer__help_commands() { + local commands; commands=( +'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ +'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ +'run:Run explorer app' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack explorer help commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__help_commands] )) || +_zkstack__explorer__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help help commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__init_commands] )) || +_zkstack__explorer__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help init commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__run_commands] )) || +_zkstack__explorer__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help run commands' commands "$@" +} +(( $+functions[_zkstack__explorer__help__run-backend_commands] )) || +_zkstack__explorer__help__run-backend_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer help run-backend commands' commands "$@" +} +(( $+functions[_zkstack__explorer__init_commands] )) || +_zkstack__explorer__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer init commands' commands "$@" +} +(( $+functions[_zkstack__explorer__run_commands] )) || +_zkstack__explorer__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer run commands' commands "$@" +} +(( $+functions[_zkstack__explorer__run-backend_commands] )) || +_zkstack__explorer__run-backend_commands() { + local commands; commands=() + _describe -t commands 'zkstack explorer run-backend commands' commands "$@" +} +(( $+functions[_zkstack__external-node_commands] )) || +_zkstack__external-node_commands() { + local commands; commands=( +'configs:Prepare configs for EN' \ +'init:Init databases' \ +'build:Build external node' \ +'run:Run external node' \ +'wait:Wait for external node to start' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack external-node commands' commands "$@" +} +(( $+functions[_zkstack__external-node__build_commands] )) || +_zkstack__external-node__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node build commands' commands "$@" +} +(( $+functions[_zkstack__external-node__configs_commands] )) || +_zkstack__external-node__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node configs commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help_commands] )) || +_zkstack__external-node__help_commands() { + local commands; commands=( +'configs:Prepare configs for EN' \ +'init:Init databases' \ +'build:Build external node' \ +'run:Run external node' \ +'wait:Wait for external node to start' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack external-node help commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__build_commands] )) || +_zkstack__external-node__help__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help build commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__configs_commands] )) || +_zkstack__external-node__help__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help configs commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__help_commands] )) || +_zkstack__external-node__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help help commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__init_commands] )) || +_zkstack__external-node__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help init commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__run_commands] )) || +_zkstack__external-node__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help run commands' commands "$@" +} +(( $+functions[_zkstack__external-node__help__wait_commands] )) || +_zkstack__external-node__help__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node help wait commands' commands "$@" +} +(( $+functions[_zkstack__external-node__init_commands] )) || +_zkstack__external-node__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node init commands' commands "$@" +} +(( $+functions[_zkstack__external-node__run_commands] )) || +_zkstack__external-node__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node run commands' commands "$@" +} +(( $+functions[_zkstack__external-node__wait_commands] )) || +_zkstack__external-node__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack external-node wait commands' commands "$@" +} +(( $+functions[_zkstack__help_commands] )) || +_zkstack__help_commands() { + local commands; commands=( +'autocomplete:Create shell autocompletion files' \ +'ecosystem:Ecosystem related commands' \ +'chain:Chain related commands' \ +'dev:Supervisor related commands' \ +'prover:Prover related commands' \ +'external-node:External Node related commands' \ +'containers:Run containers for local development' \ +'portal:Run dapp-portal' \ +'explorer:Run block-explorer' \ +'update:Update ZKsync' \ +'markdown:Print markdown help' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack help commands' commands "$@" +} +(( $+functions[_zkstack__help__autocomplete_commands] )) || +_zkstack__help__autocomplete_commands() { + local commands; commands=() + _describe -t commands 'zkstack help autocomplete commands' commands "$@" +} +(( $+functions[_zkstack__help__chain_commands] )) || +_zkstack__help__chain_commands() { + local commands; commands=( +'create:Create a new chain, setting the necessary configurations for later initialization' \ +'build-transactions:Create unsigned transactions for chain deployment' \ +'init:Initialize chain, deploying necessary contracts and performing on-chain operations' \ +'genesis:Run server genesis' \ +'register-chain:Register a new chain on L1 (executed by L1 governor). This command deploys and configures Governance, ChainAdmin, and DiamondProxy contracts, registers chain with BridgeHub and sets pending admin for DiamondProxy. Note\: After completion, L2 governor can accept ownership by running \`accept-chain-ownership\`' \ +'deploy-l2-contracts:Deploy all L2 contracts (executed by L1 governor)' \ +'accept-chain-ownership:Accept ownership of L2 chain (executed by L2 governor). This command should be run after \`register-chain\` to accept ownership of newly created DiamondProxy contract' \ +'initialize-bridges:Initialize bridges on L2' \ +'deploy-consensus-registry:Deploy L2 consensus registry' \ +'deploy-multicall3:Deploy L2 multicall3' \ +'deploy-timestamp-asserter:Deploy L2 TimestampAsserter' \ +'deploy-upgrader:Deploy Default Upgrader' \ +'deploy-paymaster:Deploy paymaster smart contract' \ +'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \ +'server:Run server' \ +'contract-verifier:Run contract verifier' \ +'consensus:' \ + ) + _describe -t commands 'zkstack help chain commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__accept-chain-ownership_commands] )) || +_zkstack__help__chain__accept-chain-ownership_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain accept-chain-ownership commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__build-transactions_commands] )) || +_zkstack__help__chain__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus_commands] )) || +_zkstack__help__chain__consensus_commands() { + local commands; commands=( +'set-attester-committee:Sets the attester committee in the consensus registry contract to \`consensus.genesis_spec.attesters\` in general.yaml' \ +'get-attester-committee:Fetches the attester committee from the consensus registry contract' \ +'wait-for-registry:Wait until the consensus registry contract is deployed to L2' \ + ) + _describe -t commands 'zkstack help chain consensus commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus__get-attester-committee_commands] )) || +_zkstack__help__chain__consensus__get-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain consensus get-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus__set-attester-committee_commands] )) || +_zkstack__help__chain__consensus__set-attester-committee_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain consensus set-attester-committee commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__consensus__wait-for-registry_commands] )) || +_zkstack__help__chain__consensus__wait-for-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain consensus wait-for-registry commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier_commands] )) || +_zkstack__help__chain__contract-verifier_commands() { + local commands; commands=( +'build:Build contract verifier binary' \ +'run:Run contract verifier' \ +'wait:Wait for contract verifier to start' \ +'init:Download required binaries for contract verifier' \ + ) + _describe -t commands 'zkstack help chain contract-verifier commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__build_commands] )) || +_zkstack__help__chain__contract-verifier__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier build commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__init_commands] )) || +_zkstack__help__chain__contract-verifier__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier init commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__run_commands] )) || +_zkstack__help__chain__contract-verifier__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier run commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__contract-verifier__wait_commands] )) || +_zkstack__help__chain__contract-verifier__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain contract-verifier wait commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__create_commands] )) || +_zkstack__help__chain__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain create commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-consensus-registry_commands] )) || +_zkstack__help__chain__deploy-consensus-registry_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-consensus-registry commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-l2-contracts_commands] )) || +_zkstack__help__chain__deploy-l2-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-l2-contracts commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-multicall3_commands] )) || +_zkstack__help__chain__deploy-multicall3_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-multicall3 commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-paymaster_commands] )) || +_zkstack__help__chain__deploy-paymaster_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-paymaster commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-timestamp-asserter_commands] )) || +_zkstack__help__chain__deploy-timestamp-asserter_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-timestamp-asserter commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__deploy-upgrader_commands] )) || +_zkstack__help__chain__deploy-upgrader_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain deploy-upgrader commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__genesis_commands] )) || +_zkstack__help__chain__genesis_commands() { + local commands; commands=( +'init-database:Initialize databases' \ +'server:Runs server genesis' \ + ) + _describe -t commands 'zkstack help chain genesis commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__genesis__init-database_commands] )) || +_zkstack__help__chain__genesis__init-database_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain genesis init-database commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__genesis__server_commands] )) || +_zkstack__help__chain__genesis__server_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain genesis server commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__init_commands] )) || +_zkstack__help__chain__init_commands() { + local commands; commands=( +'configs:Initialize chain configs' \ + ) + _describe -t commands 'zkstack help chain init commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__init__configs_commands] )) || +_zkstack__help__chain__init__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain init configs commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__initialize-bridges_commands] )) || +_zkstack__help__chain__initialize-bridges_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain initialize-bridges commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__register-chain_commands] )) || +_zkstack__help__chain__register-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain register-chain commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__server_commands] )) || +_zkstack__help__chain__server_commands() { + local commands; commands=( +'build:Builds server' \ +'run:Runs server' \ +'wait:Waits for server to start' \ + ) + _describe -t commands 'zkstack help chain server commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__server__build_commands] )) || +_zkstack__help__chain__server__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain server build commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__server__run_commands] )) || +_zkstack__help__chain__server__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain server run commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__server__wait_commands] )) || +_zkstack__help__chain__server__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain server wait commands' commands "$@" +} +(( $+functions[_zkstack__help__chain__update-token-multiplier-setter_commands] )) || +_zkstack__help__chain__update-token-multiplier-setter_commands() { + local commands; commands=() + _describe -t commands 'zkstack help chain update-token-multiplier-setter commands' commands "$@" +} +(( $+functions[_zkstack__help__containers_commands] )) || +_zkstack__help__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack help containers commands' commands "$@" +} +(( $+functions[_zkstack__help__dev_commands] )) || +_zkstack__help__dev_commands() { + local commands; commands=( +'database:Database related commands' \ +'test:Run tests' \ +'clean:Clean artifacts' \ +'snapshot:Snapshots creator' \ +'lint:Lint code' \ +'fmt:Format code' \ +'prover:Protocol version used by provers' \ +'contracts:Build contracts' \ +'config-writer:Overwrite general config' \ +'send-transactions:Send transactions from file' \ +'status:Get status of the server' \ +'generate-genesis:Generate new genesis file based on current contracts' \ + ) + _describe -t commands 'zkstack help dev commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean_commands] )) || +_zkstack__help__dev__clean_commands() { + local commands; commands=( +'all:Remove containers and contracts cache' \ +'containers:Remove containers and docker volumes' \ +'contracts-cache:Remove contracts caches' \ + ) + _describe -t commands 'zkstack help dev clean commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean__all_commands] )) || +_zkstack__help__dev__clean__all_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev clean all commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean__containers_commands] )) || +_zkstack__help__dev__clean__containers_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev clean containers commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__clean__contracts-cache_commands] )) || +_zkstack__help__dev__clean__contracts-cache_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev clean contracts-cache commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__config-writer_commands] )) || +_zkstack__help__dev__config-writer_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev config-writer commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__contracts_commands] )) || +_zkstack__help__dev__contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev contracts commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database_commands] )) || +_zkstack__help__dev__database_commands() { + local commands; commands=( +'check-sqlx-data:Check sqlx-data.json is up to date. If no databases are selected, all databases will be checked.' \ +'drop:Drop databases. If no databases are selected, all databases will be dropped.' \ +'migrate:Migrate databases. If no databases are selected, all databases will be migrated.' \ +'new-migration:Create new migration' \ +'prepare:Prepare sqlx-data.json. If no databases are selected, all databases will be prepared.' \ +'reset:Reset databases. If no databases are selected, all databases will be reset.' \ +'setup:Setup databases. If no databases are selected, all databases will be setup.' \ + ) + _describe -t commands 'zkstack help dev database commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__check-sqlx-data_commands] )) || +_zkstack__help__dev__database__check-sqlx-data_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database check-sqlx-data commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__drop_commands] )) || +_zkstack__help__dev__database__drop_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database drop commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__migrate_commands] )) || +_zkstack__help__dev__database__migrate_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database migrate commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__new-migration_commands] )) || +_zkstack__help__dev__database__new-migration_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database new-migration commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__prepare_commands] )) || +_zkstack__help__dev__database__prepare_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database prepare commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__reset_commands] )) || +_zkstack__help__dev__database__reset_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database reset commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__database__setup_commands] )) || +_zkstack__help__dev__database__setup_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev database setup commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt_commands] )) || +_zkstack__help__dev__fmt_commands() { + local commands; commands=( +'rustfmt:' \ +'contract:' \ +'prettier:' \ + ) + _describe -t commands 'zkstack help dev fmt commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt__contract_commands] )) || +_zkstack__help__dev__fmt__contract_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev fmt contract commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt__prettier_commands] )) || +_zkstack__help__dev__fmt__prettier_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev fmt prettier commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__fmt__rustfmt_commands] )) || +_zkstack__help__dev__fmt__rustfmt_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev fmt rustfmt commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__generate-genesis_commands] )) || +_zkstack__help__dev__generate-genesis_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev generate-genesis commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__lint_commands] )) || +_zkstack__help__dev__lint_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev lint commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover_commands] )) || +_zkstack__help__dev__prover_commands() { + local commands; commands=( +'info:' \ +'insert-batch:' \ +'insert-version:' \ + ) + _describe -t commands 'zkstack help dev prover commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover__info_commands] )) || +_zkstack__help__dev__prover__info_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev prover info commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover__insert-batch_commands] )) || +_zkstack__help__dev__prover__insert-batch_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev prover insert-batch commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__prover__insert-version_commands] )) || +_zkstack__help__dev__prover__insert-version_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev prover insert-version commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__send-transactions_commands] )) || +_zkstack__help__dev__send-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev send-transactions commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__snapshot_commands] )) || +_zkstack__help__dev__snapshot_commands() { + local commands; commands=( +'create:' \ + ) + _describe -t commands 'zkstack help dev snapshot commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__snapshot__create_commands] )) || +_zkstack__help__dev__snapshot__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev snapshot create commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__status_commands] )) || +_zkstack__help__dev__status_commands() { + local commands; commands=( +'ports:Show used ports' \ + ) + _describe -t commands 'zkstack help dev status commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__status__ports_commands] )) || +_zkstack__help__dev__status__ports_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev status ports commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test_commands] )) || +_zkstack__help__dev__test_commands() { + local commands; commands=( +'integration:Run integration tests' \ +'fees:Run fees test' \ +'revert:Run revert tests' \ +'recovery:Run recovery tests' \ +'upgrade:Run upgrade tests' \ +'build:Build all test dependencies' \ +'rust:Run unit-tests, accepts optional cargo test flags' \ +'l1-contracts:Run L1 contracts tests' \ +'prover:Run prover tests' \ +'wallet:Print test wallets information' \ +'loadtest:Run loadtest' \ + ) + _describe -t commands 'zkstack help dev test commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__build_commands] )) || +_zkstack__help__dev__test__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test build commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__fees_commands] )) || +_zkstack__help__dev__test__fees_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test fees commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__integration_commands] )) || +_zkstack__help__dev__test__integration_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test integration commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__l1-contracts_commands] )) || +_zkstack__help__dev__test__l1-contracts_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test l1-contracts commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__loadtest_commands] )) || +_zkstack__help__dev__test__loadtest_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test loadtest commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__prover_commands] )) || +_zkstack__help__dev__test__prover_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test prover commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__recovery_commands] )) || +_zkstack__help__dev__test__recovery_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test recovery commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__revert_commands] )) || +_zkstack__help__dev__test__revert_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test revert commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__rust_commands] )) || +_zkstack__help__dev__test__rust_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test rust commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__upgrade_commands] )) || +_zkstack__help__dev__test__upgrade_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test upgrade commands' commands "$@" +} +(( $+functions[_zkstack__help__dev__test__wallet_commands] )) || +_zkstack__help__dev__test__wallet_commands() { + local commands; commands=() + _describe -t commands 'zkstack help dev test wallet commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem_commands] )) || +_zkstack__help__ecosystem_commands() { + local commands; commands=( +'create:Create a new ecosystem and chain, setting necessary configurations for later initialization' \ +'build-transactions:Create transactions to build ecosystem contracts' \ +'init:Initialize ecosystem and chain, deploying necessary contracts and performing on-chain operations' \ +'change-default-chain:Change the default chain' \ +'setup-observability:Setup observability for the ecosystem, downloading Grafana dashboards from the era-observability repo' \ + ) + _describe -t commands 'zkstack help ecosystem commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__build-transactions_commands] )) || +_zkstack__help__ecosystem__build-transactions_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem build-transactions commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__change-default-chain_commands] )) || +_zkstack__help__ecosystem__change-default-chain_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem change-default-chain commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__create_commands] )) || +_zkstack__help__ecosystem__create_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem create commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__init_commands] )) || +_zkstack__help__ecosystem__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem init commands' commands "$@" +} +(( $+functions[_zkstack__help__ecosystem__setup-observability_commands] )) || +_zkstack__help__ecosystem__setup-observability_commands() { + local commands; commands=() + _describe -t commands 'zkstack help ecosystem setup-observability commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer_commands] )) || +_zkstack__help__explorer_commands() { + local commands; commands=( +'init:Initialize explorer (create database to store explorer data and generate docker compose file with explorer services). Runs for all chains, unless --chain is passed' \ +'run-backend:Start explorer backend services (api, data_fetcher, worker) for a given chain. Uses default chain, unless --chain is passed' \ +'run:Run explorer app' \ + ) + _describe -t commands 'zkstack help explorer commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer__init_commands] )) || +_zkstack__help__explorer__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help explorer init commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer__run_commands] )) || +_zkstack__help__explorer__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help explorer run commands' commands "$@" +} +(( $+functions[_zkstack__help__explorer__run-backend_commands] )) || +_zkstack__help__explorer__run-backend_commands() { + local commands; commands=() + _describe -t commands 'zkstack help explorer run-backend commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node_commands] )) || +_zkstack__help__external-node_commands() { + local commands; commands=( +'configs:Prepare configs for EN' \ +'init:Init databases' \ +'build:Build external node' \ +'run:Run external node' \ +'wait:Wait for external node to start' \ + ) + _describe -t commands 'zkstack help external-node commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__build_commands] )) || +_zkstack__help__external-node__build_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node build commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__configs_commands] )) || +_zkstack__help__external-node__configs_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node configs commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__init_commands] )) || +_zkstack__help__external-node__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node init commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__run_commands] )) || +_zkstack__help__external-node__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node run commands' commands "$@" +} +(( $+functions[_zkstack__help__external-node__wait_commands] )) || +_zkstack__help__external-node__wait_commands() { + local commands; commands=() + _describe -t commands 'zkstack help external-node wait commands' commands "$@" +} +(( $+functions[_zkstack__help__help_commands] )) || +_zkstack__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack help help commands' commands "$@" +} +(( $+functions[_zkstack__help__markdown_commands] )) || +_zkstack__help__markdown_commands() { + local commands; commands=() + _describe -t commands 'zkstack help markdown commands' commands "$@" +} +(( $+functions[_zkstack__help__portal_commands] )) || +_zkstack__help__portal_commands() { + local commands; commands=() + _describe -t commands 'zkstack help portal commands' commands "$@" +} +(( $+functions[_zkstack__help__prover_commands] )) || +_zkstack__help__prover_commands() { + local commands; commands=( +'init:Initialize prover' \ +'setup-keys:Generate setup keys' \ +'run:Run prover' \ +'init-bellman-cuda:Initialize bellman-cuda' \ +'compressor-keys:Download compressor keys' \ + ) + _describe -t commands 'zkstack help prover commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__compressor-keys_commands] )) || +_zkstack__help__prover__compressor-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover compressor-keys commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__init_commands] )) || +_zkstack__help__prover__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover init commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__init-bellman-cuda_commands] )) || +_zkstack__help__prover__init-bellman-cuda_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover init-bellman-cuda commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__run_commands] )) || +_zkstack__help__prover__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover run commands' commands "$@" +} +(( $+functions[_zkstack__help__prover__setup-keys_commands] )) || +_zkstack__help__prover__setup-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack help prover setup-keys commands' commands "$@" +} +(( $+functions[_zkstack__help__update_commands] )) || +_zkstack__help__update_commands() { + local commands; commands=() + _describe -t commands 'zkstack help update commands' commands "$@" +} +(( $+functions[_zkstack__markdown_commands] )) || +_zkstack__markdown_commands() { + local commands; commands=() + _describe -t commands 'zkstack markdown commands' commands "$@" +} +(( $+functions[_zkstack__portal_commands] )) || +_zkstack__portal_commands() { + local commands; commands=() + _describe -t commands 'zkstack portal commands' commands "$@" +} +(( $+functions[_zkstack__prover_commands] )) || +_zkstack__prover_commands() { + local commands; commands=( +'init:Initialize prover' \ +'setup-keys:Generate setup keys' \ +'run:Run prover' \ +'init-bellman-cuda:Initialize bellman-cuda' \ +'compressor-keys:Download compressor keys' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack prover commands' commands "$@" +} +(( $+functions[_zkstack__prover__compressor-keys_commands] )) || +_zkstack__prover__compressor-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover compressor-keys commands' commands "$@" +} +(( $+functions[_zkstack__prover__help_commands] )) || +_zkstack__prover__help_commands() { + local commands; commands=( +'init:Initialize prover' \ +'setup-keys:Generate setup keys' \ +'run:Run prover' \ +'init-bellman-cuda:Initialize bellman-cuda' \ +'compressor-keys:Download compressor keys' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'zkstack prover help commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__compressor-keys_commands] )) || +_zkstack__prover__help__compressor-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help compressor-keys commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__help_commands] )) || +_zkstack__prover__help__help_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help help commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__init_commands] )) || +_zkstack__prover__help__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help init commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__init-bellman-cuda_commands] )) || +_zkstack__prover__help__init-bellman-cuda_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help init-bellman-cuda commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__run_commands] )) || +_zkstack__prover__help__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help run commands' commands "$@" +} +(( $+functions[_zkstack__prover__help__setup-keys_commands] )) || +_zkstack__prover__help__setup-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover help setup-keys commands' commands "$@" +} +(( $+functions[_zkstack__prover__init_commands] )) || +_zkstack__prover__init_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover init commands' commands "$@" +} +(( $+functions[_zkstack__prover__init-bellman-cuda_commands] )) || +_zkstack__prover__init-bellman-cuda_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover init-bellman-cuda commands' commands "$@" +} +(( $+functions[_zkstack__prover__run_commands] )) || +_zkstack__prover__run_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover run commands' commands "$@" +} +(( $+functions[_zkstack__prover__setup-keys_commands] )) || +_zkstack__prover__setup-keys_commands() { + local commands; commands=() + _describe -t commands 'zkstack prover setup-keys commands' commands "$@" +} +(( $+functions[_zkstack__update_commands] )) || +_zkstack__update_commands() { + local commands; commands=() + _describe -t commands 'zkstack update commands' commands "$@" +} + +if [ "$funcstack[1]" = "_zkstack" ]; then + _zkstack "$@" +else + compdef _zkstack zkstack +fi From 00d7649554532e08d5b9cc507b28bc6d6fef644e Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 13 Nov 2024 08:21:25 -0300 Subject: [PATCH 34/38] Fix ci --- .github/workflows/ci-core-reusable.yml | 10 +++++----- docs/guides/advanced/01_initialization.md | 2 +- docs/guides/launch.md | 4 ++-- prover/docs/03_launch.md | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index d563cd912339..5ad9f4872ecd 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -359,7 +359,7 @@ jobs: - name: Build tested binaries run: | - ci_run zkstack server build + ci_run zkstack chain server build ci_run zkstack external-node build ci_run zkstack contract-verifier build @@ -382,10 +382,10 @@ jobs: --components=api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads,vm_runner_bwip,vm_playground,da_dispatcher,consensus \ &> ${{ env.SERVER_LOGS_DIR }}/consensus.log & - ci_run zkstack server wait --ignore-prerequisites --verbose --chain era - ci_run zkstack server wait --ignore-prerequisites --verbose --chain validium - ci_run zkstack server wait --ignore-prerequisites --verbose --chain custom_token - ci_run zkstack server wait --ignore-prerequisites --verbose --chain consensus + ci_run zkstack chain server wait --ignore-prerequisites --verbose --chain era + ci_run zkstack chain server wait --ignore-prerequisites --verbose --chain validium + ci_run zkstack chain server wait --ignore-prerequisites --verbose --chain custom_token + ci_run zkstack chain server wait --ignore-prerequisites --verbose --chain consensus - name: Set up attester committee for the consensus chain run: | diff --git a/docs/guides/advanced/01_initialization.md b/docs/guides/advanced/01_initialization.md index 2bc4a9c3a459..f46c5ca7a33b 100644 --- a/docs/guides/advanced/01_initialization.md +++ b/docs/guides/advanced/01_initialization.md @@ -96,7 +96,7 @@ If everything goes well, you should see that L1 blocks are being produced. Now we can start the main server: ```bash -zkstack server +zkstack chain server ``` This will actually run a cargo binary (`zksync_server`). diff --git a/docs/guides/launch.md b/docs/guides/launch.md index 52872a53cf2a..5fe89945f545 100644 --- a/docs/guides/launch.md +++ b/docs/guides/launch.md @@ -106,7 +106,7 @@ documentation for safe ways to customize your setup. Run server: ```bash -zkstack server +zkstack chain server ``` The server's configuration files can be found in `/chains//configs` directory. These files are created when @@ -123,7 +123,7 @@ To manually modify configuration files: 5. Restart the relevant services for changes to take effect: ```bash -zkstack server +zkstack chain server ``` > NOTE: Manual changes to configuration files may be overwritten if the ecosystem is reinitialized or the chain is diff --git a/prover/docs/03_launch.md b/prover/docs/03_launch.md index fcddf93174b9..015a3e43cf08 100644 --- a/prover/docs/03_launch.md +++ b/prover/docs/03_launch.md @@ -35,7 +35,7 @@ We will be running a bunch of binaries, it's recommended to run each in a separa ### Server ```bash -zkstack server --components=api,tree,eth,state_keeper,housekeeper,commitment_generator,da_dispatcher,proof_data_handler,vm_runner_protective_reads,vm_runner_bwip +zkstack chain server --components=api,tree,eth,state_keeper,housekeeper,commitment_generator,da_dispatcher,proof_data_handler,vm_runner_protective_reads,vm_runner_bwip ``` ### Prover gateway From b3773bb9fe6fc56c28946f7dcf0b5e761209eb8d Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 13 Nov 2024 08:22:11 -0300 Subject: [PATCH 35/38] Fix contract-verifier ci --- .github/workflows/ci-core-reusable.yml | 2 +- docs/guides/launch.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index 5ad9f4872ecd..55a6494aff5d 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -361,7 +361,7 @@ jobs: run: | ci_run zkstack chain server build ci_run zkstack external-node build - ci_run zkstack contract-verifier build + ci_run zkstack server contract-verifier build - name: Initialize Contract verifier run: | diff --git a/docs/guides/launch.md b/docs/guides/launch.md index 5fe89945f545..b44f1c8a438d 100644 --- a/docs/guides/launch.md +++ b/docs/guides/launch.md @@ -176,7 +176,7 @@ cargo run --release --bin zksync_commitment_generator ## Running the contract verifier ```bash -zkstack contract-verifier run +zkstack server contract-verifier run ``` ## Troubleshooting From f73f39917e9d60d348674f954a68487ef3fc8fa0 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Wed, 13 Nov 2024 08:23:17 -0300 Subject: [PATCH 36/38] Fix contract-verifier ci --- .github/workflows/ci-core-reusable.yml | 2 +- docs/guides/launch.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index 55a6494aff5d..f6d7762dcaa1 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -361,7 +361,7 @@ jobs: run: | ci_run zkstack chain server build ci_run zkstack external-node build - ci_run zkstack server contract-verifier build + ci_run zkstack chain contract-verifier build - name: Initialize Contract verifier run: | diff --git a/docs/guides/launch.md b/docs/guides/launch.md index b44f1c8a438d..b0a610571964 100644 --- a/docs/guides/launch.md +++ b/docs/guides/launch.md @@ -176,7 +176,7 @@ cargo run --release --bin zksync_commitment_generator ## Running the contract verifier ```bash -zkstack server contract-verifier run +zkstack chain contract-verifier run ``` ## Troubleshooting From 19c46c639fc69b3c8b18ed4d1b8e64b3b6bd7638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Ignacio=20Gonz=C3=A1lez?= Date: Tue, 26 Nov 2024 11:10:30 -0300 Subject: [PATCH 37/38] feat(zk_toolbox): Make chain create independent from ecosystem (#3210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ ## Why ❔ ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. --- zkstack_cli/crates/config/src/consts.rs | 4 +- zkstack_cli/crates/config/src/lib.rs | 2 +- .../crates/zkstack/completion/_zkstack.zsh | 2 + .../crates/zkstack/completion/zkstack.fish | 2 + .../crates/zkstack/completion/zkstack.sh | 12 ++- .../zkstack/src/commands/chain/args/create.rs | 50 ++++++++--- .../zkstack/src/commands/chain/create.rs | 84 ++++++++++++------- .../src/commands/ecosystem/args/create.rs | 18 +++- .../zkstack/src/commands/ecosystem/create.rs | 5 +- 9 files changed, 131 insertions(+), 48 deletions(-) diff --git a/zkstack_cli/crates/config/src/consts.rs b/zkstack_cli/crates/config/src/consts.rs index c3efb4ac3e96..1332d59037f4 100644 --- a/zkstack_cli/crates/config/src/consts.rs +++ b/zkstack_cli/crates/config/src/consts.rs @@ -36,8 +36,8 @@ pub(crate) const LOCAL_APPS_PATH: &str = "apps/"; pub(crate) const LOCAL_CHAINS_PATH: &str = "chains/"; pub(crate) const LOCAL_CONFIGS_PATH: &str = "configs/"; pub(crate) const LOCAL_GENERATED_PATH: &str = ".generated/"; -pub(crate) const LOCAL_DB_PATH: &str = "db/"; -pub(crate) const LOCAL_ARTIFACTS_PATH: &str = "artifacts/"; +pub const LOCAL_DB_PATH: &str = "db/"; +pub const LOCAL_ARTIFACTS_PATH: &str = "artifacts/"; /// Name of apps config file pub const APPS_CONFIG_FILE: &str = "apps.yaml"; diff --git a/zkstack_cli/crates/config/src/lib.rs b/zkstack_cli/crates/config/src/lib.rs index f3001fd55f8d..4937618ae1ed 100644 --- a/zkstack_cli/crates/config/src/lib.rs +++ b/zkstack_cli/crates/config/src/lib.rs @@ -14,7 +14,6 @@ pub use zksync_protobuf_config::{encode_yaml_repr, read_yaml_repr}; mod apps; mod chain; -mod consts; mod contracts; mod ecosystem; mod file_config; @@ -28,6 +27,7 @@ mod wallets; pub mod consensus_config; pub mod consensus_secrets; +pub mod consts; pub mod docker_compose; pub mod explorer; pub mod explorer_compose; diff --git a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh index fa24bf741c22..d183494626bf 100644 --- a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh +++ b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh @@ -82,6 +82,7 @@ in-file\:"Specify file with wallets"))' \ '--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ '--set-as-default=[Set as default chain]' \ '--evm-emulator=[Enable EVM emulator]' \ +'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ '--start-containers=[Start reth and postgres containers after creation]' \ '--chain=[Chain to use]:CHAIN:_default' \ '--legacy-bridge[]' \ @@ -243,6 +244,7 @@ in-file\:"Specify file with wallets"))' \ '--base-token-price-denominator=[Base token denominator]:BASE_TOKEN_PRICE_DENOMINATOR:_default' \ '--set-as-default=[Set as default chain]' \ '--evm-emulator=[Enable EVM emulator]' \ +'--l1-network=[L1 Network]:L1_NETWORK:(localhost sepolia holesky mainnet)' \ '--chain=[Chain to use]:CHAIN:_default' \ '--legacy-bridge[]' \ '-v[Verbose mode]' \ diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.fish b/zkstack_cli/crates/zkstack/completion/zkstack.fish index 0ff8584ba2a1..03ecb0ee28ac 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.fish +++ b/zkstack_cli/crates/zkstack/completion/zkstack.fish @@ -71,6 +71,7 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_se complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l base-token-price-denominator -d 'Base token denominator' -r complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l set-as-default -d 'Set as default chain' -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l evm-emulator -d 'Enable EVM emulator' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l l1-network -d 'L1 Network' -r -f -a "{localhost\t'',sepolia\t'',holesky\t'',mainnet\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l start-containers -d 'Start reth and postgres containers after creation' -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand ecosystem; and __fish_seen_subcommand_from create" -l legacy-bridge @@ -159,6 +160,7 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_s complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l base-token-price-denominator -d 'Base token denominator' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l set-as-default -d 'Set as default chain' -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l evm-emulator -d 'Enable EVM emulator' -r -f -a "{true\t'',false\t''}" +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l l1-network -d 'L1 Network' -r -f -a "{localhost\t'',sepolia\t'',holesky\t'',mainnet\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -l legacy-bridge complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from create" -s v -l verbose -d 'Verbose mode' diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.sh b/zkstack_cli/crates/zkstack/completion/zkstack.sh index 941c964d4c60..f235d7f8fec8 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.sh +++ b/zkstack_cli/crates/zkstack/completion/zkstack.sh @@ -1652,7 +1652,7 @@ _zkstack() { return 0 ;; zkstack__chain__create) - opts="-v -h --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --verbose --chain --ignore-prerequisites --help" + opts="-v -h --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --l1-network --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1713,6 +1713,10 @@ _zkstack() { COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 ;; + --l1-network) + COMPREPLY=($(compgen -W "localhost sepolia holesky mainnet" -- "${cur}")) + return 0 + ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -5305,7 +5309,7 @@ _zkstack() { return 0 ;; zkstack__ecosystem__create) - opts="-v -h --ecosystem-name --l1-network --link-to-code --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --start-containers --verbose --chain --ignore-prerequisites --help" + opts="-v -h --ecosystem-name --l1-network --link-to-code --chain-name --chain-id --prover-mode --wallet-creation --wallet-path --l1-batch-commit-data-generator-mode --base-token-address --base-token-price-nominator --base-token-price-denominator --set-as-default --legacy-bridge --evm-emulator --l1-network --start-containers --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5381,6 +5385,10 @@ _zkstack() { COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 ;; + --l1-network) + COMPREPLY=($(compgen -W "localhost sepolia holesky mainnet" -- "${cur}")) + return 0 + ;; --start-containers) COMPREPLY=($(compgen -W "true false" -- "${cur}")) return 0 diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/create.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/create.rs index ec37f9ba0304..c6f2f8b28362 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/create.rs @@ -8,7 +8,8 @@ use serde::{Deserialize, Serialize}; use slugify_rs::slugify; use strum::{Display, EnumIter, IntoEnumIterator}; use types::{BaseToken, L1BatchCommitmentMode, L1Network, ProverMode, WalletCreation}; -use zksync_basic_types::H160; +use xshell::Shell; +use zksync_basic_types::{L2ChainId, H160}; use crate::{ defaults::L2_CHAIN_ID, @@ -20,12 +21,13 @@ use crate::{ MSG_CHAIN_ID_PROMPT, MSG_CHAIN_ID_VALIDATOR_ERR, MSG_CHAIN_NAME_PROMPT, MSG_EVM_EMULATOR_HELP, MSG_EVM_EMULATOR_PROMPT, MSG_L1_BATCH_COMMIT_DATA_GENERATOR_MODE_PROMPT, MSG_L1_COMMIT_DATA_GENERATOR_MODE_HELP, - MSG_NUMBER_VALIDATOR_GREATHER_THAN_ZERO_ERR, MSG_NUMBER_VALIDATOR_NOT_ZERO_ERR, - MSG_PROVER_MODE_HELP, MSG_PROVER_VERSION_PROMPT, MSG_SET_AS_DEFAULT_HELP, - MSG_SET_AS_DEFAULT_PROMPT, MSG_WALLET_CREATION_HELP, MSG_WALLET_CREATION_PROMPT, - MSG_WALLET_CREATION_VALIDATOR_ERR, MSG_WALLET_PATH_HELP, MSG_WALLET_PATH_INVALID_ERR, - MSG_WALLET_PATH_PROMPT, + MSG_L1_NETWORK_HELP, MSG_L1_NETWORK_PROMPT, MSG_NUMBER_VALIDATOR_GREATHER_THAN_ZERO_ERR, + MSG_NUMBER_VALIDATOR_NOT_ZERO_ERR, MSG_PROVER_MODE_HELP, MSG_PROVER_VERSION_PROMPT, + MSG_SET_AS_DEFAULT_HELP, MSG_SET_AS_DEFAULT_PROMPT, MSG_WALLET_CREATION_HELP, + MSG_WALLET_CREATION_PROMPT, MSG_WALLET_CREATION_VALIDATOR_ERR, MSG_WALLET_PATH_HELP, + MSG_WALLET_PATH_INVALID_ERR, MSG_WALLET_PATH_PROMPT, }, + utils::link_to_code::get_link_to_code, }; // We need to duplicate it for using enum inside the arguments @@ -70,21 +72,30 @@ pub struct ChainCreateArgs { pub(crate) legacy_bridge: bool, #[arg(long, help = MSG_EVM_EMULATOR_HELP, default_missing_value = "true", num_args = 0..=1)] evm_emulator: Option, + #[clap(long, help = MSG_L1_NETWORK_HELP, value_enum)] + pub l1_network: Option, } impl ChainCreateArgs { + #[allow(clippy::too_many_arguments)] pub fn fill_values_with_prompt( self, + shell: &Shell, number_of_chains: u32, - l1_network: &L1Network, + internal_id: u32, + l1_network: Option, possible_erc20: Vec, - link_to_code: String, + link_to_code: Option, + chains_path: Option, + era_chain_id: L2ChainId, ) -> anyhow::Result { let mut chain_name = self .chain_name .unwrap_or_else(|| Prompt::new(MSG_CHAIN_NAME_PROMPT).ask()); chain_name = slugify!(&chain_name, separator = "_"); + let chain_path = chains_path.unwrap_or_default().join(&chain_name); + let chain_id = self .chain_id .map(|v| match v { @@ -97,8 +108,14 @@ impl ChainCreateArgs { .ask() }); + let l1_network = l1_network.unwrap_or_else(|| { + self.l1_network.unwrap_or_else(|| { + PromptSelect::new(MSG_L1_NETWORK_PROMPT, L1Network::iter()).ask() + }) + }); + let wallet_creation = if let Some(wallet) = self.wallet_creation { - if wallet == WalletCreation::Localhost && *l1_network != L1Network::Localhost { + if wallet == WalletCreation::Localhost && l1_network != L1Network::Localhost { bail!(MSG_WALLET_CREATION_VALIDATOR_ERR); } else { wallet @@ -108,7 +125,7 @@ impl ChainCreateArgs { MSG_WALLET_CREATION_PROMPT, WalletCreation::iter().filter(|wallet| { // Disable localhost wallets for external networks - if *l1_network == L1Network::Localhost { + if l1_network == L1Network::Localhost { true } else { *wallet != WalletCreation::Localhost @@ -215,6 +232,8 @@ impl ChainCreateArgs { } }; + let link_to_code = link_to_code.unwrap_or_else(|| get_link_to_code(shell)); + let evm_emulator = self.evm_emulator.unwrap_or_else(|| { PromptConfirm::new(MSG_EVM_EMULATOR_PROMPT) .default(false) @@ -222,6 +241,9 @@ impl ChainCreateArgs { }); let set_as_default = self.set_as_default.unwrap_or_else(|| { + if number_of_chains == 0 { + return true; + } PromptConfirm::new(MSG_SET_AS_DEFAULT_PROMPT) .default(true) .ask() @@ -239,6 +261,10 @@ impl ChainCreateArgs { legacy_bridge: self.legacy_bridge, evm_emulator, link_to_code, + chain_path, + era_chain_id, + internal_id, + l1_network, }) } } @@ -256,6 +282,10 @@ pub struct ChainCreateArgsFinal { pub legacy_bridge: bool, pub evm_emulator: bool, pub link_to_code: String, + pub chain_path: PathBuf, + pub era_chain_id: L2ChainId, + pub internal_id: u32, + pub l1_network: L1Network, } #[derive(Debug, Clone, EnumIter, Display, PartialEq, Eq)] diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/create.rs b/zkstack_cli/crates/zkstack/src/commands/chain/create.rs index c5ff4956c87b..4ef5f8573ed1 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/create.rs @@ -3,10 +3,10 @@ use std::cell::OnceCell; use anyhow::Context; use common::{logger, spinner::Spinner}; use config::{ - create_local_configs_dir, create_wallets, + create_local_configs_dir, create_wallets, get_default_era_chain_id, traits::{ReadConfigWithBasePath, SaveConfigWithBasePath}, zkstack_config::ZkStackConfig, - ChainConfig, EcosystemConfig, GenesisConfig, + ChainConfig, EcosystemConfig, GenesisConfig, LOCAL_ARTIFACTS_PATH, LOCAL_DB_PATH, }; use xshell::Shell; use zksync_basic_types::L2ChainId; @@ -22,22 +22,49 @@ use crate::{ }; pub fn run(args: ChainCreateArgs, shell: &Shell) -> anyhow::Result<()> { - let mut ecosystem_config = ZkStackConfig::ecosystem(shell)?; + let mut ecosystem_config = ZkStackConfig::ecosystem(shell).ok(); create(args, &mut ecosystem_config, shell) } fn create( args: ChainCreateArgs, - ecosystem_config: &mut EcosystemConfig, + ecosystem: &mut Option, shell: &Shell, ) -> anyhow::Result<()> { - let tokens = ecosystem_config.get_erc20_tokens(); + let possible_erc20 = ecosystem + .as_ref() + .map(|ecosystem| ecosystem.get_erc20_tokens()) + .unwrap_or_default(); + + let number_of_chains = ecosystem + .as_ref() + .map(|ecosystem| ecosystem.list_of_chains().len() as u32) + .unwrap_or(0); + + let internal_id = ecosystem.as_ref().map_or(0, |_| number_of_chains + 1); + + let l1_network = ecosystem.as_ref().map(|ecosystem| ecosystem.l1_network); + + let chains_path = ecosystem.as_ref().map(|ecosystem| ecosystem.chains.clone()); + let era_chain_id = ecosystem + .as_ref() + .map(|ecosystem| ecosystem.era_chain_id) + .unwrap_or(get_default_era_chain_id()); + + let link_to_code = ecosystem + .as_ref() + .map(|ecosystem| ecosystem.link_to_code.clone().display().to_string()); + let args = args .fill_values_with_prompt( - ecosystem_config.list_of_chains().len() as u32, - &ecosystem_config.l1_network, - tokens, - ecosystem_config.link_to_code.clone().display().to_string(), + shell, + number_of_chains, + internal_id, + l1_network, + possible_erc20, + link_to_code, + chains_path, + era_chain_id, ) .context(MSG_ARGS_VALIDATOR_ERR)?; @@ -47,10 +74,14 @@ fn create( let spinner = Spinner::new(MSG_CREATING_CHAIN_CONFIGURATIONS_SPINNER); let name = args.chain_name.clone(); let set_as_default = args.set_as_default; - create_chain_inner(args, ecosystem_config, shell)?; - if set_as_default { - ecosystem_config.default_chain = name; - ecosystem_config.save_with_base_path(shell, ".")?; + + create_chain_inner(args, shell)?; + + if let Some(ecosystem) = ecosystem.as_mut() { + if set_as_default { + ecosystem.default_chain = name; + ecosystem.save_with_base_path(shell, ".")?; + } } spinner.finish(); @@ -59,24 +90,19 @@ fn create( Ok(()) } -pub(crate) fn create_chain_inner( - args: ChainCreateArgsFinal, - ecosystem_config: &EcosystemConfig, - shell: &Shell, -) -> anyhow::Result<()> { +pub(crate) fn create_chain_inner(args: ChainCreateArgsFinal, shell: &Shell) -> anyhow::Result<()> { if args.legacy_bridge { logger::warn("WARNING!!! You are creating a chain with legacy bridge, use it only for testing compatibility") } let default_chain_name = args.chain_name.clone(); - let chain_path = ecosystem_config.chains.join(&default_chain_name); + let chain_path = args.chain_path; let chain_configs_path = create_local_configs_dir(shell, &chain_path)?; let (chain_id, legacy_bridge) = if args.legacy_bridge { // Legacy bridge is distinguished by using the same chain id as ecosystem - (ecosystem_config.era_chain_id, Some(true)) + (args.era_chain_id, Some(true)) } else { (L2ChainId::from(args.chain_id), None) }; - let internal_id = ecosystem_config.list_of_chains().len() as u32; let link_to_code = resolve_link_to_code(shell, chain_path.clone(), args.link_to_code.clone())?; let default_genesis_config = GenesisConfig::read_with_base_path( shell, @@ -86,16 +112,18 @@ pub(crate) fn create_chain_inner( if args.evm_emulator && !has_evm_emulation_support { anyhow::bail!(MSG_EVM_EMULATOR_HASH_MISSING_ERR); } + let rocks_db_path = chain_path.join(LOCAL_DB_PATH); + let artifacts = chain_path.join(LOCAL_ARTIFACTS_PATH); let chain_config = ChainConfig { - id: internal_id, + id: args.internal_id, name: default_chain_name.clone(), chain_id, prover_version: args.prover_version, - l1_network: ecosystem_config.l1_network, - link_to_code: ecosystem_config.link_to_code.clone(), - rocks_db_path: ecosystem_config.get_chain_rocks_db_path(&default_chain_name), - artifacts: ecosystem_config.get_chain_artifacts_path(&default_chain_name), + l1_network: args.l1_network, + link_to_code: link_to_code.clone(), + rocks_db_path, + artifacts, configs: chain_configs_path.clone(), external_node_config_path: None, l1_batch_commit_data_generator_mode: args.l1_batch_commit_data_generator_mode, @@ -109,8 +137,8 @@ pub(crate) fn create_chain_inner( create_wallets( shell, &chain_config.configs, - &ecosystem_config.link_to_code, - internal_id, + &link_to_code, + args.internal_id, args.wallet_creation, args.wallet_path, )?; diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/create.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/create.rs index 53d9c27be60b..05cfeafd4752 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/create.rs @@ -2,6 +2,7 @@ use std::path::PathBuf; use clap::{Parser, ValueHint}; use common::{Prompt, PromptConfirm, PromptSelect}; +use config::get_default_era_chain_id; use serde::{Deserialize, Serialize}; use slugify_rs::slugify; use strum::IntoEnumIterator; @@ -52,9 +53,20 @@ impl EcosystemCreateArgs { // Make the only chain as a default one self.chain.set_as_default = Some(true); - let chain = - self.chain - .fill_values_with_prompt(0, &l1_network, vec![], link_to_code.clone())?; + let chains_path = PathBuf::from("chains"); + + let era_chain_id = get_default_era_chain_id(); + + let chain = self.chain.fill_values_with_prompt( + shell, + 0, + 1, + Some(l1_network), + vec![], + Some(link_to_code.clone()), + Some(chains_path), + era_chain_id, + )?; let start_containers = self.start_containers.unwrap_or_else(|| { PromptConfirm::new(MSG_START_CONTAINERS_PROMPT) diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs index 7d766d859f7c..f39ad90bbe97 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs @@ -62,7 +62,8 @@ fn create(args: EcosystemCreateArgs, shell: &Shell) -> anyhow::Result<()> { let link_to_code = resolve_link_to_code(shell, shell.current_dir(), args.link_to_code.clone())?; let spinner = Spinner::new(MSG_CREATING_INITIAL_CONFIGURATIONS_SPINNER); - let chain_config = args.chain_config(); + let mut chain_config = args.chain_config(); + chain_config.link_to_code = link_to_code.display().to_string(); let chains_path = shell.create_dir("chains")?; let default_chain_name = args.chain_args.chain_name.clone(); @@ -97,7 +98,7 @@ fn create(args: EcosystemCreateArgs, shell: &Shell) -> anyhow::Result<()> { spinner.finish(); let spinner = Spinner::new(MSG_CREATING_DEFAULT_CHAIN_SPINNER); - create_chain_inner(chain_config, &ecosystem_config, shell)?; + create_chain_inner(chain_config, shell)?; spinner.finish(); if args.start_containers { From d6c3446da867b66f8c766449148ac406f7c3cabe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Ignacio=20Gonz=C3=A1lez?= Date: Tue, 26 Nov 2024 11:49:25 -0300 Subject: [PATCH 38/38] feat(zk_toolbox): Make chain init independent from ecosystem (#3231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ ## Why ❔ ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. --- zkstack_cli/crates/config/src/chain.rs | 6 +- zkstack_cli/crates/config/src/ecosystem.rs | 34 +++-- zkstack_cli/crates/config/src/utils.rs | 14 +- .../crates/zkstack/completion/_zkstack.zsh | 3 + .../crates/zkstack/completion/zkstack.fish | 2 + .../crates/zkstack/completion/zkstack.sh | 16 +- .../crates/zkstack/src/accept_ownership.rs | 7 +- .../commands/chain/accept_chain_ownership.rs | 18 +-- .../src/commands/chain/args/init/configs.rs | 63 ++++++-- .../src/commands/chain/args/init/mod.rs | 58 ++++++-- .../src/commands/chain/build_transactions.rs | 49 ++++--- .../zkstack/src/commands/chain/common.rs | 100 +++++++------ .../src/commands/chain/deploy_l2_contracts.rs | 137 ++++++++---------- .../src/commands/chain/init/configs.rs | 31 ++-- .../zkstack/src/commands/chain/init/mod.rs | 74 ++++++---- .../crates/zkstack/src/commands/chain/mod.rs | 71 +++++++-- .../src/commands/chain/register_chain.rs | 13 +- .../chain/set_token_multiplier_setter.rs | 34 ++--- .../src/commands/chain/setup_legacy_bridge.rs | 6 +- .../zkstack/src/commands/ecosystem/init.rs | 65 +++++---- zkstack_cli/crates/zkstack/src/messages.rs | 4 + 21 files changed, 496 insertions(+), 309 deletions(-) diff --git a/zkstack_cli/crates/config/src/chain.rs b/zkstack_cli/crates/config/src/chain.rs index d01b32fd7d58..f4c57d67c2e1 100644 --- a/zkstack_cli/crates/config/src/chain.rs +++ b/zkstack_cli/crates/config/src/chain.rs @@ -19,7 +19,7 @@ use crate::{ FileConfigWithDefaultName, ReadConfig, ReadConfigWithBasePath, SaveConfig, SaveConfigWithBasePath, ZkStackConfig, }, - utils::find_file, + utils::{find_file, get_preexisting_ecosystem_contracts_path}, ContractsConfig, EcosystemConfig, GeneralConfig, GenesisConfig, SecretsConfig, WalletsConfig, }; @@ -151,6 +151,10 @@ impl ChainConfig { config.save_with_base_path(shell, path) } + pub fn get_preexisting_ecosystem_contracts_path(&self) -> PathBuf { + get_preexisting_ecosystem_contracts_path(&self.link_to_code, self.l1_network) + } + fn get_internal(&self) -> ChainConfigInternal { ChainConfigInternal { id: self.id, diff --git a/zkstack_cli/crates/config/src/ecosystem.rs b/zkstack_cli/crates/config/src/ecosystem.rs index fc3a2c5b71f9..15836d748002 100644 --- a/zkstack_cli/crates/config/src/ecosystem.rs +++ b/zkstack_cli/crates/config/src/ecosystem.rs @@ -12,9 +12,9 @@ use zksync_basic_types::L2ChainId; use crate::{ consts::{ - CONFIGS_PATH, CONFIG_NAME, CONTRACTS_FILE, ECOSYSTEM_PATH, ERA_CHAIN_ID, - ERC20_CONFIGS_FILE, ERC20_DEPLOYMENT_FILE, INITIAL_DEPLOYMENT_FILE, L1_CONTRACTS_FOUNDRY, - LOCAL_ARTIFACTS_PATH, LOCAL_DB_PATH, WALLETS_FILE, + CONFIGS_PATH, CONFIG_NAME, CONTRACTS_FILE, ERA_CHAIN_ID, ERC20_CONFIGS_FILE, + ERC20_DEPLOYMENT_FILE, INITIAL_DEPLOYMENT_FILE, L1_CONTRACTS_FOUNDRY, LOCAL_ARTIFACTS_PATH, + LOCAL_DB_PATH, WALLETS_FILE, }, create_localhost_wallets, forge_interface::deploy_ecosystem::{ @@ -22,7 +22,7 @@ use crate::{ output::{ERC20Tokens, Erc20Token}, }, traits::{FileConfigWithDefaultName, ReadConfig, SaveConfig, ZkStackConfig}, - utils::find_file, + utils::{find_file, get_preexisting_ecosystem_contracts_path}, ChainConfig, ChainConfigInternal, ContractsConfig, WalletsConfig, }; @@ -123,7 +123,6 @@ impl EcosystemConfig { // with chain and we will find the ecosystem config somewhere in parent directories let chain_config = ChainConfigInternal::read(shell, CONFIG_NAME) .map_err(|err| EcosystemConfigFromFileError::InvalidConfig { source: err })?; - logger::info(format!("You are in a directory with chain config, default chain for execution has changed to {}", &chain_config.name)); let current_dir = shell.current_dir(); let Some(parent) = current_dir.parent() else { @@ -131,8 +130,15 @@ impl EcosystemConfig { }; // Try to find ecosystem somewhere in parent directories shell.change_dir(parent); - let mut ecosystem_config = EcosystemConfig::from_file(shell)?; + let mut ecosystem_config = match EcosystemConfig::from_file(shell) { + Ok(ecosystem) => ecosystem, + Err(err) => { + shell.change_dir(¤t_dir); + return Err(err); + } + }; // change the default chain for using it in later executions + logger::info(format!("You are in a directory with chain config, default chain for execution has changed to {}", &chain_config.name)); ecosystem_config.default_chain = chain_config.name; ecosystem_config } @@ -197,7 +203,7 @@ impl EcosystemConfig { } pub fn get_wallets(&self) -> anyhow::Result { - let path = self.config.join(WALLETS_FILE); + let path = self.get_wallets_path(); if self.get_shell().path_exists(&path) { return WalletsConfig::read(self.get_shell(), &path); } @@ -211,7 +217,7 @@ impl EcosystemConfig { } pub fn get_contracts_config(&self) -> anyhow::Result { - ContractsConfig::read(self.get_shell(), self.config.join(CONTRACTS_FILE)) + ContractsConfig::read(self.get_shell(), self.get_contracts_path()) } pub fn path_to_foundry(&self) -> PathBuf { @@ -242,8 +248,8 @@ impl EcosystemConfig { } /// Path to the predefined ecosystem configs - pub fn get_preexisting_configs_path(&self) -> PathBuf { - self.link_to_code.join(ECOSYSTEM_PATH) + pub fn get_preexisting_ecosystem_contracts_path(&self) -> PathBuf { + get_preexisting_ecosystem_contracts_path(&self.link_to_code, self.l1_network) } pub fn get_chain_rocks_db_path(&self, chain_name: &str) -> PathBuf { @@ -272,6 +278,14 @@ impl EcosystemConfig { wallet_creation: self.wallet_creation, } } + + pub fn get_contracts_path(&self) -> PathBuf { + self.config.join(CONTRACTS_FILE) + } + + pub fn get_wallets_path(&self) -> PathBuf { + self.config.join(WALLETS_FILE) + } } /// Result of checking if the ecosystem exists. diff --git a/zkstack_cli/crates/config/src/utils.rs b/zkstack_cli/crates/config/src/utils.rs index 63cf2cf601f5..e24c1570e2c9 100644 --- a/zkstack_cli/crates/config/src/utils.rs +++ b/zkstack_cli/crates/config/src/utils.rs @@ -1,7 +1,10 @@ -use std::path::PathBuf; +use std::path::{Path, PathBuf}; +use types::L1Network; use xshell::Shell; +use crate::ECOSYSTEM_PATH; + // Find file in all parents repository and return necessary path or an empty error if nothing has been found pub fn find_file(shell: &Shell, path_buf: PathBuf, file_name: &str) -> Result { let _dir = shell.push_dir(path_buf); @@ -15,3 +18,12 @@ pub fn find_file(shell: &Shell, path_buf: PathBuf, file_name: &str) -> Result PathBuf { + link_to_code + .join(ECOSYSTEM_PATH) + .join(format!("{}.yaml", l1_network.to_string().to_lowercase())) +} diff --git a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh index d183494626bf..9a45735aa25e 100644 --- a/zkstack_cli/crates/zkstack/completion/_zkstack.zsh +++ b/zkstack_cli/crates/zkstack/completion/_zkstack.zsh @@ -286,6 +286,8 @@ _arguments "${_arguments_options[@]}" : \ '--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ '--deploy-paymaster=[]' \ '--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--ecosystem-contracts-path=[Ecosystem contracts path]:ECOSYSTEM_CONTRACTS_PATH:_default' \ +'--wallets-path=[Wallets path]:WALLETS_PATH:_default' \ '--chain=[Chain to use]:CHAIN:_default' \ '--resume[]' \ '-d[]' \ @@ -312,6 +314,7 @@ _arguments "${_arguments_options[@]}" : \ '--server-db-url=[Server database url without database name]:SERVER_DB_URL:_default' \ '--server-db-name=[Server database name]:SERVER_DB_NAME:_default' \ '--l1-rpc-url=[L1 RPC URL]:L1_RPC_URL:_default' \ +'--ecosystem-contracts-path=[Ecosystem contracts path]:ECOSYSTEM_CONTRACTS_PATH:_default' \ '--chain=[Chain to use]:CHAIN:_default' \ '-d[Use default database urls and names]' \ '--dev[Use default database urls and names]' \ diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.fish b/zkstack_cli/crates/zkstack/completion/zkstack.fish index 03ecb0ee28ac..20ea0c60c834 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.fish +++ b/zkstack_cli/crates/zkstack/completion/zkstack.fish @@ -187,6 +187,8 @@ complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_s complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l server-db-name -d 'Server database name' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l deploy-paymaster -r -f -a "{true\t'',false\t''}" complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l l1-rpc-url -d 'L1 RPC URL' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l ecosystem-contracts-path -d 'Ecosystem contracts path' -r +complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l wallets-path -d 'Wallets path' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l chain -d 'Chain to use' -r complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -l resume complete -c zkstack -n "__fish_zkstack_using_subcommand chain; and __fish_seen_subcommand_from init" -s d -l dont-drop diff --git a/zkstack_cli/crates/zkstack/completion/zkstack.sh b/zkstack_cli/crates/zkstack/completion/zkstack.sh index f235d7f8fec8..5dd12b32ee1b 100644 --- a/zkstack_cli/crates/zkstack/completion/zkstack.sh +++ b/zkstack_cli/crates/zkstack/completion/zkstack.sh @@ -2555,7 +2555,7 @@ _zkstack() { return 0 ;; zkstack__chain__init) - opts="-a -d -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --server-db-url --server-db-name --dont-drop --deploy-paymaster --l1-rpc-url --no-port-reallocation --dev --verbose --chain --ignore-prerequisites --help configs help" + opts="-a -d -v -h --verify --verifier --verifier-url --verifier-api-key --resume --additional-args --server-db-url --server-db-name --dont-drop --deploy-paymaster --l1-rpc-url --no-port-reallocation --ecosystem-contracts-path --wallets-path --dev --verbose --chain --ignore-prerequisites --help configs help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2601,6 +2601,14 @@ _zkstack() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --ecosystem-contracts-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --wallets-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -2613,7 +2621,7 @@ _zkstack() { return 0 ;; zkstack__chain__init__configs) - opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --l1-rpc-url --no-port-reallocation --verbose --chain --ignore-prerequisites --help" + opts="-d -d -v -h --server-db-url --server-db-name --dev --dont-drop --l1-rpc-url --no-port-reallocation --ecosystem-contracts-path --verbose --chain --ignore-prerequisites --help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2631,6 +2639,10 @@ _zkstack() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --ecosystem-contracts-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --chain) COMPREPLY=($(compgen -f "${cur}")) return 0 diff --git a/zkstack_cli/crates/zkstack/src/accept_ownership.rs b/zkstack_cli/crates/zkstack/src/accept_ownership.rs index 474e76e599a8..d3c6d7699fda 100644 --- a/zkstack_cli/crates/zkstack/src/accept_ownership.rs +++ b/zkstack_cli/crates/zkstack/src/accept_ownership.rs @@ -1,3 +1,5 @@ +use std::path::Path; + use common::{ forge::{Forge, ForgeScript, ForgeScriptArgs}, spinner::Spinner, @@ -26,7 +28,7 @@ lazy_static! { pub async fn accept_admin( shell: &Shell, - ecosystem_config: &EcosystemConfig, + foundry_contracts_path: &Path, admin: Address, governor: &Wallet, target_address: Address, @@ -42,8 +44,7 @@ pub async fn accept_admin( let calldata = ACCEPT_ADMIN .encode("chainAdminAcceptAdmin", (admin, target_address)) .unwrap(); - let foundry_contracts_path = ecosystem_config.path_to_foundry(); - let forge = Forge::new(&foundry_contracts_path) + let forge = Forge::new(foundry_contracts_path) .script( &ACCEPT_GOVERNANCE_SCRIPT_PARAMS.script(), forge_args.clone(), diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs b/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs index 2ecb80b1fed6..b98d81581272 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs @@ -1,23 +1,19 @@ use anyhow::Context; use common::{forge::ForgeScriptArgs, logger, spinner::Spinner}; -use config::zkstack_config::ZkStackConfig; +use config::ChainConfig; use xshell::Shell; use crate::{ accept_ownership::accept_admin, messages::{ - MSG_ACCEPTING_ADMIN_SPINNER, MSG_CHAIN_NOT_INITIALIZED, MSG_CHAIN_OWNERSHIP_TRANSFERRED, + MSG_ACCEPTING_ADMIN_SPINNER, MSG_CHAIN_OWNERSHIP_TRANSFERRED, MSG_L1_SECRETS_MUST_BE_PRESENTED, }, }; -pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = ZkStackConfig::ecosystem(shell)?; - let chain_config = ecosystem_config - .load_current_chain() - .context(MSG_CHAIN_NOT_INITIALIZED)?; - let contracts = chain_config.get_contracts_config()?; - let secrets = chain_config.get_secrets_config()?; +pub async fn run(args: ForgeScriptArgs, shell: &Shell, chain: ChainConfig) -> anyhow::Result<()> { + let contracts = chain.get_contracts_config()?; + let secrets = chain.get_secrets_config()?; let l1_rpc_url = secrets .l1 .context(MSG_L1_SECRETS_MUST_BE_PRESENTED)? @@ -28,9 +24,9 @@ pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { let spinner = Spinner::new(MSG_ACCEPTING_ADMIN_SPINNER); accept_admin( shell, - &ecosystem_config, + &chain.path_to_foundry(), contracts.l1.chain_admin_addr, - &chain_config.get_wallets_config()?.governor, + &chain.get_wallets_config()?.governor, contracts.l1.diamond_proxy_addr, &args, l1_rpc_url.clone(), diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/configs.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/configs.rs index b34809643cf5..67f06effedd5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/configs.rs @@ -1,17 +1,23 @@ +use std::path::PathBuf; + use clap::Parser; use common::Prompt; -use config::ChainConfig; +use config::{ChainConfig, EcosystemConfig}; use serde::{Deserialize, Serialize}; use types::L1Network; use url::Url; use crate::{ - commands::chain::args::{ - genesis::{GenesisArgs, GenesisArgsFinal}, - init::InitArgsFinal, + commands::{ + chain::args::{ + genesis::{GenesisArgs, GenesisArgsFinal}, + init::InitArgsFinal, + }, + ecosystem::init::prompt_ecosystem_contracts_path, }, defaults::LOCAL_RPC_URL, messages::{ + msg_ecosystem_no_found_preexisting_contract, MSG_ECOSYSTEM_CONTRACTS_PATH_HELP, MSG_GENESIS_ARGS_HELP, MSG_L1_RPC_URL_HELP, MSG_L1_RPC_URL_INVALID_ERR, MSG_L1_RPC_URL_PROMPT, MSG_NO_PORT_REALLOCATION_HELP, }, @@ -26,6 +32,8 @@ pub struct InitConfigsArgs { pub l1_rpc_url: Option, #[clap(long, help = MSG_NO_PORT_REALLOCATION_HELP)] pub no_port_reallocation: bool, + #[clap(long, help = MSG_ECOSYSTEM_CONTRACTS_PATH_HELP)] + pub ecosystem_contracts_path: Option, } #[derive(Debug, Serialize, Deserialize, Clone)] @@ -33,13 +41,18 @@ pub struct InitConfigsArgsFinal { pub genesis_args: GenesisArgsFinal, pub l1_rpc_url: String, pub no_port_reallocation: bool, + pub ecosystem_contracts_path: PathBuf, } impl InitConfigsArgs { - pub fn fill_values_with_prompt(self, config: &ChainConfig) -> InitConfigsArgsFinal { + pub fn fill_values_with_prompt( + self, + ecosystem: Option, + chain: &ChainConfig, + ) -> anyhow::Result { let l1_rpc_url = self.l1_rpc_url.unwrap_or_else(|| { let mut prompt = Prompt::new(MSG_L1_RPC_URL_PROMPT); - if config.l1_network == L1Network::Localhost { + if chain.l1_network == L1Network::Localhost { prompt = prompt.default(LOCAL_RPC_URL); } prompt @@ -51,12 +64,43 @@ impl InitConfigsArgs { .ask() }); - InitConfigsArgsFinal { - genesis_args: self.genesis_args.fill_values_with_prompt(config), + let ecosystem_contracts_path = + get_ecosystem_contracts_path(self.ecosystem_contracts_path, ecosystem, chain)?; + + Ok(InitConfigsArgsFinal { + genesis_args: self.genesis_args.fill_values_with_prompt(chain), l1_rpc_url, no_port_reallocation: self.no_port_reallocation, - } + ecosystem_contracts_path, + }) + } +} + +pub fn get_ecosystem_contracts_path( + ecosystem_contracts_path: Option, + ecosystem: Option, + chain: &ChainConfig, +) -> anyhow::Result { + let ecosystem_preexisting_contracts_path = ecosystem.map_or_else( + || chain.get_preexisting_ecosystem_contracts_path(), + |e| e.get_preexisting_ecosystem_contracts_path(), + ); + + let ecosystem_contracts_path = + ecosystem_contracts_path.map_or_else(prompt_ecosystem_contracts_path, |path| { + if path.is_empty() { + return None; + } + Some(PathBuf::from(path)) + }); + + if ecosystem_contracts_path.is_none() && !ecosystem_preexisting_contracts_path.exists() { + anyhow::bail!(msg_ecosystem_no_found_preexisting_contract( + &chain.l1_network.to_string() + )) } + + Ok(ecosystem_contracts_path.unwrap_or(ecosystem_preexisting_contracts_path)) } impl InitConfigsArgsFinal { @@ -65,6 +109,7 @@ impl InitConfigsArgsFinal { genesis_args: init_args.genesis_args.clone(), l1_rpc_url: init_args.l1_rpc_url.clone(), no_port_reallocation: init_args.no_port_reallocation, + ecosystem_contracts_path: init_args.ecosystem_contracts_path.clone(), } } } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs index a5c7a6890ca1..84e7d71bc8ae 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs @@ -1,6 +1,9 @@ +use std::path::PathBuf; + use clap::Parser; use common::{forge::ForgeScriptArgs, Prompt}; -use config::ChainConfig; +use config::{ChainConfig, EcosystemConfig}; +use configs::get_ecosystem_contracts_path; use serde::{Deserialize, Serialize}; use types::L1Network; use url::Url; @@ -9,9 +12,10 @@ use crate::{ commands::chain::args::genesis::{GenesisArgs, GenesisArgsFinal}, defaults::LOCAL_RPC_URL, messages::{ - MSG_DEPLOY_PAYMASTER_PROMPT, MSG_DEV_ARG_HELP, MSG_L1_RPC_URL_HELP, - MSG_L1_RPC_URL_INVALID_ERR, MSG_L1_RPC_URL_PROMPT, MSG_NO_PORT_REALLOCATION_HELP, - MSG_SERVER_DB_NAME_HELP, MSG_SERVER_DB_URL_HELP, + MSG_DEPLOY_PAYMASTER_PROMPT, MSG_DEV_ARG_HELP, MSG_ECOSYSTEM_CONTRACTS_PATH_HELP, + MSG_L1_RPC_URL_HELP, MSG_L1_RPC_URL_INVALID_ERR, MSG_L1_RPC_URL_PROMPT, + MSG_NO_PORT_REALLOCATION_HELP, MSG_SERVER_DB_NAME_HELP, MSG_SERVER_DB_URL_HELP, + MSG_WALLETS_PATH_HELP, MSG_WALLETS_PATH_PROMPT, }, }; @@ -35,6 +39,10 @@ pub struct InitArgs { pub l1_rpc_url: Option, #[clap(long, help = MSG_NO_PORT_REALLOCATION_HELP)] pub no_port_reallocation: bool, + #[clap(long, help = MSG_ECOSYSTEM_CONTRACTS_PATH_HELP)] + pub ecosystem_contracts_path: Option, + #[clap(long, help = MSG_WALLETS_PATH_HELP)] + pub wallets_path: Option, #[clap(long, help = MSG_DEV_ARG_HELP)] pub dev: bool, } @@ -49,7 +57,11 @@ impl InitArgs { } } - pub fn fill_values_with_prompt(self, config: &ChainConfig) -> InitArgsFinal { + pub fn fill_values_with_prompt( + self, + ecosystem: Option, + chain: &ChainConfig, + ) -> anyhow::Result { let genesis = self.get_genesis_args(); let deploy_paymaster = if self.dev { @@ -67,7 +79,7 @@ impl InitArgs { } else { self.l1_rpc_url.unwrap_or_else(|| { let mut prompt = Prompt::new(MSG_L1_RPC_URL_PROMPT); - if config.l1_network == L1Network::Localhost { + if chain.l1_network == L1Network::Localhost { prompt = prompt.default(LOCAL_RPC_URL); } prompt @@ -80,14 +92,40 @@ impl InitArgs { }) }; - InitArgsFinal { + let ecosystem_contracts_path = if self.dev { + self.ecosystem_contracts_path.map_or_else( + || { + ecosystem.as_ref().map_or_else( + || chain.get_preexisting_ecosystem_contracts_path(), + |e| e.get_contracts_path(), + ) + }, + PathBuf::from, + ) + } else if let Some(ecosystem) = &ecosystem { + ecosystem.get_contracts_path() + } else { + get_ecosystem_contracts_path(self.ecosystem_contracts_path, ecosystem.clone(), chain)? + }; + + let wallets_path = ecosystem.map_or_else( + || { + self.wallets_path + .map_or_else(|| Prompt::new(MSG_WALLETS_PATH_PROMPT).ask(), PathBuf::from) + }, + |e| e.get_wallets_path(), + ); + + Ok(InitArgsFinal { forge_args: self.forge_args, - genesis_args: genesis.fill_values_with_prompt(config), + genesis_args: genesis.fill_values_with_prompt(chain), deploy_paymaster, l1_rpc_url, no_port_reallocation: self.no_port_reallocation, + ecosystem_contracts_path, + wallets_path, dev: self.dev, - } + }) } } @@ -98,5 +136,7 @@ pub struct InitArgsFinal { pub deploy_paymaster: bool, pub l1_rpc_url: String, pub no_port_reallocation: bool, + pub ecosystem_contracts_path: PathBuf, + pub wallets_path: PathBuf, pub dev: bool, } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs b/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs index 5af70ec176e9..f40472e4b8b1 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs @@ -1,8 +1,8 @@ use anyhow::Context; use common::{git, logger, spinner::Spinner}; use config::{ - copy_configs, traits::SaveConfigWithBasePath, update_from_chain_config, - zkstack_config::ZkStackConfig, + copy_configs, traits::SaveConfigWithBasePath, update_from_chain_config, ChainConfig, + EcosystemConfig, }; use ethers::utils::hex::ToHex; use xshell::Shell; @@ -12,9 +12,9 @@ use crate::{ args::build_transactions::BuildTransactionsArgs, register_chain::register_chain, }, messages::{ - MSG_BUILDING_CHAIN_REGISTRATION_TXNS_SPINNER, MSG_CHAIN_NOT_FOUND_ERR, - MSG_CHAIN_TRANSACTIONS_BUILT, MSG_CHAIN_TXN_MISSING_CONTRACT_CONFIG, - MSG_CHAIN_TXN_OUT_PATH_INVALID_ERR, MSG_PREPARING_CONFIG_SPINNER, MSG_SELECTED_CONFIG, + MSG_BUILDING_CHAIN_REGISTRATION_TXNS_SPINNER, MSG_CHAIN_TRANSACTIONS_BUILT, + MSG_CHAIN_TXN_MISSING_CONTRACT_CONFIG, MSG_CHAIN_TXN_OUT_PATH_INVALID_ERR, + MSG_ECOSYSTEM_CONFIG_INVALID_ERR, MSG_PREPARING_CONFIG_SPINNER, MSG_SELECTED_CONFIG, MSG_WRITING_OUTPUT_FILES_SPINNER, }, }; @@ -27,40 +27,43 @@ const SCRIPT_CONFIG_FILE_SRC: &str = "contracts/l1-contracts/script-config/register-hyperchain.toml"; const SCRIPT_CONFIG_FILE_DST: &str = "register-hyperchain.toml"; -pub(crate) async fn run(args: BuildTransactionsArgs, shell: &Shell) -> anyhow::Result<()> { - let config = ZkStackConfig::ecosystem(shell)?; - let chain_config = config - .load_current_chain() - .context(MSG_CHAIN_NOT_FOUND_ERR)?; +pub(crate) async fn run( + args: BuildTransactionsArgs, + shell: &Shell, + chain: ChainConfig, + ecosystem: Option, +) -> anyhow::Result<()> { + let ecosystem = ecosystem.context(MSG_ECOSYSTEM_CONFIG_INVALID_ERR)?; - let args = args.fill_values_with_prompt(config.default_chain.clone()); + let args = args.fill_values_with_prompt(ecosystem.default_chain.clone()); - git::submodule_update(shell, config.link_to_code.clone())?; + git::submodule_update(shell, ecosystem.link_to_code.clone())?; let spinner = Spinner::new(MSG_PREPARING_CONFIG_SPINNER); - copy_configs(shell, &config.link_to_code, &chain_config.configs)?; + copy_configs(shell, &ecosystem.link_to_code, &chain.configs)?; - logger::note(MSG_SELECTED_CONFIG, logger::object_to_string(&chain_config)); + logger::note(MSG_SELECTED_CONFIG, logger::object_to_string(&chain)); - let mut genesis_config = chain_config.get_genesis_config()?; - update_from_chain_config(&mut genesis_config, &chain_config)?; + let mut genesis_config = chain.get_genesis_config()?; + update_from_chain_config(&mut genesis_config, &chain)?; // Copy ecosystem contracts - let mut contracts_config = config + let mut contracts_config = ecosystem .get_contracts_config() .context(MSG_CHAIN_TXN_MISSING_CONTRACT_CONFIG)?; - contracts_config.l1.base_token_addr = chain_config.base_token.address; + contracts_config.l1.base_token_addr = chain.base_token.address; spinner.finish(); let spinner = Spinner::new(MSG_BUILDING_CHAIN_REGISTRATION_TXNS_SPINNER); - let governor: String = config.get_wallets()?.governor.address.encode_hex_upper(); + let wallets = ecosystem.get_wallets()?; + let governor: String = wallets.governor.address.encode_hex_upper(); register_chain( shell, args.forge_args.clone(), - &config, - &chain_config, + &chain, &mut contracts_config, + &wallets, args.l1_rpc_url.clone(), Some(governor), false, @@ -76,12 +79,12 @@ pub(crate) async fn run(args: BuildTransactionsArgs, shell: &Shell) -> anyhow::R .context(MSG_CHAIN_TXN_OUT_PATH_INVALID_ERR)?; shell.copy_file( - config.link_to_code.join(REGISTER_CHAIN_TXNS_FILE_SRC), + ecosystem.link_to_code.join(REGISTER_CHAIN_TXNS_FILE_SRC), args.out.join(REGISTER_CHAIN_TXNS_FILE_DST), )?; shell.copy_file( - config.link_to_code.join(SCRIPT_CONFIG_FILE_SRC), + ecosystem.link_to_code.join(SCRIPT_CONFIG_FILE_SRC), args.out.join(SCRIPT_CONFIG_FILE_DST), )?; spinner.finish(); diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/common.rs b/zkstack_cli/crates/zkstack/src/commands/chain/common.rs index 0c35b3ee4fe0..c14e140679c5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/common.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/common.rs @@ -1,5 +1,5 @@ use common::spinner::Spinner; -use config::{ChainConfig, EcosystemConfig}; +use config::{ChainConfig, WalletsConfig}; use types::{BaseToken, L1Network, WalletCreation}; use crate::{ @@ -9,66 +9,70 @@ use crate::{ // Distribute eth to the chain wallets for localhost environment pub async fn distribute_eth( - ecosystem_config: &EcosystemConfig, chain_config: &ChainConfig, l1_rpc_url: String, + wallets: &WalletsConfig, ) -> anyhow::Result<()> { - if chain_config.wallet_creation == WalletCreation::Localhost - && ecosystem_config.l1_network == L1Network::Localhost + if chain_config.wallet_creation != WalletCreation::Localhost + || chain_config.l1_network != L1Network::Localhost { - let spinner = Spinner::new(MSG_DISTRIBUTING_ETH_SPINNER); - let wallets = ecosystem_config.get_wallets()?; - let chain_wallets = chain_config.get_wallets_config()?; - let mut addresses = vec![ - chain_wallets.operator.address, - chain_wallets.blob_operator.address, - chain_wallets.governor.address, - ]; - if let Some(deployer) = chain_wallets.deployer { - addresses.push(deployer.address) - } - if let Some(setter) = chain_wallets.token_multiplier_setter { - addresses.push(setter.address) - } - common::ethereum::distribute_eth( - wallets.operator, - addresses, - l1_rpc_url, - ecosystem_config.l1_network.chain_id(), - AMOUNT_FOR_DISTRIBUTION_TO_WALLETS, - ) - .await?; - spinner.finish(); + return Ok(()); } + + let spinner = Spinner::new(MSG_DISTRIBUTING_ETH_SPINNER); + let chain_wallets = chain_config.get_wallets_config()?; + let mut addresses = vec![ + chain_wallets.operator.address, + chain_wallets.blob_operator.address, + chain_wallets.governor.address, + ]; + if let Some(deployer) = chain_wallets.deployer { + addresses.push(deployer.address); + } + if let Some(setter) = chain_wallets.token_multiplier_setter { + addresses.push(setter.address); + } + common::ethereum::distribute_eth( + wallets.operator.clone(), + addresses, + l1_rpc_url, + chain_config.l1_network.chain_id(), + AMOUNT_FOR_DISTRIBUTION_TO_WALLETS, + ) + .await?; + spinner.finish(); + Ok(()) } pub async fn mint_base_token( - ecosystem_config: &EcosystemConfig, chain_config: &ChainConfig, l1_rpc_url: String, + wallets: &WalletsConfig, ) -> anyhow::Result<()> { - if chain_config.wallet_creation == WalletCreation::Localhost - && ecosystem_config.l1_network == L1Network::Localhost - && chain_config.base_token != BaseToken::eth() + if chain_config.wallet_creation != WalletCreation::Localhost + || chain_config.l1_network != L1Network::Localhost + || chain_config.base_token == BaseToken::eth() { - let spinner = Spinner::new(MSG_MINT_BASE_TOKEN_SPINNER); - let wallets = ecosystem_config.get_wallets()?; - let chain_wallets = chain_config.get_wallets_config()?; - let base_token = &chain_config.base_token; - let addresses = vec![wallets.governor.address, chain_wallets.governor.address]; - let amount = AMOUNT_FOR_DISTRIBUTION_TO_WALLETS * base_token.nominator as u128 - / base_token.denominator as u128; - common::ethereum::mint_token( - wallets.governor, - base_token.address, - addresses, - l1_rpc_url, - ecosystem_config.l1_network.chain_id(), - amount, - ) - .await?; - spinner.finish(); + return Ok(()); } + + let spinner = Spinner::new(MSG_MINT_BASE_TOKEN_SPINNER); + let chain_wallets = chain_config.get_wallets_config()?; + let base_token = &chain_config.base_token; + let addresses = vec![wallets.governor.address, chain_wallets.governor.address]; + let amount = AMOUNT_FOR_DISTRIBUTION_TO_WALLETS * base_token.nominator as u128 + / base_token.denominator as u128; + common::ethereum::mint_token( + wallets.governor.clone(), + base_token.address, + addresses, + l1_rpc_url, + chain_config.l1_network.chain_id(), + amount, + ) + .await?; + spinner.finish(); + Ok(()) } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs index 1aaefacc8e3c..e483511b89ef 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs @@ -18,16 +18,13 @@ use config::{ script_params::DEPLOY_L2_CONTRACTS_SCRIPT_PARAMS, }, traits::{ReadConfig, SaveConfig, SaveConfigWithBasePath}, - zkstack_config::ZkStackConfig, - ChainConfig, ContractsConfig, EcosystemConfig, + ChainConfig, ContractsConfig, EcosystemConfig, WalletsConfig, }; use xshell::Shell; +use zksync_basic_types::L2ChainId; use crate::{ - messages::{ - MSG_CHAIN_NOT_INITIALIZED, MSG_DEPLOYING_L2_CONTRACT_SPINNER, - MSG_L1_SECRETS_MUST_BE_PRESENTED, - }, + messages::{MSG_DEPLOYING_L2_CONTRACT_SPINNER, MSG_L1_SECRETS_MUST_BE_PRESENTED}, utils::forge::{check_the_balance, fill_forge_private_key}, }; @@ -44,80 +41,40 @@ pub async fn run( args: ForgeScriptArgs, shell: &Shell, deploy_option: Deploy2ContractsOption, + chain: ChainConfig, + ecosystem: EcosystemConfig, ) -> anyhow::Result<()> { - let ecosystem_config = ZkStackConfig::ecosystem(shell)?; - let chain_config = ecosystem_config - .load_current_chain() - .context(MSG_CHAIN_NOT_INITIALIZED)?; - - let mut contracts = chain_config.get_contracts_config()?; + let mut contracts = chain.get_contracts_config()?; + let era_chain_id = ecosystem.era_chain_id; + let wallets = ecosystem.get_wallets()?; let spinner = Spinner::new(MSG_DEPLOYING_L2_CONTRACT_SPINNER); match deploy_option { Deploy2ContractsOption::All => { - deploy_l2_contracts( - shell, - &chain_config, - &ecosystem_config, - &mut contracts, - args, - ) - .await?; + deploy_l2_contracts(shell, &chain, era_chain_id, &wallets, &mut contracts, args) + .await?; } Deploy2ContractsOption::Upgrader => { - deploy_upgrader( - shell, - &chain_config, - &ecosystem_config, - &mut contracts, - args, - ) - .await?; + deploy_upgrader(shell, &chain, era_chain_id, &wallets, &mut contracts, args).await?; } Deploy2ContractsOption::ConsensusRegistry => { - deploy_consensus_registry( - shell, - &chain_config, - &ecosystem_config, - &mut contracts, - args, - ) - .await?; + deploy_consensus_registry(shell, &chain, era_chain_id, &wallets, &mut contracts, args) + .await?; } Deploy2ContractsOption::Multicall3 => { - deploy_multicall3( - shell, - &chain_config, - &ecosystem_config, - &mut contracts, - args, - ) - .await?; + deploy_multicall3(shell, &chain, era_chain_id, &wallets, &mut contracts, args).await?; } Deploy2ContractsOption::TimestampAsserter => { - deploy_timestamp_asserter( - shell, - &chain_config, - &ecosystem_config, - &mut contracts, - args, - ) - .await?; + deploy_timestamp_asserter(shell, &chain, era_chain_id, &wallets, &mut contracts, args) + .await?; } Deploy2ContractsOption::InitiailizeBridges => { - initialize_bridges( - shell, - &chain_config, - &ecosystem_config, - &mut contracts, - args, - ) - .await? + initialize_bridges(shell, &chain, era_chain_id, &wallets, &mut contracts, args).await? } } - contracts.save_with_base_path(shell, &chain_config.configs)?; + contracts.save_with_base_path(shell, &chain.configs)?; spinner.finish(); Ok(()) @@ -128,13 +85,22 @@ pub async fn run( async fn build_and_deploy( shell: &Shell, chain_config: &ChainConfig, - ecosystem_config: &EcosystemConfig, + era_chain_id: L2ChainId, + wallets: &WalletsConfig, forge_args: ForgeScriptArgs, signature: Option<&str>, mut update_config: impl FnMut(&Shell, &Path) -> anyhow::Result<()>, ) -> anyhow::Result<()> { - build_l2_contracts(shell.clone(), ecosystem_config.link_to_code.clone())?; - call_forge(shell, chain_config, ecosystem_config, forge_args, signature).await?; + build_l2_contracts(shell.clone(), chain_config.link_to_code.clone())?; + call_forge( + shell, + chain_config, + era_chain_id, + wallets, + forge_args, + signature, + ) + .await?; update_config( shell, &DEPLOY_L2_CONTRACTS_SCRIPT_PARAMS.output(&chain_config.link_to_code), @@ -145,7 +111,8 @@ async fn build_and_deploy( pub async fn initialize_bridges( shell: &Shell, chain_config: &ChainConfig, - ecosystem_config: &EcosystemConfig, + era_chain_id: L2ChainId, + wallets: &WalletsConfig, contracts_config: &mut ContractsConfig, forge_args: ForgeScriptArgs, ) -> anyhow::Result<()> { @@ -157,7 +124,8 @@ pub async fn initialize_bridges( build_and_deploy( shell, chain_config, - ecosystem_config, + era_chain_id, + wallets, forge_args, signature, |shell, out| { @@ -170,14 +138,16 @@ pub async fn initialize_bridges( pub async fn deploy_upgrader( shell: &Shell, chain_config: &ChainConfig, - ecosystem_config: &EcosystemConfig, + era_chain_id: L2ChainId, + wallets: &WalletsConfig, contracts_config: &mut ContractsConfig, forge_args: ForgeScriptArgs, ) -> anyhow::Result<()> { build_and_deploy( shell, chain_config, - ecosystem_config, + era_chain_id, + wallets, forge_args, Some("runDefaultUpgrader"), |shell, out| { @@ -190,14 +160,16 @@ pub async fn deploy_upgrader( pub async fn deploy_consensus_registry( shell: &Shell, chain_config: &ChainConfig, - ecosystem_config: &EcosystemConfig, + era_chain_id: L2ChainId, + wallets: &WalletsConfig, contracts_config: &mut ContractsConfig, forge_args: ForgeScriptArgs, ) -> anyhow::Result<()> { build_and_deploy( shell, chain_config, - ecosystem_config, + era_chain_id, + wallets, forge_args, Some("runDeployConsensusRegistry"), |shell, out| { @@ -210,14 +182,16 @@ pub async fn deploy_consensus_registry( pub async fn deploy_multicall3( shell: &Shell, chain_config: &ChainConfig, - ecosystem_config: &EcosystemConfig, + era_chain_id: L2ChainId, + wallets: &WalletsConfig, contracts_config: &mut ContractsConfig, forge_args: ForgeScriptArgs, ) -> anyhow::Result<()> { build_and_deploy( shell, chain_config, - ecosystem_config, + era_chain_id, + wallets, forge_args, Some("runDeployMulticall3"), |shell, out| contracts_config.set_multicall3(&Multicall3Output::read(shell, out)?), @@ -228,14 +202,16 @@ pub async fn deploy_multicall3( pub async fn deploy_timestamp_asserter( shell: &Shell, chain_config: &ChainConfig, - ecosystem_config: &EcosystemConfig, + era_chain_id: L2ChainId, + wallets: &WalletsConfig, contracts_config: &mut ContractsConfig, forge_args: ForgeScriptArgs, ) -> anyhow::Result<()> { build_and_deploy( shell, chain_config, - ecosystem_config, + era_chain_id, + wallets, forge_args, Some("runDeployTimestampAsserter"), |shell, out| { @@ -249,7 +225,8 @@ pub async fn deploy_timestamp_asserter( pub async fn deploy_l2_contracts( shell: &Shell, chain_config: &ChainConfig, - ecosystem_config: &EcosystemConfig, + era_chain_id: L2ChainId, + wallets: &WalletsConfig, contracts_config: &mut ContractsConfig, forge_args: ForgeScriptArgs, ) -> anyhow::Result<()> { @@ -261,7 +238,8 @@ pub async fn deploy_l2_contracts( build_and_deploy( shell, chain_config, - ecosystem_config, + era_chain_id, + wallets, forge_args, signature, |shell, out| { @@ -280,11 +258,12 @@ pub async fn deploy_l2_contracts( async fn call_forge( shell: &Shell, chain_config: &ChainConfig, - ecosystem_config: &EcosystemConfig, + era_chain_id: L2ChainId, + wallets: &WalletsConfig, forge_args: ForgeScriptArgs, signature: Option<&str>, ) -> anyhow::Result<()> { - let input = DeployL2ContractsInput::new(chain_config, ecosystem_config.era_chain_id)?; + let input = DeployL2ContractsInput::new(chain_config, era_chain_id)?; let foundry_contracts_path = chain_config.path_to_foundry(); let secrets = chain_config.get_secrets_config()?; input.save( @@ -312,7 +291,7 @@ async fn call_forge( forge = forge.with_signature(signature); } - forge = fill_forge_private_key(forge, Some(&ecosystem_config.get_wallets()?.governor))?; + forge = fill_forge_private_key(forge, Some(&wallets.governor))?; check_the_balance(&forge).await?; forge.run(shell)?; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs b/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs index 83873ecffc0c..baa05fdd86fd 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs @@ -1,8 +1,9 @@ use anyhow::Context; use common::logger; use config::{ - copy_configs, set_l1_rpc_url, traits::SaveConfigWithBasePath, update_from_chain_config, - zkstack_config::ZkStackConfig, ChainConfig, ContractsConfig, EcosystemConfig, + copy_configs, set_l1_rpc_url, + traits::{ReadConfig, SaveConfigWithBasePath}, + update_from_chain_config, ChainConfig, ContractsConfig, EcosystemConfig, }; use ethers::types::Address; use xshell::Shell; @@ -16,7 +17,7 @@ use crate::{ portal::update_portal_config, }, messages::{ - MSG_CHAIN_CONFIGS_INITIALIZED, MSG_CHAIN_NOT_FOUND_ERR, MSG_CONSENSUS_CONFIG_MISSING_ERR, + MSG_CHAIN_CONFIGS_INITIALIZED, MSG_CONSENSUS_CONFIG_MISSING_ERR, MSG_PORTAL_FAILED_TO_CREATE_CONFIG_ERR, }, utils::{ @@ -25,14 +26,15 @@ use crate::{ }, }; -pub async fn run(args: InitConfigsArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = ZkStackConfig::ecosystem(shell)?; - let chain_config = ecosystem_config - .load_current_chain() - .context(MSG_CHAIN_NOT_FOUND_ERR)?; - let args = args.fill_values_with_prompt(&chain_config); +pub async fn run( + args: InitConfigsArgs, + shell: &Shell, + chain: ChainConfig, + ecosystem: Option, +) -> anyhow::Result<()> { + let args = args.fill_values_with_prompt(ecosystem, &chain)?; - init_configs(&args, shell, &ecosystem_config, &chain_config).await?; + init_configs(&args, shell, &chain).await?; logger::outro(MSG_CHAIN_CONFIGS_INITIALIZED); Ok(()) @@ -41,15 +43,14 @@ pub async fn run(args: InitConfigsArgs, shell: &Shell) -> anyhow::Result<()> { pub async fn init_configs( init_args: &InitConfigsArgsFinal, shell: &Shell, - ecosystem_config: &EcosystemConfig, chain_config: &ChainConfig, ) -> anyhow::Result { // Port scanner should run before copying configs to avoid marking initial ports as assigned - let mut ecosystem_ports = EcosystemPortsScanner::scan(shell)?; - copy_configs(shell, &ecosystem_config.link_to_code, &chain_config.configs)?; + let ecosystem_ports = EcosystemPortsScanner::scan(shell); + copy_configs(shell, &chain_config.link_to_code, &chain_config.configs)?; if !init_args.no_port_reallocation { - ecosystem_ports.allocate_ports_in_yaml( + ecosystem_ports?.allocate_ports_in_yaml( shell, &chain_config.path_to_general_config(), chain_config.id, @@ -85,7 +86,7 @@ pub async fn init_configs( genesis_config.save_with_base_path(shell, &chain_config.configs)?; // Initialize contracts config - let mut contracts_config = ecosystem_config.get_contracts_config()?; + let mut contracts_config = ContractsConfig::read(shell, &init_args.ecosystem_contracts_path)?; contracts_config.l1.diamond_proxy_addr = Address::zero(); contracts_config.l1.governance_addr = Address::zero(); contracts_config.l1.chain_admin_addr = Address::zero(); 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 5759e7783f14..51f2d5c615b0 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs @@ -2,7 +2,9 @@ use anyhow::Context; use clap::{command, Parser, Subcommand}; use common::{git, logger, spinner::Spinner}; use config::{ - traits::SaveConfigWithBasePath, zkstack_config::ZkStackConfig, ChainConfig, EcosystemConfig, + get_default_era_chain_id, + traits::{ReadConfig, SaveConfigWithBasePath}, + ChainConfig, EcosystemConfig, WalletsConfig, }; use types::BaseToken; use xshell::Shell; @@ -24,9 +26,9 @@ use crate::{ }, messages::{ msg_initializing_chain, MSG_ACCEPTING_ADMIN_SPINNER, MSG_CHAIN_INITIALIZED, - MSG_CHAIN_NOT_FOUND_ERR, MSG_DEPLOYING_PAYMASTER, MSG_GENESIS_DATABASE_ERR, - MSG_REGISTERING_CHAIN_SPINNER, MSG_SELECTED_CONFIG, - MSG_UPDATING_TOKEN_MULTIPLIER_SETTER_SPINNER, MSG_WALLET_TOKEN_MULTIPLIER_SETTER_NOT_FOUND, + MSG_DEPLOYING_PAYMASTER, MSG_GENESIS_DATABASE_ERR, MSG_REGISTERING_CHAIN_SPINNER, + MSG_SELECTED_CONFIG, MSG_UPDATING_TOKEN_MULTIPLIER_SETTER_SPINNER, + MSG_WALLETS_CONFIG_MUST_BE_PRESENT, MSG_WALLET_TOKEN_MULTIPLIER_SETTER_NOT_FOUND, }, }; @@ -48,25 +50,33 @@ pub struct ChainInitCommand { args: InitArgs, } -pub(crate) async fn run(args: ChainInitCommand, shell: &Shell) -> anyhow::Result<()> { +pub(crate) async fn run( + args: ChainInitCommand, + shell: &Shell, + chain: ChainConfig, + ecosystem: Option, +) -> anyhow::Result<()> { match args.command { - Some(ChainInitSubcommands::Configs(args)) => configs::run(args, shell).await, - None => run_init(args.args, shell).await, + Some(ChainInitSubcommands::Configs(args)) => { + configs::run(args, shell, chain, ecosystem).await + } + None => run_init(args.args, shell, chain, ecosystem).await, } } -async fn run_init(args: InitArgs, shell: &Shell) -> anyhow::Result<()> { - let config = ZkStackConfig::ecosystem(shell)?; - let chain_config = config - .load_current_chain() - .context(MSG_CHAIN_NOT_FOUND_ERR)?; - let args = args.fill_values_with_prompt(&chain_config); +async fn run_init( + args: InitArgs, + shell: &Shell, + chain: ChainConfig, + ecosystem: Option, +) -> anyhow::Result<()> { + let args = args.fill_values_with_prompt(ecosystem.clone(), &chain)?; - logger::note(MSG_SELECTED_CONFIG, logger::object_to_string(&chain_config)); + logger::note(MSG_SELECTED_CONFIG, logger::object_to_string(&chain)); logger::info(msg_initializing_chain("")); - git::submodule_update(shell, config.link_to_code.clone())?; + git::submodule_update(shell, chain.link_to_code.clone())?; - init(&args, shell, &config, &chain_config).await?; + init(&args, shell, ecosystem, &chain).await?; logger::success(MSG_CHAIN_INITIALIZED); Ok(()) @@ -75,26 +85,29 @@ async fn run_init(args: InitArgs, shell: &Shell) -> anyhow::Result<()> { pub async fn init( init_args: &InitArgsFinal, shell: &Shell, - ecosystem_config: &EcosystemConfig, + ecosystem: Option, chain_config: &ChainConfig, ) -> anyhow::Result<()> { // Initialize configs - let init_configs_args = InitConfigsArgsFinal::from_chain_init_args(init_args); - let mut contracts_config = - init_configs(&init_configs_args, shell, ecosystem_config, chain_config).await?; + let mut init_configs_args = InitConfigsArgsFinal::from_chain_init_args(init_args); + if ecosystem.is_none() { + init_configs_args.no_port_reallocation = true; + } + let mut contracts_config = init_configs(&init_configs_args, shell, chain_config).await?; + let wallets = WalletsConfig::read(shell, init_args.wallets_path.clone())?; // Fund some wallet addresses with ETH or base token (only for Localhost) - distribute_eth(ecosystem_config, chain_config, init_args.l1_rpc_url.clone()).await?; - mint_base_token(ecosystem_config, chain_config, init_args.l1_rpc_url.clone()).await?; + distribute_eth(chain_config, init_args.l1_rpc_url.clone(), &wallets).await?; + mint_base_token(chain_config, init_args.l1_rpc_url.clone(), &wallets).await?; // Register chain on BridgeHub (run by L1 Governor) let spinner = Spinner::new(MSG_REGISTERING_CHAIN_SPINNER); register_chain( shell, init_args.forge_args.clone(), - ecosystem_config, chain_config, &mut contracts_config, + &wallets, init_args.l1_rpc_url.clone(), None, true, @@ -107,7 +120,7 @@ pub async fn init( let spinner = Spinner::new(MSG_ACCEPTING_ADMIN_SPINNER); accept_admin( shell, - ecosystem_config, + &chain_config.path_to_foundry(), contracts_config.l1.chain_admin_addr, &chain_config.get_wallets_config()?.governor, contracts_config.l1.diamond_proxy_addr, @@ -122,12 +135,12 @@ pub async fn init( let spinner = Spinner::new(MSG_UPDATING_TOKEN_MULTIPLIER_SETTER_SPINNER); set_token_multiplier_setter( shell, - ecosystem_config, + &chain_config.path_to_foundry(), &chain_config.get_wallets_config()?.governor, contracts_config.l1.chain_admin_addr, chain_config .get_wallets_config() - .unwrap() + .context(MSG_WALLETS_CONFIG_MUST_BE_PRESENT)? .token_multiplier_setter .context(MSG_WALLET_TOKEN_MULTIPLIER_SETTER_NOT_FOUND)? .address, @@ -139,10 +152,15 @@ pub async fn init( } // Deploy L2 contracts: L2SharedBridge, L2DefaultUpgrader, ... (run by L1 Governor) + let era_chain_id = ecosystem + .as_ref() + .map(|ecosystem| ecosystem.era_chain_id) + .unwrap_or(get_default_era_chain_id()); deploy_l2_contracts::deploy_l2_contracts( shell, chain_config, - ecosystem_config, + era_chain_id, + &wallets, &mut contracts_config, init_args.forge_args.clone(), ) @@ -154,7 +172,7 @@ pub async fn init( setup_legacy_bridge( shell, chain_config, - ecosystem_config, + &wallets, &contracts_config, init_args.forge_args.clone(), ) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs index 5d0c39851baf..0260cc630713 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs @@ -14,7 +14,7 @@ use crate::{ args::create::ChainCreateArgs, deploy_l2_contracts::Deploy2ContractsOption, genesis::GenesisCommand, init::ChainInitCommand, }, - messages::MSG_CHAIN_NOT_FOUND_ERR, + messages::{MSG_CHAIN_NOT_FOUND_ERR, MSG_ECOSYSTEM_CONFIG_INVALID_ERR}, }; mod accept_chain_ownership; @@ -91,38 +91,85 @@ pub(crate) async fn run(shell: &Shell, cmd: ChainCommands) -> anyhow::Result<()> } let chain = ZkStackConfig::current_chain(shell).context(MSG_CHAIN_NOT_FOUND_ERR)?; + let ecosystem = ZkStackConfig::ecosystem(shell).ok(); match cmd { - ChainCommands::Create(args) => create::run(args, shell), - ChainCommands::Init(args) => init::run(*args, shell).await, - ChainCommands::BuildTransactions(args) => build_transactions::run(args, shell).await, + ChainCommands::Init(args) => init::run(*args, shell, chain, ecosystem).await, + ChainCommands::BuildTransactions(args) => { + build_transactions::run(args, shell, chain, ecosystem).await + } ChainCommands::Genesis(args) => genesis::run(args, shell, chain).await, ChainCommands::RegisterChain(args) => register_chain::run(args, shell).await, ChainCommands::DeployL2Contracts(args) => { - deploy_l2_contracts::run(args, shell, Deploy2ContractsOption::All).await + deploy_l2_contracts::run( + args, + shell, + Deploy2ContractsOption::All, + chain, + ecosystem.context(MSG_ECOSYSTEM_CONFIG_INVALID_ERR)?, + ) + .await + } + ChainCommands::AcceptChainOwnership(args) => { + accept_chain_ownership::run(args, shell, chain).await } - ChainCommands::AcceptChainOwnership(args) => accept_chain_ownership::run(args, shell).await, ChainCommands::DeployConsensusRegistry(args) => { - deploy_l2_contracts::run(args, shell, Deploy2ContractsOption::ConsensusRegistry).await + deploy_l2_contracts::run( + args, + shell, + Deploy2ContractsOption::ConsensusRegistry, + chain, + ecosystem.context(MSG_ECOSYSTEM_CONFIG_INVALID_ERR)?, + ) + .await } ChainCommands::DeployMulticall3(args) => { - deploy_l2_contracts::run(args, shell, Deploy2ContractsOption::Multicall3).await + deploy_l2_contracts::run( + args, + shell, + Deploy2ContractsOption::Multicall3, + chain, + ecosystem.context(MSG_ECOSYSTEM_CONFIG_INVALID_ERR)?, + ) + .await } ChainCommands::DeployTimestampAsserter(args) => { - deploy_l2_contracts::run(args, shell, Deploy2ContractsOption::TimestampAsserter).await + deploy_l2_contracts::run( + args, + shell, + Deploy2ContractsOption::TimestampAsserter, + chain, + ecosystem.context(MSG_ECOSYSTEM_CONFIG_INVALID_ERR)?, + ) + .await } ChainCommands::DeployUpgrader(args) => { - deploy_l2_contracts::run(args, shell, Deploy2ContractsOption::Upgrader).await + deploy_l2_contracts::run( + args, + shell, + Deploy2ContractsOption::Upgrader, + chain, + ecosystem.context(MSG_ECOSYSTEM_CONFIG_INVALID_ERR)?, + ) + .await } ChainCommands::InitializeBridges(args) => { - deploy_l2_contracts::run(args, shell, Deploy2ContractsOption::InitiailizeBridges).await + deploy_l2_contracts::run( + args, + shell, + Deploy2ContractsOption::InitiailizeBridges, + chain, + ecosystem.context(MSG_ECOSYSTEM_CONFIG_INVALID_ERR)?, + ) + .await } ChainCommands::DeployPaymaster(args) => deploy_paymaster::run(args, shell, chain).await, ChainCommands::UpdateTokenMultiplierSetter(args) => { - set_token_multiplier_setter::run(args, shell).await + set_token_multiplier_setter::run(args, shell, chain).await } ChainCommands::Server(args) => server::run(shell, args, chain).await, ChainCommands::ContractVerifier(args) => contract_verifier::run(shell, args, chain).await, ChainCommands::Consensus(cmd) => cmd.run(shell).await, + ChainCommands::Create(_) => unreachable!("Chain create is handled before loading chain"), } } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs b/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs index 08a38fdf9018..a94cd59d2b36 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs @@ -11,7 +11,7 @@ use config::{ }, traits::{ReadConfig, SaveConfig, SaveConfigWithBasePath}, zkstack_config::ZkStackConfig, - ChainConfig, ContractsConfig, EcosystemConfig, + ChainConfig, ContractsConfig, WalletsConfig, }; use xshell::Shell; @@ -29,6 +29,7 @@ pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { .load_current_chain() .context(MSG_CHAIN_NOT_INITIALIZED)?; let mut contracts = chain_config.get_contracts_config()?; + let wallets = ecosystem_config.get_wallets()?; let secrets = chain_config.get_secrets_config()?; let l1_rpc_url = secrets .l1 @@ -40,9 +41,9 @@ pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { register_chain( shell, args, - &ecosystem_config, &chain_config, &mut contracts, + &wallets, l1_rpc_url, None, true, @@ -58,19 +59,19 @@ pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { pub async fn register_chain( shell: &Shell, forge_args: ForgeScriptArgs, - config: &EcosystemConfig, chain_config: &ChainConfig, contracts: &mut ContractsConfig, + wallets: &WalletsConfig, l1_rpc_url: String, sender: Option, broadcast: bool, ) -> anyhow::Result<()> { - let deploy_config_path = REGISTER_CHAIN_SCRIPT_PARAMS.input(&config.link_to_code); + let deploy_config_path = REGISTER_CHAIN_SCRIPT_PARAMS.input(&chain_config.link_to_code); let deploy_config = RegisterChainL1Config::new(chain_config, contracts)?; deploy_config.save(shell, deploy_config_path)?; - let mut forge = Forge::new(&config.path_to_foundry()) + let mut forge = Forge::new(&chain_config.path_to_foundry()) .script(®ISTER_CHAIN_SCRIPT_PARAMS.script(), forge_args.clone()) .with_ffi() .with_rpc_url(l1_rpc_url); @@ -82,7 +83,7 @@ pub async fn register_chain( if let Some(address) = sender { forge = forge.with_sender(address); } else { - forge = fill_forge_private_key(forge, Some(&config.get_wallets()?.governor))?; + forge = fill_forge_private_key(forge, Some(&wallets.governor))?; check_the_balance(&forge).await?; } diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs b/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs index 36ddc4b6f07a..aa52d3e86be1 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs @@ -1,3 +1,5 @@ +use std::path::Path; + use anyhow::Context; use common::{ forge::{Forge, ForgeScript, ForgeScriptArgs}, @@ -5,10 +7,7 @@ use common::{ spinner::Spinner, wallets::Wallet, }; -use config::{ - forge_interface::script_params::ACCEPT_GOVERNANCE_SCRIPT_PARAMS, zkstack_config::ZkStackConfig, - EcosystemConfig, -}; +use config::{forge_interface::script_params::ACCEPT_GOVERNANCE_SCRIPT_PARAMS, ChainConfig}; use ethers::{abi::parse_abi, contract::BaseContract, utils::hex}; use lazy_static::lazy_static; use xshell::Shell; @@ -16,9 +15,9 @@ use zksync_basic_types::Address; use crate::{ messages::{ - MSG_CHAIN_NOT_INITIALIZED, MSG_L1_SECRETS_MUST_BE_PRESENTED, - MSG_TOKEN_MULTIPLIER_SETTER_UPDATED_TO, MSG_UPDATING_TOKEN_MULTIPLIER_SETTER_SPINNER, - MSG_WALLETS_CONFIG_MUST_BE_PRESENT, MSG_WALLET_TOKEN_MULTIPLIER_SETTER_NOT_FOUND, + MSG_L1_SECRETS_MUST_BE_PRESENTED, MSG_TOKEN_MULTIPLIER_SETTER_UPDATED_TO, + MSG_UPDATING_TOKEN_MULTIPLIER_SETTER_SPINNER, MSG_WALLETS_CONFIG_MUST_BE_PRESENT, + MSG_WALLET_TOKEN_MULTIPLIER_SETTER_NOT_FOUND, }, utils::forge::{check_the_balance, fill_forge_private_key}, }; @@ -32,20 +31,16 @@ lazy_static! { ); } -pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { - let ecosystem_config = ZkStackConfig::ecosystem(shell)?; - let chain_config = ecosystem_config - .load_current_chain() - .context(MSG_CHAIN_NOT_INITIALIZED)?; - let contracts_config = chain_config.get_contracts_config()?; - let l1_url = chain_config +pub async fn run(args: ForgeScriptArgs, shell: &Shell, chain: ChainConfig) -> anyhow::Result<()> { + let contracts_config = chain.get_contracts_config()?; + let l1_url = chain .get_secrets_config()? .l1 .context(MSG_L1_SECRETS_MUST_BE_PRESENTED)? .l1_rpc_url .expose_str() .to_string(); - let token_multiplier_setter_address = chain_config + let token_multiplier_setter_address = chain .get_wallets_config() .context(MSG_WALLETS_CONFIG_MUST_BE_PRESENT)? .token_multiplier_setter @@ -55,8 +50,8 @@ pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { let spinner = Spinner::new(MSG_UPDATING_TOKEN_MULTIPLIER_SETTER_SPINNER); set_token_multiplier_setter( shell, - &ecosystem_config, - &chain_config.get_wallets_config()?.governor, + &chain.path_to_foundry(), + &chain.get_wallets_config()?.governor, contracts_config.l1.chain_admin_addr, token_multiplier_setter_address, &args.clone(), @@ -75,7 +70,7 @@ pub async fn run(args: ForgeScriptArgs, shell: &Shell) -> anyhow::Result<()> { pub async fn set_token_multiplier_setter( shell: &Shell, - ecosystem_config: &EcosystemConfig, + foundry_contracts_path: &Path, governor: &Wallet, chain_admin_address: Address, target_address: Address, @@ -94,8 +89,7 @@ pub async fn set_token_multiplier_setter( (chain_admin_address, target_address), ) .unwrap(); - let foundry_contracts_path = ecosystem_config.path_to_foundry(); - let forge = Forge::new(&foundry_contracts_path) + let forge = Forge::new(foundry_contracts_path) .script( &ACCEPT_GOVERNANCE_SCRIPT_PARAMS.script(), forge_args.clone(), diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/setup_legacy_bridge.rs b/zkstack_cli/crates/zkstack/src/commands/chain/setup_legacy_bridge.rs index f61c640ffb6b..2aa341693784 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/setup_legacy_bridge.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/setup_legacy_bridge.rs @@ -8,7 +8,7 @@ use config::{ script_params::SETUP_LEGACY_BRIDGE, setup_legacy_bridge::SetupLegacyBridgeInput, }, traits::SaveConfig, - ChainConfig, ContractsConfig, EcosystemConfig, + ChainConfig, ContractsConfig, WalletsConfig, }; use xshell::Shell; @@ -20,7 +20,7 @@ use crate::{ pub async fn setup_legacy_bridge( shell: &Shell, chain_config: &ChainConfig, - ecosystem_config: &EcosystemConfig, + wallets: &WalletsConfig, contracts_config: &ContractsConfig, forge_args: ForgeScriptArgs, ) -> anyhow::Result<()> { @@ -59,7 +59,7 @@ pub async fn setup_legacy_bridge( ) .with_broadcast(); - forge = fill_forge_private_key(forge, Some(&ecosystem_config.get_wallets()?.governor))?; + forge = fill_forge_private_key(forge, Some(&wallets.governor))?; let spinner = Spinner::new(MSG_DEPLOYING_PAYMASTER); check_the_balance(&forge).await?; diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs index 3c7e729e29b7..c0da87b139af 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs @@ -186,33 +186,11 @@ async fn deploy_ecosystem( let ecosystem_contracts_path = match &ecosystem.ecosystem_contracts_path { Some(path) => Some(path.clone()), - None => { - let input_path: String = Prompt::new(MSG_ECOSYSTEM_CONTRACTS_PATH_PROMPT) - .allow_empty() - .validate_with(|val: &String| { - if val.is_empty() { - return Ok(()); - } - PathBuf::from_str(val) - .map(|_| ()) - .map_err(|_| MSG_ECOSYSTEM_CONTRACTS_PATH_INVALID_ERR.to_string()) - }) - .ask(); - if input_path.is_empty() { - None - } else { - Some(input_path.into()) - } - } + None => prompt_ecosystem_contracts_path(), }; let ecosystem_preexisting_configs_path = - ecosystem_config - .get_preexisting_configs_path() - .join(format!( - "{}.yaml", - ecosystem_config.l1_network.to_string().to_lowercase() - )); + ecosystem_config.get_preexisting_ecosystem_contracts_path(); // currently there are not some preexisting ecosystem contracts in // chains, so we need check if this file exists. @@ -235,6 +213,25 @@ async fn deploy_ecosystem( ContractsConfig::read(shell, ecosystem_contracts_path) } +pub fn prompt_ecosystem_contracts_path() -> Option { + let input_path: String = Prompt::new(MSG_ECOSYSTEM_CONTRACTS_PATH_PROMPT) + .allow_empty() + .validate_with(|val: &String| { + if val.is_empty() { + return Ok(()); + } + PathBuf::from_str(val) + .map(|_| ()) + .map_err(|_| MSG_ECOSYSTEM_CONTRACTS_PATH_INVALID_ERR.to_string()) + }) + .ask(); + if input_path.is_empty() { + None + } else { + Some(input_path.into()) + } +} + async fn deploy_ecosystem_inner( shell: &Shell, forge_args: ForgeScriptArgs, @@ -268,7 +265,7 @@ async fn deploy_ecosystem_inner( accept_admin( shell, - config, + &config.path_to_foundry(), contracts_config.l1.chain_admin_addr, &config.get_wallets()?.governor, contracts_config.ecosystem_contracts.bridgehub_proxy_addr, @@ -290,7 +287,7 @@ async fn deploy_ecosystem_inner( accept_admin( shell, - config, + &config.path_to_foundry(), contracts_config.l1.chain_admin_addr, &config.get_wallets()?.governor, contracts_config.bridges.shared.l1_address, @@ -314,7 +311,7 @@ async fn deploy_ecosystem_inner( accept_admin( shell, - config, + &config.path_to_foundry(), contracts_config.l1.chain_admin_addr, &config.get_wallets()?.governor, contracts_config @@ -351,6 +348,13 @@ async fn init_chains( if list_of_chains.len() > 1 { genesis_args.reset_db_names(); } + let ecosystem_contracts_path = + Some(ecosystem_config.get_contracts_path().display().to_string()); + let wallets_path = Some(ecosystem_config.get_wallets_path().display().to_string()); + logger::debug(format!( + "Ecosystem contracts path: {:?}", + ecosystem_contracts_path + )); // Initialize chains for chain_name in &list_of_chains { logger::info(msg_initializing_chain(chain_name)); @@ -367,13 +371,16 @@ async fn init_chains( l1_rpc_url: Some(final_init_args.ecosystem.l1_rpc_url.clone()), no_port_reallocation: final_init_args.no_port_reallocation, dev: final_init_args.dev, + ecosystem_contracts_path: ecosystem_contracts_path.clone(), + wallets_path: wallets_path.clone(), }; - let final_chain_init_args = chain_init_args.fill_values_with_prompt(&chain_config); + let final_chain_init_args = chain_init_args + .fill_values_with_prompt(Some(ecosystem_config.clone()), &chain_config)?; chain::init::init( &final_chain_init_args, shell, - ecosystem_config, + Some(ecosystem_config.clone()), &chain_config, ) .await?; diff --git a/zkstack_cli/crates/zkstack/src/messages.rs b/zkstack_cli/crates/zkstack/src/messages.rs index bedcb233b19f..efde52169044 100644 --- a/zkstack_cli/crates/zkstack/src/messages.rs +++ b/zkstack_cli/crates/zkstack/src/messages.rs @@ -61,6 +61,8 @@ pub(super) fn msg_path_to_zksync_does_not_exist_err(path: &str) -> String { } /// Ecosystem and chain init related messages +pub(super) const MSG_ECOSYSTEM_CONTRACTS_PATH_HELP: &str = "Ecosystem contracts path"; +pub(super) const MSG_WALLETS_PATH_HELP: &str = "Wallets path"; pub(super) const MSG_L1_RPC_URL_HELP: &str = "L1 RPC URL"; pub(super) const MSG_NO_PORT_REALLOCATION_HELP: &str = "Do not reallocate ports"; pub(super) const MSG_GENESIS_ARGS_HELP: &str = "Genesis options"; @@ -102,6 +104,8 @@ pub(super) const MSG_RECREATE_ROCKS_DB_ERRROR: &str = "Failed to create rocks db pub(super) const MSG_ERA_OBSERVABILITY_ALREADY_SETUP: &str = "Era observability already setup"; pub(super) const MSG_DOWNLOADING_ERA_OBSERVABILITY_SPINNER: &str = "Downloading era observability..."; +pub(super) const MSG_WALLETS_PATH_PROMPT: &str = + "Provide the path to L1 wallets config. It should contain governance and operator wallets."; pub(super) fn msg_ecosystem_no_found_preexisting_contract(chains: &str) -> String { format!("Not found preexisting ecosystem Contracts with chains {chains}")