Skip to content
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

Feat: localnet subcommand #2

Merged
merged 5 commits into from
May 17, 2023
Merged

Feat: localnet subcommand #2

merged 5 commits into from
May 17, 2023

Conversation

jpcenteno
Copy link

@jpcenteno jpcenteno commented May 3, 2023

closes #1 #2

@jpcenteno
Copy link
Author


        _      ____                             _                          _                  _   
  ____ | | __ / ___|   _   _   _ __     ___    | |   ___     ___    __ _  | |  _ __     ___  | |_ 
 |_  / | |/ / \___ \  | | | | | '_ \   / __|   | |  / _ \   / __|  / _` | | | | '_ \   / _ \ | __|
  / /  |   <   ___) | | |_| | | | | | | (__    | | | (_) | | (__  | (_| | | | | | | | |  __/ | |_ 
 /___| |_|\_\ |____/   \__, | |_| |_|  \___|   |_|  \___/   \___|  \__,_| |_| |_| |_|  \___|  \__|
                       |___/                                                                      
USAGE: zksync-cli localnet <operation>

Manage local L1 and L2 chains

Available operations
  start   -- Start L1 and L2 localnets
  down    -- Stop L1 and L2 localnets
  clear   -- Reset the localnet state
  logs    -- Display logs
  help    -- Display this message and quit
  wallets -- Display seeded wallet keys

Copy link

@ilitteri ilitteri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/localnet.ts Outdated
Comment on lines 5 to 18
/**
* Runs CLI commands
* @param {*} command String command to run
*/
const runCommand = (command: string) => {
try {
// runs given command and prints its output to console
execSync(`${command}`, { stdio: 'inherit' });
} catch (error) {
console.error('Failed to run command: ', error);
return false;
}
return true;
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that we have the same function in src/create.ts. Would it be a good idea to abstract it?

Copy link
Collaborator

@mationorato mationorato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but look at the comment.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this @jpcenteno ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why I appear as a co-author of that commit.

@mationorato mationorato linked an issue May 12, 2023 that may be closed by this pull request
Copy link
Collaborator

@mationorato mationorato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mationorato mationorato merged commit cebc398 into main May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance the localnet command Add command to run local node from zksync-cli
4 participants