Skip to content

Commit

Permalink
fix: undo rename
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Oct 6, 2023
1 parent cdd0a2d commit c1a73dc
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This CODEOWNERS file sets the individuals responsible for code in the zkcli repository.
# This CODEOWNERS file sets the individuals responsible for code in the zksync-cli repository.

# These users are the default owners for everything in the repo.
# They will be requested for review when someone opens a pull request.
Expand Down
14 changes: 7 additions & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Contributing to ZK CLI
# Contributing to zkSync CLI

## Welcome! 🎉

Hello, contributor! Thanks for thinking about helping with the ZK CLI project. This guide will help you understand how to contribute to our CLI tool.
Hello, contributor! Thanks for thinking about helping with the zkSync CLI project. This guide will help you understand how to contribute to our CLI tool.

## Getting Started

- **Fork the project.** First, fork the `zkcli` repository.
- **Fork the project.** First, fork the `zksync-cli` repository.

- **Download the project.** Now, get the project on your computer:

```bash
git clone https://github.com/<your-github-username>/zkcli.git
git clone https://github.com/<your-github-username>/zksync-cli.git
```

- **Make a new branch.** Give your branch a simple name that tells what you're working on:
Expand All @@ -28,7 +28,7 @@ Hello, contributor! Thanks for thinking about helping with the ZK CLI project. T

```bash
npm run build
npx zkcli [command] # you should be in the root directory of the project
npx zksync-cli [command] # you should be in the root directory of the project
```

- **Save your changes.** Use easy-to-understand messages when saving your changes.
Expand All @@ -41,7 +41,7 @@ Hello, contributor! Thanks for thinking about helping with the ZK CLI project. T

## Sending a Pull Request

- **Ask to add your changes.** Go to the `zkcli` repository on GitHub. You'll see a button "Compare & pull request." Click it and tell us about your changes.
- **Ask to add your changes.** Go to the `zksync-cli` repository on GitHub. You'll see a button "Compare & pull request." Click it and tell us about your changes.

- **Wait for feedback.** Our team will look at your changes. We might ask you to change some things.

