From d434943aae0071f944fd9378f003af5eeb96fd0f Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Thu, 16 May 2024 16:04:45 -0500 Subject: [PATCH] fix: update commands for quickstart (#68) # What :computer: * Updates commands for qs # Why :hand: * Fixes execution # Evidence :camera: Include screenshots, screen recordings, or `console` output here demonstrating that your changes work as intended --- .../_hardhat_deploy_contract_factory.md | 14 +++++------ .../_hello-zksync/_hardhat_deploy_contract.md | 18 +++++++------- .../_paymasters/_approval_paymaster_flow.md | 12 +++++----- .../_paymasters/_general_paymaster_flow.md | 12 +++++----- .../_testing/_hardhat_contract_testing.md | 13 +++++----- .../_hardhat_beacon_contract_upgradability.md | 20 ++++++++-------- ...dhat_transparent_contract_upgradability.md | 24 +++++++++---------- .../_hardhat_uups_contract_upgradability.md | 16 ++++++------- 8 files changed, 65 insertions(+), 64 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 f1d8cfaf..df24b2a2 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 @@ -73,9 +73,9 @@ Upon successful compilation, you'll receive output detailing the of Solidity files compiled. ```bash -Compiling contracts for zkSync Era with zksolc v1.4.0 and solc v0.8.17 -Compiling 2 Solidity file -Successfully compiled 2 Solidity file +Compiling contracts for zkSync Era with zksolc v1.4.1 and solc v0.8.17 +Compiling 15 Solidity files +Successfully compiled 15 Solidity files ``` The compiled artifacts will be located in the `/artifacts-zk` folder. @@ -141,9 +141,9 @@ deploys to the configured network in your Hardhat setup. For local deployment, a ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script deployUsingFactory.ts +npx hardhat deploy-zksync --script deployUsingFactory.ts # To deploy the contract on local in-memory node: -# npm run hardhat deploy-zksync --script deployUsingFactory.ts --network inMemoryNode +# npx hardhat deploy-zksync --script deployUsingFactory.ts --network inMemoryNode ``` ```bash [yarn] @@ -153,9 +153,9 @@ yarn hardhat deploy-zksync --script deployUsingFactory.ts ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script deployUsingFactory.ts +pnpx exec hardhat deploy-zksync --script deployUsingFactory.ts # To deploy the contract on local in-memory node: -# pnpm run hardhat deploy-zksync --script deployUsingFactory.ts --network inMemoryNode +# pnpx exec hardhat deploy-zksync --script deployUsingFactory.ts --network inMemoryNode ``` ```bash [bun] 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 655fe8c1..37cf8144 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 @@ -87,9 +87,9 @@ Upon successful compilation, you'll receive output detailing the of Solidity files compiled. ```bash -Compiling contracts for zkSync Era with zksolc v1.4.0 and solc v0.8.17 -Compiling 1 Solidity file -Successfully compiled 1 Solidity file +Compiling contracts for zkSync Era with zksolc v1.4.1 and solc v0.8.17 +Compiling 15 Solidity files +Successfully compiled 15 Solidity files ``` The compiled artifacts will be located in the `/artifacts-zk` folder. @@ -124,28 +124,28 @@ deploys to the configured network in your Hardhat setup. For local deployment, a ::code-group ```bash [npm] -npm run deploy +npx hardhat deploy-zksync --script deploy.ts # The deploy keyword will trigger the `deploy` script command on `package.json` # To deploy the contract on local in-memory node: -# npm run hardhat deploy-zksync --script deploy.ts --network inMemoryNode +# npx hardhat deploy-zksync --script deploy.ts --network inMemoryNode ``` ```bash [yarn] -yarn deploy +yarn hardhat deploy-zksync --script deploy.ts # The deploy keyword will trigger the `deploy` script command on `package.json` # To deploy the contract on local in-memory node: # yarn hardhat deploy-zksync --script deploy.ts --network inMemoryNode ``` ```bash [pnpm] -pnpm run deploy +pnpx exec hardhat deploy-zksync --script deploy.ts # The deploy keyword will trigger the `deploy` script command on `package.json` # To deploy the contract on local in-memory node: -# pnpm run hardhat deploy-zksync --script deploy.ts --network inMemoryNode +# pnpx exec hardhat deploy-zksync --script deploy.ts --network inMemoryNode ``` ```bash [bun] -bun run deploy +bun run hardhat deploy-zksync --script deploy.ts # The deploy keyword will trigger the `deploy` script command on `package.json` # To deploy the contract on local in-memory node: # bun run hardhat deploy-zksync --script deploy.ts --network inMemoryNode 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 13268742..eb0fec66 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 @@ -216,9 +216,9 @@ deploys to the configured network in your Hardhat setup. For local deployment, a ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script deployApprovalFlowPaymaster.ts +npx hardhat deploy-zksync --script deployApprovalFlowPaymaster.ts # To deploy the contract on local in-memory node: -# npm run hardhat deploy-zksync --script deployApprovalFlowPaymaster.ts --network inMemoryNode +# npx hardhat deploy-zksync --script deployApprovalFlowPaymaster.ts --network inMemoryNode ``` ```bash [yarn] @@ -228,9 +228,9 @@ yarn hardhat deploy-zksync --script deployApprovalFlowPaymaster.ts ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script deployApprovalFlowPaymaster.ts +pnpx exec hardhat deploy-zksync --script deployApprovalFlowPaymaster.ts # To deploy the contract on local in-memory node: -# pnpm run hardhat deploy-zksync --script deployApprovalFlowPaymaster.ts --network inMemoryNode +# pnpx exec hardhat deploy-zksync --script deployApprovalFlowPaymaster.ts --network inMemoryNode ``` ```bash [bun] @@ -378,7 +378,7 @@ Execute the command corresponding to your package manager: ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script interact/interactWithApprovalFlowPaymaster.ts +npx hardhat deploy-zksync --script interact/interactWithApprovalFlowPaymaster.ts ``` ```bash [yarn] @@ -386,7 +386,7 @@ yarn hardhat deploy-zksync --script interact/interactWithApprovalFlowPaymaster.t ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script interact/interactWithApprovalFlowPaymaster.ts +pnpx exec hardhat deploy-zksync --script interact/interactWithApprovalFlowPaymaster.ts ``` ```bash [bun] 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 1bb732fc..b919ebf5 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 @@ -185,9 +185,9 @@ deploys to the configured network in your Hardhat setup. For local deployment, a ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts +npx hardhat deploy-zksync --script deployGaslessPaymaster.ts # To deploy the contract on local in-memory node: -# npm run hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode +# npx hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode ``` ```bash [yarn] @@ -197,9 +197,9 @@ yarn hardhat deploy-zksync --script deployGaslessPaymaster.ts ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script deployGaslessPaymaster.ts +pnpx exec hardhat deploy-zksync --script deployGaslessPaymaster.ts # To deploy the contract on local in-memory node: -# pnpm run hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode +# pnpx exec hardhat deploy-zksync --script deployGaslessPaymaster.ts --network inMemoryNode ``` ```bash [bun] @@ -329,7 +329,7 @@ Execute the command corresponding to your package manager: ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script interact/interactWithGaslessPaymaster.ts +npx hardhat deploy-zksync --script interact/interactWithGaslessPaymaster.ts ``` ```bash [yarn] @@ -337,7 +337,7 @@ yarn hardhat deploy-zksync --script interact/interactWithGaslessPaymaster.ts ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script interact/interactWithGaslessPaymaster.ts +pnpx exec hardhat deploy-zksync --script interact/interactWithGaslessPaymaster.ts ``` ```bash [bun] 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 e4cff8ea..1719d29a 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 @@ -131,9 +131,9 @@ Upon successful compilation, you'll receive output detailing the of Solidity files compiled. ```bash -Compiling contracts for zkSync Era with zksolc v1.4.0 and solc v0.8.17 -Compiling 2 Solidity file -Successfully compiled 2 Solidity file +Compiling contracts for zkSync Era with zksolc v1.4.1 and solc v0.8.17 +Compiling 15 Solidity files +Successfully compiled 15 Solidity files ``` The compiled artifacts will be located in the `/artifacts-zk` folder. @@ -148,8 +148,9 @@ during the initialization step in the `/tests` directory, specifically the [`crowdFunding.test.ts` file](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/testing/test/crowdFunding.test.ts). ```typescript [crowdFunding.test.ts] +import "@nomicfoundation/hardhat-chai-matchers"; import { expect } from "chai"; -import { ethers } from "hardhat"; +import { ethers } from "ethers"; import { getWallet, LOCAL_RICH_WALLETS, deployContract } from "../deploy/utils"; describe("CrowdfundingCampaign", function () { @@ -203,7 +204,7 @@ Execute the test command corresponding to your package manager: ::code-group ```bash [npm] -npm run hardhat test --network hardhat +npx hardhat test --network hardhat ``` ```bash [yarn] @@ -211,7 +212,7 @@ yarn hardhat test --network hardhat ``` ```bash [pnpm] -pnpm run hardhat test --network hardhat +pnpx exec hardhat test --network hardhat ``` ```bash [bun] 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 96354f99..67154916 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 @@ -113,8 +113,8 @@ of Solidity files compiled. ```bash Compiling contracts for zkSync Era with zksolc v1.4.0 and solc v0.8.17 -Compiling 3 Solidity file -Successfully compiled 3 Solidity file +Compiling 29 Solidity file +Successfully compiled 29 Solidity file ``` The compiled artifacts will be located in the `/artifacts-zk` folder. @@ -169,9 +169,9 @@ deploys to the configured network in your Hardhat setup. For local deployment, a ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script deployBeaconProxy.ts +npx hardhat deploy-zksync --script deployBeaconProxy.ts # To deploy the contract on local in-memory node: -# npm run hardhat deploy-zksync --script deployBeaconProxy.ts --network inMemoryNode +# npx hardhat deploy-zksync --script deployBeaconProxy.ts --network inMemoryNode ``` ```bash [yarn] @@ -181,9 +181,9 @@ yarn hardhat deploy-zksync --script deployBeaconProxy.ts ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script deployBeaconProxy.ts +pnpx exec hardhat deploy-zksync --script deployBeaconProxy.ts # To deploy the contract on local in-memory node: -# pnpm run hardhat deploy-zksync --script deployBeaconProxy.ts --network inMemoryNode +# pnpx exec hardhat deploy-zksync --script deployBeaconProxy.ts --network inMemoryNode ``` ```bash [bun] @@ -344,7 +344,7 @@ Execute the test command corresponding to your package manager: ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script upgrade-scripts/upgradeBeaconCrowdfundingCampaign.ts +npx hardhat deploy-zksync --script upgrade-scripts/upgradeBeaconCrowdfundingCampaign.ts ``` ```bash [yarn] @@ -352,7 +352,7 @@ yarn hardhat deploy-zksync --script upgrade-scripts/upgradeBeaconCrowdfundingCam ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script upgrade-scripts/upgradeBeaconCrowdfundingCampaign.ts +pnpx exec hardhat deploy-zksync --script upgrade-scripts/upgradeBeaconCrowdfundingCampaign.ts ``` ```bash [bun] @@ -383,7 +383,7 @@ To proceed with verification, execute the following command: ::code-group ```bash [npm] -npm run hardhat verify +npx hardhat verify ``` ```bash [yarn] @@ -391,7 +391,7 @@ yarn hardhat verify ``` ```bash [pnpm] -pnpm run hardhat verify +pnpx exec hardhat verify ``` ```bash [bun] 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 83173651..3239f1b2 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 @@ -94,7 +94,7 @@ To compile the contracts in the project, run the following command: ::code-group ```bash [npm] -npm run compile +npx run compile ``` ```bash [yarn] @@ -102,7 +102,7 @@ yarn compile ``` ```bash [pnpm] -pnpm run compile +pnpx run compile ``` ```bash [bun] @@ -164,9 +164,9 @@ deploys to the configured network in your Hardhat setup. For local deployment, a ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script deployTransparentProxy.ts +npx hardhat deploy-zksync --script deployTransparentProxy.ts # To deploy the contract on local in-memory node: -# npm run hardhat deploy-zksync --script deployTransparentProxy.ts --network inMemoryNode +# npx hardhat deploy-zksync --script deployTransparentProxy.ts --network inMemoryNode ``` ```bash [yarn] @@ -176,9 +176,9 @@ yarn hardhat deploy-zksync --script deployTransparentProxy.ts ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script deployTransparentProxy.ts +pnpx exec hardhat deploy-zksync --script deployTransparentProxy.ts # To deploy the contract on local in-memory node: -# pnpm run hardhat deploy-zksync --script deployTransparentProxy.ts --network inMemoryNode +# pnpx exec hardhat deploy-zksync --script deployTransparentProxy.ts --network inMemoryNode ``` ```bash [bun] @@ -262,8 +262,8 @@ of Solidity files compiled. ```bash Compiling contracts for zkSync Era with zksolc v1.4.0 and solc v0.8.17 -Compiling 4 Solidity file -Successfully compiled 4 Solidity file +Compiling 29 Solidity file +Successfully compiled 29 Solidity file ``` The compiled artifacts will be located in the `/artifacts-zk` folder. @@ -326,7 +326,7 @@ Execute the command corresponding to your package manager: ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script upgrade-scripts/upgradeCrowdfundingCampaign.ts +npx hardhat deploy-zksync --script upgrade-scripts/upgradeCrowdfundingCampaign.ts ``` ```bash [yarn] @@ -334,7 +334,7 @@ yarn hardhat deploy-zksync --script upgrade-scripts/upgradeCrowdfundingCampaign. ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script upgrade-scripts/upgradeCrowdfundingCampaign.ts +pnpx exec hardhat deploy-zksync --script upgrade-scripts/upgradeCrowdfundingCampaign.ts ``` ```bash [bun] @@ -367,7 +367,7 @@ Replace with the actual proxy address from your deployment. ::code-group ```bash [npm] -npm run hardhat verify +npx hardhat verify ``` ```bash [yarn] @@ -375,7 +375,7 @@ yarn hardhat verify ``` ```bash [pnpm] -pnpm run hardhat verify +pnpx exec hardhat verify ``` ```bash [bun] 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 c5b84e0a..025f13d9 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 @@ -100,7 +100,7 @@ To compile the contracts in the project, run the following command: ::code-group ```bash [npm] -npm run compile +npx run compile ``` ```bash [yarn] @@ -108,7 +108,7 @@ yarn compile ``` ```bash [pnpm] -pnpm run compile +pnpx run compile ``` ```bash [bun] @@ -175,9 +175,9 @@ deploys to the configured network in your Hardhat setup. For local deployment, a ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script deployUUPS.ts +npx run hardhat deploy-zksync --script deployUUPS.ts # To deploy the contract on local in-memory node: -# npm run hardhat deploy-zksync --script deployUUPS.ts --network inMemoryNode +# npx run hardhat deploy-zksync --script deployUUPS.ts --network inMemoryNode ``` ```bash [yarn] @@ -187,9 +187,9 @@ yarn hardhat deploy-zksync --script deployUUPS.ts ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script deployUUPS.ts +pnpx run hardhat deploy-zksync --script deployUUPS.ts # To deploy the contract on local in-memory node: -# pnpm run hardhat deploy-zksync --script deployUUPS.ts --network inMemoryNode +# pnpx run hardhat deploy-zksync --script deployUUPS.ts --network inMemoryNode ``` ```bash [bun] @@ -334,7 +334,7 @@ Execute the test command corresponding to your package manager: ::code-group ```bash [npm] -npm run hardhat deploy-zksync --script upgrade-scripts/upgradeUUPSCrowdfundingCampaign.ts +npx run hardhat deploy-zksync --script upgrade-scripts/upgradeUUPSCrowdfundingCampaign.ts ``` ```bash [yarn] @@ -342,7 +342,7 @@ yarn hardhat deploy-zksync --script upgrade-scripts/upgradeUUPSCrowdfundingCampa ``` ```bash [pnpm] -pnpm run hardhat deploy-zksync --script upgrade-scripts/upgradeUUPSCrowdfundingCampaign.ts +pnpx run hardhat deploy-zksync --script upgrade-scripts/upgradeUUPSCrowdfundingCampaign.ts ``` ```bash [bun]