From be3def0d1669eeaf970dc429dbe5cbb9367555b6 Mon Sep 17 00:00:00 2001 From: Oleh Bairak <118197764+obmatter@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:40:30 +0100 Subject: [PATCH] docs(how-to): add zksync-cli instructions for l1-l2 tutorial (#799) * fix: adding cli mention in the tutorial New line for using zksync-cli is added. - for NPX - for NPM (local package install) * fix: new update * Update docs/dev/how-to/send-transaction-l1-l2.md Co-authored-by: Dennis <10233439+idea404@users.noreply.github.com> * Update docs/dev/how-to/send-transaction-l1-l2.md Co-authored-by: Dennis <10233439+idea404@users.noreply.github.com> --------- Co-authored-by: Dennis <10233439+idea404@users.noreply.github.com> --- docs/dev/how-to/send-transaction-l1-l2.md | 26 ++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/dev/how-to/send-transaction-l1-l2.md b/docs/dev/how-to/send-transaction-l1-l2.md index 47c3a8ea6f..14d3ec5478 100644 --- a/docs/dev/how-to/send-transaction-l1-l2.md +++ b/docs/dev/how-to/send-transaction-l1-l2.md @@ -233,7 +233,31 @@ Along with zkSync Era's built-in censorship resistance that requires multi-layer User needs to perform next steps: -1. Run local node dockerized containers. [`Instructions how to run it`](https://github.com/matter-labs/local-setup/tree/main) +1. Run local node dockerized containers. [`Instructions how to run it`](https://github.com/matter-labs/local-setup/tree/main) or use [`zksync-cli`](https://github.com/matter-labs/zksync-cli): + +::: code-tabs +@tab npx + +```npx + npx zksync-cli dev config + // choose: Dockerized node - Persistent state, includes L1 and L2 nodes + // choose: BE and Portal (optional) + npx zksync-cli dev start +``` + +@tab npm + +```npm + // install zksync-cli + npm i -g zksync-cli@latest + zksync-cli dev config + // choose: Dockerized node - Persistent state, includes L1 and L2 nodes + // choose: BE and Portal (optional) + zksync-cli dev start +``` + +::: + 2. In the root folder of the imported project (step 1) create `file.js` and insert there code from example below 3. In the root folder add `.env` file with private key of wallet to use