From c1a9a7017df2787c1d3b0abad8aa5fef6e4973ac Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Mon, 6 May 2024 13:09:47 -0500 Subject: [PATCH] feat: uses zksync-cli for quickstart templates (#31) Leaving as a DRAFT until the following PRs are merged: - https://github.com/matter-labs/zksync-cli/pull/132 - https://github.com/matter-labs/zksync-contract-templates/pull/11 # What :computer: * Uses zksync-cli for quickstart bootstrapping # Why :hand: * Easiest way to get started # Evidence :camera: Include screenshots, screen recordings, or `console` output here demonstrating that your changes work as intended --- .../_hardhat_deploy_contract_factory.md | 29 ++--------------- .../_hello-zksync/_hardhat_deploy_contract.md | 29 ++--------------- .../_paymasters/_approval_paymaster_flow.md | 30 ++---------------- .../_paymasters/_general_paymaster_flow.md | 29 ++--------------- .../_testing/_hardhat_contract_testing.md | 31 +++---------------- .../_hardhat_beacon_contract_upgradability.md | 29 ++--------------- ...dhat_transparent_contract_upgradability.md | 29 ++--------------- .../_hardhat_uups_contract_upgradability.md | 29 ++--------------- 8 files changed, 18 insertions(+), 217 deletions(-) diff --git a/content/00.build/10.quick-start/_deploy_factory/_hardhat_deploy_contract_factory.md b/content/00.build/10.quick-start/_deploy_factory/_hardhat_deploy_contract_factory.md index dcee8943..0b5ebd29 100644 --- a/content/00.build/10.quick-start/_deploy_factory/_hardhat_deploy_contract_factory.md +++ b/content/00.build/10.quick-start/_deploy_factory/_hardhat_deploy_contract_factory.md @@ -1,38 +1,13 @@ --- title: Hardhat | Deploy Contract Factory --- - Run the following command in your terminal to initialize the project. ```sh -git clone https://github.com/dutterbutter/zksync-quickstart-guide.git -cd zksync-quickstart-guide -git checkout db/contract-factories +npx zksync-cli create --template qs-factories contract-factory-quickstart +cd contract-factory-quickstart ``` -Install the dependencies: - -::code-group - -```bash [npm] -npm install -``` - -```bash [yarn] -yarn install -``` - -```bash [pnpm] -pnpm install -``` - -```bash [bun] -bun install -``` - -:: - ## Set up your wallet :display-partial{path="build/quick-start/_partials/_setup-wallet"} diff --git a/content/00.build/10.quick-start/_hello-zksync/_hardhat_deploy_contract.md b/content/00.build/10.quick-start/_hello-zksync/_hardhat_deploy_contract.md index c0635671..3ded8903 100644 --- a/content/00.build/10.quick-start/_hello-zksync/_hardhat_deploy_contract.md +++ b/content/00.build/10.quick-start/_hello-zksync/_hardhat_deploy_contract.md @@ -4,36 +4,11 @@ title: Hardhat | Deploy Contract Run the following command in your terminal to initialize the project. - - ```sh -git clone https://github.com/dutterbutter/zksync-quickstart-guide.git -cd zksync-quickstart-guide -``` - -Install the dependencies: - -::code-group - -```bash [npm] -npm install -``` - -```bash [yarn] -yarn install +npx zksync-cli create --template qs-hello-zksync hello-zksync-quickstart +cd hello-zksync-quickstart ``` -```bash [pnpm] -pnpm install -``` - -```bash [bun] -bun install -``` - -:: - ## Set up your wallet :display-partial{path="build/quick-start/_partials/_setup-wallet"} diff --git a/content/00.build/10.quick-start/_paymasters/_approval_paymaster_flow.md b/content/00.build/10.quick-start/_paymasters/_approval_paymaster_flow.md index 38718bdc..559de7f2 100644 --- a/content/00.build/10.quick-start/_paymasters/_approval_paymaster_flow.md +++ b/content/00.build/10.quick-start/_paymasters/_approval_paymaster_flow.md @@ -3,39 +3,13 @@ title: Approval Paymaster description: Learn to deploy contract factories in the ZKsync environment. --- - Run the following command in your terminal to initialize the project. ```sh -git clone https://github.com/dutterbutter/zksync-quickstart-guide.git -cd zksync-quickstart-guide -git checkout db/contract-paymaster +npx zksync-cli create --template qs-paymaster contract-paymaster-quickstart +cd contract-paymaster-quickstart ``` -Install the dependencies: - -::code-group - -```bash [npm] -npm install -``` - -```bash [yarn] -yarn install - -``` - -```bash [pnpm] -pnpm install -``` - -```bash [bun] -bun install -``` - -:: - ## Set up your wallet :display-partial{path = "/build/quick-start/_partials/_setup-wallet"} diff --git a/content/00.build/10.quick-start/_paymasters/_general_paymaster_flow.md b/content/00.build/10.quick-start/_paymasters/_general_paymaster_flow.md index ef0750b4..f951ec92 100644 --- a/content/00.build/10.quick-start/_paymasters/_general_paymaster_flow.md +++ b/content/00.build/10.quick-start/_paymasters/_general_paymaster_flow.md @@ -3,38 +3,13 @@ title: General Paymaster description: Learn to deploy contract factories in the ZKsync environment. --- - Run the following command in your terminal to initialize the project. ```sh -git clone https://github.com/dutterbutter/zksync-quickstart-guide.git -cd zksync-quickstart-guide -git checkout db/contract-paymaster +npx zksync-cli create --template qs-paymaster contract-paymaster-quickstart +cd contract-paymaster-quickstart ``` -Install the dependencies: - -::code-group - -```bash [npm] -npm install -``` - -```bash [yarn] -yarn install -``` - -```bash [pnpm] -pnpm install -``` - -```bash [bun] -bun install -``` - -:: - ## Set up your wallet :display-partial{path = /build/quick-start/_partials/_setup-wallet"} diff --git a/content/00.build/10.quick-start/_testing/_hardhat_contract_testing.md b/content/00.build/10.quick-start/_testing/_hardhat_contract_testing.md index 4d558bfc..91ceef15 100644 --- a/content/00.build/10.quick-start/_testing/_hardhat_contract_testing.md +++ b/content/00.build/10.quick-start/_testing/_hardhat_contract_testing.md @@ -5,33 +5,10 @@ title: Hardhat | Contract Testing bootstrapping for this guide series. --> Run the following command in your terminal to initialize the project. - ```sh - git clone https://github.com/dutterbutter/zksync-quickstart-guide.git - cd zksync-quickstart-guide - git checkout db/contract-testing - ``` - - Install the dependencies: - - ::code-group - - ```bash [npm] - npm install - ``` - - ```bash [yarn] - yarn install - ``` - - ```bash [pnpm] - pnpm install - ``` - - ```bash [bun] - bun install - ``` - - :: +```sh +npx zksync-cli create --template qs-testing contract-testing-quickstart +cd contract-testing-quickstart +``` --- diff --git a/content/00.build/10.quick-start/_upgrading/_beacon/_hardhat_beacon_contract_upgradability.md b/content/00.build/10.quick-start/_upgrading/_beacon/_hardhat_beacon_contract_upgradability.md index ae4f761e..46ca1286 100644 --- a/content/00.build/10.quick-start/_upgrading/_beacon/_hardhat_beacon_contract_upgradability.md +++ b/content/00.build/10.quick-start/_upgrading/_beacon/_hardhat_beacon_contract_upgradability.md @@ -2,38 +2,13 @@ title: Hardhat | Contract Upgrading --- - Run the following command in your terminal to initialize the project. ```sh -git clone https://github.com/dutterbutter/zksync-quickstart-guide.git -cd zksync-quickstart-guide -git checkout db/contract-upgrade +npx zksync-cli create --template qs-upgrade contract-upgrade-quickstart +cd contract-upgrade-quickstart ``` -Install the dependencies: - -::code-group - -```bash [npm] -npm install -``` - -```bash [yarn] -yarn install -``` - -```bash [pnpm] -pnpm install -``` - -```bash [bun] -bun install -``` - -:: - ## Set up your wallet :display-partial{path = "/build/quick-start/_partials/_setup-wallet"} diff --git a/content/00.build/10.quick-start/_upgrading/_transparent/_hardhat_transparent_contract_upgradability.md b/content/00.build/10.quick-start/_upgrading/_transparent/_hardhat_transparent_contract_upgradability.md index 76a2560e..82a0ef2b 100644 --- a/content/00.build/10.quick-start/_upgrading/_transparent/_hardhat_transparent_contract_upgradability.md +++ b/content/00.build/10.quick-start/_upgrading/_transparent/_hardhat_transparent_contract_upgradability.md @@ -1,38 +1,13 @@ --- title: Hardhat | Contract Upgrading --- - Run the following command in your terminal to initialize the project. ```sh -git clone https://github.com/dutterbutter/zksync-quickstart-guide.git -cd zksync-quickstart-guide -git checkout db/contract-upgrade +npx zksync-cli create --template qs-upgrade contract-upgrade-quickstart +cd contract-upgrade-quickstart ``` -Install the dependencies: - -::code-group - -```bash [npm] -npm install -``` - -```bash [yarn] -yarn install -``` - -```bash [pnpm] -pnpm install -``` - -```bash [bun] -bun install -``` - -:: - --- ## Set up your wallet diff --git a/content/00.build/10.quick-start/_upgrading/_uups/_hardhat_uups_contract_upgradability.md b/content/00.build/10.quick-start/_upgrading/_uups/_hardhat_uups_contract_upgradability.md index 374b32bd..bbb9bc8a 100644 --- a/content/00.build/10.quick-start/_upgrading/_uups/_hardhat_uups_contract_upgradability.md +++ b/content/00.build/10.quick-start/_upgrading/_uups/_hardhat_uups_contract_upgradability.md @@ -2,38 +2,13 @@ title: Hardhat | Contract Upgrading --- - Run the following command in your terminal to initialize the project. ```sh -git clone https://github.com/dutterbutter/zksync-quickstart-guide.git -cd zksync-quickstart-guide -git checkout db/contract-upgrade +npx zksync-cli create --template qs-upgrade contract-upgrade-quickstart +cd contract-upgrade-quickstart ``` -Install the dependencies: - -::code-group - -```bash [npm] -npm install -``` - -```bash [yarn] -yarn install -``` - -```bash [pnpm] -pnpm install -``` - -```bash [bun] -bun install -``` - -:: - ## Set up your wallet :display-partial{path="build/quick-start/_partials/_setup-wallet"}