diff --git a/checks-config/era.dic b/checks-config/era.dic index 71a14eda86ca..063c129b3e66 100644 --- a/checks-config/era.dic +++ b/checks-config/era.dic @@ -968,3 +968,4 @@ DCMAKE preloaded e2e upcasting +foundryup diff --git a/docs/guides/setup-dev.md b/docs/guides/setup-dev.md index a27cdd3ea593..f096a2f8a270 100644 --- a/docs/guides/setup-dev.md +++ b/docs/guides/setup-dev.md @@ -27,6 +27,10 @@ cargo install sqlx-cli --version 0.7.3 sudo systemctl stop postgresql # Start docker. sudo systemctl start docker + +# Foundry +curl -L https://foundry.paradigm.xyz | bash +foundryup --branch master ``` ## Supported operating systems @@ -257,6 +261,11 @@ enable nix-ld. Go to the zksync folder and run `nix develop --impure`. After it finishes, you are in a shell that has all the dependencies. +## Foundry + +[Foundry](https://book.getfoundry.sh/getting-started/installation) can be utilized for deploying smart contracts. For +commands related to deployment, you can pass flags for Foundry integration. + ## Environment Edit the lines below and add them to your shell profile file (e.g. `~/.bash_profile`, `~/.zshrc`): diff --git a/zk_toolbox/README.md b/zk_toolbox/README.md index f039ef210d48..eef826da1564 100644 --- a/zk_toolbox/README.md +++ b/zk_toolbox/README.md @@ -7,15 +7,23 @@ Toolkit for creating and managing ZK Stack chains. ZK Inception facilitates the creation and management of ZK Stacks. All commands are interactive, but you can also pass all necessary arguments via the command line. +### Dependencies + +Ensure you have followed +[these instructions](https://github.com/matter-labs/zksync-era/blob/main/docs/guides/setup-dev.md) to set up +dependencies on your machine (don't worry about the Environment section for now). + ### Installation Install zk_inception from git: -`cargo install --git https://github.com/matter-labs/zksync-era/ --locked zk_inception --force` +```bash +cargo install --git https://github.com/matter-labs/zksync-era/ --locked zk_inception --force +``` Manually building from a local copy of the [ZkSync](https://github.com/matter-labs/zksync-era/) repository: -``` +```bash cd zk_toolbox cargo install --path ./crates/zk_inception --force --locked ``` @@ -33,20 +41,26 @@ that connects all ZK chains, like the BridgeHub, the shared bridges, and state t To create a ZK Stack project, you must first create an ecosystem: -`zk_inception ecosystem create` +```bash +zk_inception ecosystem create +``` All subsequent commands should be executed from within the ecosystem folder. If the ecosystem has never been deployed before, initialization is required: -`zk_inception ecosystem init` +```bash +zk_inception ecosystem init +``` This command also initializes the first ZK chain. Note that the very first chain becomes the default one, but you can override it with another by using the `--chain ` flag. To change the default ZK chain, use: -`zk_inception ecosystem change-default-chain` +```bash +zk_inception ecosystem change-default-chain +``` IMPORTANT: It is not yet possible to use an existing ecosystem and register a chain to it. this feature will be added in the future. @@ -56,22 +70,32 @@ the future. Upon ecosystem creation, the first ZK chain is automatically generated. However, you can create additional chains and switch between them: -`zk_inception chain create` +```bash +zk_inception chain create +``` Once created, contracts for the ZK chain must be deployed: -`zk_inception chain init` +```bash +zk_inception chain init +``` Initialization utilizes the ecosystem's governance to register it in the BridgeHub. If contracts were deployed by a third party (e.g., MatterLabs), you may need to run the genesis process locally: -`zk_inception chain genesis` +```bash +zk_inception chain genesis +``` This ensures proper initialization of the server. ### Zk Server -For running the chain: `zk_inception server` +For running the chain: + +```bash +zk_inception server +``` You can specify the chain you are running by providing `--chain ` argument diff --git a/zk_toolbox/rust-toolchain b/zk_toolbox/rust-toolchain index 2bf5ad0447d3..fb426719abc7 100644 --- a/zk_toolbox/rust-toolchain +++ b/zk_toolbox/rust-toolchain @@ -1 +1 @@ -stable +stable-1.78.0