diff --git a/app.vue b/app.vue index e8fdc363..5ea66913 100644 --- a/app.vue +++ b/app.vue @@ -57,7 +57,7 @@ const links = computed(() => { }, { label: 'SDK Docs', - to: 'https://zksync-sdk-docs-staging.web.app', + to: 'https://staging-sdk-docs.zksync.io/', }, { label: 'ZK Stack', diff --git a/content/00.build/10.quick-start/00.index.md b/content/00.build/10.quick-start/00.index.md index ee76738c..6d7a137f 100644 --- a/content/00.build/10.quick-start/00.index.md +++ b/content/00.build/10.quick-start/00.index.md @@ -105,14 +105,7 @@ Quickly set up `foundry-zksync` by following these steps: cd foundry-zksync ``` -2. **Prepare the Installation Script**: - Ensure the script is executable: - - ```bash - chmod +x ./install-foundry-zksync - ``` - -3. **Run the Installer**: +2. **Run the Installer**: Execute the script to install the `foundry-zksync` binaries `forge` and `cast`: ```bash @@ -157,7 +150,7 @@ To deploy contracts, you'll need to securely add your wallet's private key to th WALLET_PRIVATE_KEY=your_private_key_here ``` - - Replace **`your_private_key_here`** with your actual private key. If you're using Foundry, make sure your private key starts with `0x`. + - Replace **`your_private_key_here`** with your actual private key. **If you're using Foundry, make sure your private key starts with `0x`**. --- diff --git a/content/00.build/10.quick-start/_deploy_factory/_foundry_deploy_contract_factory.md b/content/00.build/10.quick-start/_deploy_factory/_foundry_deploy_contract_factory.md index ae1f2a92..1c87244f 100644 --- a/content/00.build/10.quick-start/_deploy_factory/_foundry_deploy_contract_factory.md +++ b/content/00.build/10.quick-start/_deploy_factory/_foundry_deploy_contract_factory.md @@ -1,13 +1,14 @@ --- title: Foundry | Deploy Contract Factory --- - + +:display-partial{path = "/_partials/_foundry_alpha_warning"} + Run the following command in your terminal to initialize the Foundry project. ```sh -git clone https://github.com/dutterbutter/zksync-foundry-quickstart-guide -cd zksync-foundry-quickstart-guide -git checkout db/deploy-contract-factory +npx zksync-cli@latest create --template qs-fs-factories foundry-contract-factory-quickstart +cd foundry-contract-factory-quickstart ``` ## Set up your wallet @@ -18,7 +19,7 @@ git checkout db/deploy-contract-factory ## Review the CrowdfundingFactory contract -The `CrowdfundingFactory.sol` we will compile and deploy is provided under the [`/src` directory](https://github.com/dutterbutter/zksync-foundry-quickstart-guide/blob/db/deploy-contract-factory/src/CrowdfundFactory.sol). +The `CrowdfundingFactory.sol` we will compile and deploy is provided under the [`/src` directory](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/foundry/factory/src/CrowdfundFactory.sol). The `CrowdfundingFactory.sol`contract will be used to deploy multiple instances of the `CrowdfundingCampaign.sol` contract from the previous guide. @@ -75,7 +76,7 @@ For this particular guide we are making use of `zksolc`. To compile the contracts in the project, run the following command: ```bash -forge build --zksync +forge build --zksync --use 0.8.20 ``` Upon successful compilation, you'll receive output detailing the 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 8279bb8e..3dc65987 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 @@ -4,7 +4,7 @@ title: Hardhat | Deploy Contract Factory Run the following command in your terminal to initialize the project. ```sh -npx zksync-cli create --template qs-factories contract-factory-quickstart +npx zksync-cli@latest create --template qs-factories contract-factory-quickstart cd contract-factory-quickstart ``` @@ -17,7 +17,7 @@ cd contract-factory-quickstart ## Compile the contracts This section will focus on compiling and deploying the `CrowdfundingFactory.sol` -contract that is provided under the [`/contracts` directory](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/factories/contracts/CrowdfundFactory.sol). +contract that is provided under the [`/contracts` directory](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/factory/contracts/CrowdfundFactory.sol). The `CrowdfundingFactory.sol`contract will be used to deploy multiple instances of the `CrowdfundingCampaign.sol` contract from the previous guide. diff --git a/content/00.build/10.quick-start/_hello-zksync/_foundry_deploy_contract.md b/content/00.build/10.quick-start/_hello-zksync/_foundry_deploy_contract.md index 56584d97..3341937a 100644 --- a/content/00.build/10.quick-start/_hello-zksync/_foundry_deploy_contract.md +++ b/content/00.build/10.quick-start/_hello-zksync/_foundry_deploy_contract.md @@ -2,7 +2,14 @@ title: Foundry | Deploy Contract --- -:display-partial{path = "/_partials/_environment-setup-with-foundry"} +:display-partial{path = "/_partials/_foundry_alpha_warning"} + +Run the following command in your terminal to initialize the Foundry project. + +```sh +npx zksync-cli@latest create --template qs-fs-hello-zksync hello-zksync-foundry-quickstart +cd hello-zksync-foundry-quickstart +``` ## Set up your wallet @@ -13,7 +20,7 @@ title: Foundry | Deploy Contract This guide introduces a crowdfunding campaign contract aimed at supporting Zeek's inventive ventures. -Let's start by reviewing the starter contract in the [`src/` directory](https://github.com/dutterbutter/zksync-foundry-quickstart-guide/blob/main/src/Crowdfund.sol). +Let's start by reviewing the starter contract in the [`src/` directory](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/foundry/hello-zksync/src/Crowdfund.sol). ::drop-panel ::panel{label="CrowdfundingCampaign.sol"} @@ -103,7 +110,7 @@ located in the `/out` folder. ### Deploy the CrowdfundingCampaign contract -The deployment script is located at [`/script/Deploy.s.sol`](https://github.com/dutterbutter/zksync-foundry-quickstart-guide/blob/main/script/Deploy.s.sol). +The deployment script is located at [`/script/Deploy.s.sol`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/foundry/hello-zksync/script/Deploy.s.sol). ```solidity // SPDX-License-Identifier: UNLICENSED 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 ea9a312b..dee7efc8 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 @@ -5,7 +5,7 @@ title: Hardhat | Deploy Contract Run the following command in your terminal to initialize the project. ```sh -npx zksync-cli create --template qs-hello-zksync hello-zksync-quickstart +npx zksync-cli@latest create --template qs-hello-zksync hello-zksync-quickstart cd hello-zksync-quickstart ``` @@ -16,7 +16,7 @@ cd hello-zksync-quickstart ## Compile the CrowdfundingCampaign.sol contract This guide introduces a crowdfunding campaign contract aimed at supporting Zeek's inventive ventures. -Let's start by reviewing the starter contract in the [`contracts/` directory](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hello-zksync/contracts/Crowdfund.sol). +Let's start by reviewing the starter contract in the [`contracts/` directory](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/hello-zksync/contracts/Crowdfund.sol). ::drop-panel ::panel{label="CrowdfundingCampaign.sol"} @@ -96,7 +96,7 @@ The compiled artifacts will be located in the `/artifacts-zk` folder. ## Deploy the contract -The deployment script is located at [`/deploy/deploy.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hello-zksync/deploy/deploy.ts). +The deployment script is located at [`/deploy/deploy.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/hello-zksync/deploy/deploy.ts). ```typescript import { deployContract } from "./utils"; 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 b66fdd32..a5cb5b16 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 @@ -6,7 +6,7 @@ description: Learn to deploy contract factories in the ZKsync environment. Run the following command in your terminal to initialize the project. ```sh -npx zksync-cli create --template qs-paymaster contract-paymaster-quickstart +npx zksync-cli@latest create --template qs-paymaster contract-paymaster-quickstart cd contract-paymaster-quickstart ``` @@ -166,7 +166,7 @@ Successfully compiled 1 Solidity file The compiled artifacts will be located in the `/artifacts-zk` folder. -The script to deploy the `ApprovalFlowPaymaster` contract is located at `/deploy/deployApprovalFlowPaymaster.ts`. +The script to deploy the `ApprovalFlowPaymaster` contract is located at [`/deploy/deployApprovalFlowPaymaster.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/paymaster/deploy/deployApprovalFlowPaymaster.ts). ```typescript import { deployContract, getWallet, getProvider } from "./utils"; @@ -263,8 +263,9 @@ Paymaster ETH balance is now 5000000000000000 ## Interact with the `ApprovalFlowPaymaster` contract -This section will navigate you through the steps to interact with the `ApprovalFlowPaymaster` contract, -using it to cover transaction fees for your operation. +This section will navigate you through the steps to interact with the +[`ApprovalFlowPaymaster`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/paymaster/contracts/ApprovalFlowPaymaster.sol) +contract, using it to cover transaction fees for your operation. ### Obtain CROWN tokens @@ -287,7 +288,7 @@ Ensure that your wallet is connected and configured for the Sepolia network befo ### Interaction script -The interaction script is situated in the `/deploy/interact/` directory, named `interactWithApprovalFlowPaymaster.ts`. +The interaction script is situated in the `/deploy/interact/` directory, named [`interactWithApprovalFlowPaymaster.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/paymaster/deploy/interact/interactWithApprovalFlowPaymaster.ts). Ensure the `CONTRACT_ADDRESS` and `PAYMASTER_ADDRESS` variables are set to your deployed contract and paymaster addresses, respectively. 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 f951ec92..af5a7413 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 @@ -6,7 +6,7 @@ description: Learn to deploy contract factories in the ZKsync environment. Run the following command in your terminal to initialize the project. ```sh -npx zksync-cli create --template qs-paymaster contract-paymaster-quickstart +npx zksync-cli@latest create --template qs-paymaster contract-paymaster-quickstart cd contract-paymaster-quickstart ``` @@ -18,7 +18,8 @@ cd contract-paymaster-quickstart ## Understanding the `GeneralPaymaster` contract -Let's start by reviewing the `GeneralPaymaster.sol` contract in the `contracts/` directory: +Let's start by reviewing the [`GeneralPaymaster.sol`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/paymaster/contracts/GaslessPaymaster.sol) +contract in the `contracts/` directory: ::drop-panel ::panel{label="GeneralPaymaster.sol"} @@ -136,7 +137,7 @@ Successfully compiled 4 Solidity file The compiled artifacts will be located in the `/artifacts-zk` folder. -The script to deploy the `GaslessPaymaster` is located at `/deploy/deployGaslessPaymaster.ts`. +The script to deploy the `GaslessPaymaster` is located at [`/deploy/deployGaslessPaymaster.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/paymaster/deploy/deployGaslessPaymaster.ts). ```typescript import { deployContract, getWallet, getProvider } from "./utils"; @@ -234,7 +235,7 @@ Paymaster ETH balance is now 5000000000000000 This section will navigate you through the steps to interact with the `GeneralPaymaster` contract, using it to cover transaction fees for your operation. -The interaction script is situated in the `/deploy/interact/` directory, named `interactWithGaslessPaymaster.ts`. +The interaction script is situated in the `/deploy/interact/` directory, named [`interactWithGaslessPaymaster.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/paymaster/deploy/interact/interactWithGaslessPaymaster.ts). Ensure the `CONTRACT_ADDRESS` and `PAYMASTER_ADDRESS` variables are set to your deployed contract and paymaster addresses, respectively. diff --git a/content/00.build/10.quick-start/_testing/_foundry_contract_testing.md b/content/00.build/10.quick-start/_testing/_foundry_contract_testing.md index e1046b05..53000eb8 100644 --- a/content/00.build/10.quick-start/_testing/_foundry_contract_testing.md +++ b/content/00.build/10.quick-start/_testing/_foundry_contract_testing.md @@ -1,14 +1,14 @@ --- -title: Hardhat | Contract Testing +title: Foundry | Contract Testing --- - +:display-partial{path = "/_partials/_foundry_alpha_warning"} + Run the following command in your terminal to initialize the Foundry project. ```sh -git clone https://github.com/dutterbutter/zksync-foundry-quickstart-guide -cd zksync-foundry-quickstart-guide -git checkout db/contract-testing +npx zksync-cli@latest create --template qs-fs-testing foundry-contract-testing-quickstart +cd foundry-contract-testing-quickstart ``` --- @@ -91,7 +91,7 @@ For this particular guide we are making use of `zksolc`. To compile the contracts in the project, run the following command: ```bash -forge build --zksync +forge build --zksync --use 0.8.20 ``` Upon successful compilation, you'll receive output detailing the @@ -114,7 +114,7 @@ located in the `/out` folder. This section describes the testing `CrowdfundingCampaign.sol` contract. Let's start by reviewing the tests for `CrowdfundingCampaign.sol` contract provided during the initialization step in the `/test` directory, specifically the -[`CrowdfundingCampaign.t.sol` file](https://github.com/dutterbutter/zksync-foundry-quickstart-guide/blob/db/contract-testing/test/CrowdfundingCampaign.t.sol). +[`CrowdfundingCampaign.t.sol` file](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/foundry/testing/test/CrowdfundingCampaign.t.sol). ```solidity // SPDX-License-Identifier: MIT 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 a15c0dfa..97158a9a 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,7 +5,7 @@ title: Hardhat | Contract Testing Run the following command in your terminal to initialize the project. ```sh -npx zksync-cli create --template qs-testing contract-testing-quickstart +npx zksync-cli@latest create --template qs-testing contract-testing-quickstart cd contract-testing-quickstart ``` @@ -145,7 +145,7 @@ The compiled artifacts will be located in the `/artifacts-zk` folder. This section describes testing the `CrowdfundingCampaign.sol` contract. Let's start by reviewing the tests for `CrowdfundingCampaign.sol` contract provided 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/testing/test/crowdFunding.test.ts). +[`crowdFunding.test.ts` file](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/testing/test/crowdFunding.test.ts). ```typescript import { expect } from "chai"; 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 ea5cbb4b..5013d2c7 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 @@ -5,7 +5,7 @@ title: Hardhat | Contract Upgrading Run the following command in your terminal to initialize the project. ```sh -npx zksync-cli create --template qs-upgrade contract-upgrade-quickstart +npx zksync-cli@latest create --template qs-upgrade contract-upgrade-quickstart cd contract-upgrade-quickstart ``` @@ -22,7 +22,7 @@ transitioning to a proxy pattern. This approach separates the contract's logic (which can be upgraded) from its persistent state (stored in the proxy). -In the `contracts/` directory you'll observe the refactored the [`CrowdfundingCampaign` contract](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/contracts/CrowdfundingCampaign.sol) +In the `contracts/` directory you'll observe the refactored the [`CrowdfundingCampaign` contract](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/contracts/CrowdfundingCampaign.sol) which initializes state variables through an `initialize` function instead of the constructor, in line with the proxy pattern. @@ -121,7 +121,7 @@ The compiled artifacts will be located in the `/artifacts-zk` folder. ## Deploy the beacon and contract -You'll find the necessary deployment script at [`/deploy/deployBeaconProxy.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/deploy/deployBeaconProxy.ts). +You'll find the necessary deployment script at [`/deploy/deployBeaconProxy.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/deploy/deployBeaconProxy.ts). ```typescript import { getWallet } from "./utils"; @@ -229,7 +229,7 @@ this constraint, ensuring contributions are made within the allowed period. **Enhanced Contract:** -The upgraded contract, [`CrowdfundingCampaignV2.sol`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/contracts/CrowdfundingCampaignV2.sol), +The upgraded contract, [`CrowdfundingCampaignV2.sol`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/contracts/CrowdfundingCampaignV2.sol), located in the `/contracts` directory, incorporates these changes: @@ -278,7 +278,7 @@ The compiled artifacts will be located in the `/artifacts-zk` folder. ## Upgrade to `CrowdfundingCampaignV2` This section describes the upgrade process to `CrowdfundingCampaignV2.sol` contract. Let's -start by reviewing the [`upgradeBeaconCrowdfundingCampaign.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/deploy/upgrade-scripts/upgradeBeaconCrowdfundingCampaign.ts) +start by reviewing the [`upgradeBeaconCrowdfundingCampaign.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/deploy/upgrade-scripts/upgradeBeaconCrowdfundingCampaign.ts) script in the `deploy/upgrade-scripts` directory: Make sure to replace `YOUR_BEACON_ADDRESS_HERE` with the address of your deployed beacon and 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 0c617ba9..2f2edc9f 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 @@ -4,7 +4,7 @@ title: Hardhat | Contract Upgrading Run the following command in your terminal to initialize the project. ```sh -npx zksync-cli create --template qs-upgrade contract-upgrade-quickstart +npx zksync-cli@latest create --template qs-upgrade contract-upgrade-quickstart cd contract-upgrade-quickstart ``` @@ -25,7 +25,7 @@ contract's logic (which can be upgraded) from its persistent state ### Refactoring for Proxy Compatibility -In the `contracts/` directory you'll observe the refactored the [`CrowdfundingCampaign` contract](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/contracts/CrowdfundingCampaign.sol) +In the `contracts/` directory you'll observe the refactored the [`CrowdfundingCampaign` contract](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/contracts/CrowdfundingCampaign.sol) which initializes state variables through an `initialize` function instead of the constructor, in line with the Transparent Proxy pattern. @@ -123,7 +123,7 @@ Successfully compiled 3 Solidity file The compiled artifacts will be located in the `/artifacts-zk` folder. -The deployment script is located at [`/deploy/deployTransparentProxy.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/deploy/deployTransparentProxy.ts). +The deployment script is located at [`/deploy/deployTransparentProxy.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/deploy/deployTransparentProxy.ts). ```typescript import { getWallet } from "./utils"; @@ -222,7 +222,7 @@ this constraint, ensuring contributions are made within the allowed period. **Enhanced Contract:** -The upgraded contract, [`CrowdfundingCampaignV2.sol`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/contracts/CrowdfundingCampaignV2.sol), +The upgraded contract, [`CrowdfundingCampaignV2.sol`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/contracts/CrowdfundingCampaignV2.sol), located in the `/contracts` directory, incorporates these changes: - **Deadline Variable:** A new state variable deadline defines the campaign's end time, @@ -273,7 +273,7 @@ The compiled artifacts will be located in the `/artifacts-zk` folder. This section guides you through upgrading the `CrowdfundingCampaign` contract to its second version, `CrowdfundingCampaignV2`. -Review the [`upgradeCrowdfundingCampaign.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/deploy/upgrade-scripts/upgradeCrowdfundingCampaign.ts) +Review the [`upgradeCrowdfundingCampaign.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/deploy/upgrade-scripts/upgradeCrowdfundingCampaign.ts) script located within the `deploy/upgrade-scripts` directory to begin. Replace `YOUR_PROXY_ADDRESS_HERE` with the actual address of your 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 277f5c07..cd7849a0 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 @@ -5,7 +5,7 @@ title: Hardhat | Contract Upgrading Run the following command in your terminal to initialize the project. ```sh -npx zksync-cli create --template qs-upgrade contract-upgrade-quickstart +npx zksync-cli@latest create --template qs-upgrade contract-upgrade-quickstart cd contract-upgrade-quickstart ``` @@ -84,7 +84,7 @@ important for secure upgrade authorization. - **_authorizeUpgrade**: A safeguard function ensuring only the contract owner can perform upgrades, reinforcing the contract's security. -By adopting the UUPS pattern, the [`CrowdfundingCampaign_UUPS`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/contracts/CrowdfundingCampaign_UUPS.sol) +By adopting the UUPS pattern, the [`CrowdfundingCampaign_UUPS`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/contracts/CrowdfundingCampaign_UUPS.sol) contract becomes efficiently upgradeable, offering enhanced security and reduced gas costs, setting a solid foundation for future enhancements. --- @@ -131,7 +131,7 @@ The compiled artifacts will be located in the `/artifacts-zk` folder. ## Deploy the updated contract -The script to deploy the `CrowdfundingCampaign_UUPS` contract is located at [`/deploy/deployUUPS.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/deploy/deployUUPS.ts). +The script to deploy the `CrowdfundingCampaign_UUPS` contract is located at [`/deploy/deployUUPS.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/deploy/deployUUPS.ts). ```typescript import { getWallet } from "./utils"; @@ -232,7 +232,7 @@ this constraint, ensuring contributions are made within the allowed period. **Enhanced Contract:** -The upgraded contract, [`CrowdfundingCampaignV2_UUPS.sol`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/contracts/CrowdfundingCampaignV2_UUPS.sol), +The upgraded contract, [`CrowdfundingCampaignV2_UUPS.sol`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/contracts/CrowdfundingCampaignV2_UUPS.sol), located in the `/contracts` directory, incorporates these changes: - **Deadline Variable:** A new state variable deadline defines the campaign's end time, @@ -282,7 +282,7 @@ The compiled artifacts will be located in the `/artifacts-zk` folder. ### Upgrade to `CrowdfundingCampaignV2_UUPS` This section describes the initiating the upgrade to `CrowdfundingCampaignV2_UUPS.sol` contract. -Let's start by reviewing the [`upgradeUUPSCrowdfundingCampaign.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/upgradability/deploy/upgrade-scripts/upgradeUUPSCrowdfundingCampaign.ts) +Let's start by reviewing the [`upgradeUUPSCrowdfundingCampaign.ts`](https://github.com/matter-labs/zksync-contract-templates/blob/main/templates/quickstart/hardhat/upgradability/deploy/upgrade-scripts/upgradeUUPSCrowdfundingCampaign.ts) script in the `deploy/upgrade-scripts` directory: Replace `YOUR_PROXY_ADDRESS_HERE` with the actual address of your diff --git a/content/_partials/_environment-setup-with-foundry.md b/content/_partials/_environment-setup-with-foundry.md deleted file mode 100644 index bf33aab9..00000000 --- a/content/_partials/_environment-setup-with-foundry.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: foundry-zksync Installation ---- - -::callout{icon="i-heroicons-information-circle-16-solid" color="amber"} -`foundry-zksync` is still in an alpha stage, so some features might not be fully supported -yet and may not work as fully intended. It is open-sourced and contributions are welcomed. -:: - - -Run the following command in your terminal to create a new Foundry project using `foundry-zksync`. - - ```sh - forge init --template https://github.com/dutterbutter/zksync-foundry-quickstart-guide - ``` diff --git a/content/_partials/_foundry_alpha_warning.md b/content/_partials/_foundry_alpha_warning.md new file mode 100644 index 00000000..0ba84594 --- /dev/null +++ b/content/_partials/_foundry_alpha_warning.md @@ -0,0 +1,8 @@ +--- +title: foundry-zksync alpha warning +--- + +::callout{icon="i-heroicons-information-circle-16-solid" color="amber"} +`foundry-zksync` is still in an alpha stage, so some features might not be fully supported +yet and may not work as fully intended. It is open-sourced and contributions are welcomed. +::