Expand All @@ -61,7 +61,7 @@ If you have questions, you can ask on our [zkSync Community Hub](https://github.

## Thank You!

After we add your changes to the `zkcli` project, we'll be very thankful! Your help makes our project better.
After we add your changes to the `zksync-cli` project, we'll be very thankful! Your help makes our project better.

We hope you enjoy helping and come back to help more. Thanks for being part of our team!

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

### 🐛 Bug Report for ZK CLI
### 🐛 Bug Report for zkSync CLI
#### 📝 Description

Provide a clear and concise description of the bug.
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ contact_links:
- name: zksync-developers Discussion
url: https://github.com/zkSync-Community-Hub/zkync-developers/discussions
about: Please provide feedback, and ask questions here.
- name: ZK CLI documentation page
url: https://era.zksync.io/docs/tools/zkcli
- name: zkSync CLI documentation page
url: https://era.zksync.io/docs/tools/zksync-cli
about: Please refer to the documentation for immediate answers.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div align="center">

# ZK CLI
# zkSync CLI

![zksync cli](./zkcli-banner.png)
![zkSync CLI](./zksync-cli-banner.png)

This CLI tool simplifies the process of developing applications and interacting with zkSync.

[Documentation](https://era.zksync.io/docs/tools/zkcli) | [Report a bug](https://github.com/matter-labs/zkcli/issues/new) | [Request a feature](https://github.com/matter-labs/zkcli/issues/new)
[Documentation](https://era.zksync.io/docs/tools/zksync-cli) | [Report a bug](https://github.com/matter-labs/zksync-cli/issues/new) | [Request a feature](https://github.com/matter-labs/zksync-cli/issues/new)

[pr-welcome]: https://img.shields.io/static/v1?color=indigo&label=PRs&style=flat&message=welcome

Expand All @@ -16,50 +16,50 @@ This CLI tool simplifies the process of developing applications and interacting

- [Node.js v18 or higher](https://nodejs.org/en)
- [Git](https://git-scm.com/downloads)
- [Docker](https://www.docker.com/get-started/) (for `zkcli dev` commands)
- [Yarn](https://v3.yarnpkg.com/getting-started/install) (for `zkcli create` commands)
- [Docker](https://www.docker.com/get-started/) (for `zksync-cli dev` commands)
- [Yarn](https://v3.yarnpkg.com/getting-started/install) (for `zksync-cli create` commands)

## 📥 Usage

You can run the commands directly via NPX with `npx zkcli {COMMAND}`.
Or you can install the CLI globally with `npm i -g zkcli` and run the commands with `zkcli {COMMAND}`.
You can run the commands directly via NPX with `npx zksync-cli {COMMAND}`.
Or you can install the CLI globally with `npm i -g zksync-cli` and run the commands with `zksync-cli {COMMAND}`.

## 💻 Commands

### Local development commands
`zkcli dev` - Manage local zkSync development environment. It allows to easily start zkSync stack locally, for example: local Ethereum and zkSync nodes, Wallet and Bridge.
`zksync-cli dev` - Manage local zkSync development environment. It allows to easily start zkSync stack locally, for example: local Ethereum and zkSync nodes, Wallet and Bridge.

**General:**
- `zkcli dev start` - start local development environment (will ask to configure if starting for the first time)
- `zkcli dev clean` - clean data for configured modules
- `zkcli dev config` - select modules to run in local development environment
- `zksync-cli dev start` - start local development environment (will ask to configure if starting for the first time)
- `zksync-cli dev clean` - clean data for configured modules
- `zksync-cli dev config` - select modules to run in local development environment

**Modules:**

In addition to default modules, you can install custom modules from NPM.

- `zkcli dev install [module-name]` - install module with NPM (e.g. `zkcli dev i zkcli-dummy-module`)
- `zkcli dev modules` - displays list of installed modules
- `zksync-cli dev install [module-name]` - install module with NPM (e.g. `zksync-cli dev i zksync-cli-dummy-module`)
- `zksync-cli dev modules` - displays list of installed modules

Run `zkcli dev` to see the full list of commands.
Run `zksync-cli dev` to see the full list of commands.

### Bridge commands
- `zkcli bridge deposit`: deposits funds from Ethereum (L1) to zkSync (L2)
- `zkcli bridge withdraw`: withdraws funds from zkSync (L2) to Ethereum (L1)
- `zkcli bridge withdraw-finalize`: finalizes withdrawal of funds from zkSync (L2) to Ethereum (L1)
- `zksync-cli bridge deposit`: deposits funds from Ethereum (L1) to zkSync (L2)
- `zksync-cli bridge withdraw`: withdraws funds from zkSync (L2) to Ethereum (L1)
- `zksync-cli bridge withdraw-finalize`: finalizes withdrawal of funds from zkSync (L2) to Ethereum (L1)

### Create project commands
- `zkcli create project {FOLDER_NAME}`: creates project from template in the specified folder
- `zksync-cli create project {FOLDER_NAME}`: creates project from template in the specified folder

### Other commands
- `zkcli help`: Provides information about all supported commands
- `zkcli help <command>`: Provides detailed information about how to use a specific command. Replace <command> with the name of the command you want help with (e.g., `create`, `dev config`, `bridge withdraw-finalize`)
- `zkcli --version`: Returns the current version
- `zksync-cli help`: Provides information about all supported commands
- `zksync-cli help <command>`: Provides detailed information about how to use a specific command. Replace <command> with the name of the command you want help with (e.g., `create`, `dev config`, `bridge withdraw-finalize`)
- `zksync-cli --version`: Returns the current version


### 🔗 Supported bridge chains

By default ZK CLI bridge commands support Era Testnet and Era Mainnet. You can also use other networks by overwriting L1 and L2 RPC URLs. For example: `zkcli deposit --l2-rpc=http://... --l1-rpc=http://...`
By default zkSync CLI bridge commands support Era Testnet and Era Mainnet. You can also use other networks by overwriting L1 and L2 RPC URLs. For example: `zksync-cli deposit --l2-rpc=http://... --l1-rpc=http://...`

If you're using [local setup (dockerized testing node)](https://github.com/matter-labs/local-setup) with default L1 and L2 RPC URLs, you can select `Local Dockerized node` option in the CLI or provide option `--chain local-dockerized`.

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "zkcli",
"name": "zksync-cli",
"type": "module",
"version": "0.0.0-development",
"description": "CLI tool that simplifies the process of developing applications and interacting with the zkSync network",
"repository": {
"type": "git",
"url": "https://github.com/matter-labs/zkcli.git"
"url": "https://github.com/matter-labs/zksync-cli.git"
},
"main": "bin/index.js",
"bin": {
"zkcli": "bin/index.js"
"zksync-cli": "bin/index.js"
},
"exports": {
"./lib": "./bin/lib/index.js"
Expand Down
4 changes: 2 additions & 2 deletions src/commands/dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const setupConfig = async (options: LocalConfigOptions = {}) => {
const modules = await configHandler.getAllModules();
if (!modules.length) {
Logger.error("No installed modules were found");
Logger.error("Run `zkcli dev install [module-name...]` to install modules.");
Logger.error("Run `zksync-cli dev install [module-name...]` to install modules.");
return;
}

Expand Down Expand Up @@ -121,7 +121,7 @@ export const handler = async (options: LocalConfigOptions = {}) => {
await setupConfig(options);

Logger.info("\nConfiguration saved successfully!", { noFormat: true });
Logger.info(`Start configured environment with \`${chalk.magentaBright("zkcli dev start")}\``);
Logger.info(`Start configured environment with \`${chalk.magentaBright("zksync-cli dev start")}\``);
} catch (error) {
Logger.error("There was an error while configuring the testing environment:");
Logger.error(error);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const handler = async (moduleNames: string[], options: { link: boolean })
if (moduleNames.length) {
Logger.info(
`Add module${moduleNames.length > 1 ? "s" : ""} to your configuration with \`${chalk.magentaBright(
"zkcli dev config"
"zksync-cli dev config"
)}\``
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const handler = async () => {
const modules = await configHandler.getConfigModules();
if (!modules.length) {
Logger.warn("There are no configured modules");
Logger.info("You can configure them with: `zkcli dev config");
Logger.info("You can configure them with: `zksync-cli dev config");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev/modules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const handler = async () => {
const modules = await configHandler.getAllModules();
if (!modules.length) {
Logger.warn("There are no modules installed");
Logger.info("You can install modules with: `zkcli dev install [module-name...]");
Logger.info("You can install modules with: `zksync-cli dev install [module-name...]");
return;
}

Expand Down
18 changes: 9 additions & 9 deletions src/commands/dev/modules/utils/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,26 +99,26 @@ export const findDefaultModules = async (): Promise<Package[]> => {
type PackageJSON = { name: string; version: string };
const require = createRequire(import.meta.url);
const packages = {
"zkcli-in-memory-node": require("zkcli-in-memory-node/package.json") as PackageJSON,
"zkcli-dockerized-node": require("zkcli-dockerized-node/package.json") as PackageJSON,
"zkcli-portal": require("zkcli-portal/package.json") as PackageJSON,
"zksync-cli-in-memory-node": require("zksync-cli-in-memory-node/package.json") as PackageJSON,
"zksync-cli-dockerized-node": require("zksync-cli-dockerized-node/package.json") as PackageJSON,
"zksync-cli-portal": require("zksync-cli-portal/package.json") as PackageJSON,
} as const;

return [
{
module: ModuleInMemoryNode as unknown as Module,
name: packages["zkcli-in-memory-node"].name,
version: packages["zkcli-in-memory-node"].version,
name: packages["zksync-cli-in-memory-node"].name,
version: packages["zksync-cli-in-memory-node"].version,
},
{
module: ModuleDockerizedNode as unknown as Module,
name: packages["zkcli-dockerized-node"].name,
version: packages["zkcli-dockerized-node"].version,
name: packages["zksync-cli-dockerized-node"].name,
version: packages["zksync-cli-dockerized-node"].version,
},
{
module: ModulePortal as unknown as Module,
name: packages["zkcli-portal"].name,
version: packages["zkcli-portal"].version,
name: packages["zksync-cli-portal"].name,
version: packages["zksync-cli-portal"].version,
},
];
};
Expand Down
6 changes: 3 additions & 3 deletions src/commands/dev/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ const checkForUpdates = async (modules: Module[]) => {
if (currentVersion) {
str += chalk.gray(` (current: ${currentVersion})`);
}
str += chalk.gray(` - zkcli dev update ${module.package.name}`);
str += chalk.gray(` - zksync-cli dev update ${module.package.name}`);
Logger.info(str);
}
if (modulesRequiringUpdates.length > 1) {
Logger.info(
chalk.gray(
`Update all modules: zkcli dev update ${modulesRequiringUpdates
`Update all modules: zksync-cli dev update ${modulesRequiringUpdates
.map(({ module }) => module.package.name)
.join(" ")}`
)
Expand Down Expand Up @@ -99,7 +99,7 @@ export const handler = async () => {
const modules = await configHandler.getConfigModules();
if (!modules.length) {
Logger.warn("Config does not contain any installed modules.");
Logger.warn("Run `zkcli dev config` to select which modules to use.");
Logger.warn("Run `zksync-cli dev config` to select which modules to use.");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const handler = async (moduleNames: string[], options: ModuleUpdateOption
}
}

Logger.info(`\nTo make sure changes are applied use: \`${chalk.magentaBright("zkcli dev start")}\``);
Logger.info(`\nTo make sure changes are applied use: \`${chalk.magentaBright("zksync-cli dev start")}\``);
} catch (error) {
Logger.error("There was an error while updating module:");
Logger.error(error);
Expand Down

0 comments on commit c1a73dc

Please sign in to comment.