-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(zkstack): Preload chain and ecosystem config before each chain subcommand #3322
refactor(zkstack): Preload chain and ecosystem config before each chain subcommand #3322
Conversation
@@ -95,15 +95,19 @@ 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, | |||
ChainCommands::Init(args) => init::run(*args, shell, chain, ecosystem).await, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work with create function?
based on what i see it should fail for create or you have to unwrap chain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does because of this:
https://github.com/matter-labs/zksync-era/blob/matias/pre-load-ecosystem-and-chain/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs#L89
I could remove create from the match clause to make it more clear that it will execute before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment there and also add unreachable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ksync-era into matias/pre-load-ecosystem-and-chain
…ksync-era into matias/pre-load-ecosystem-and-chain
What ❔
Preload chain and ecosystem config before each chain subcommand