From 1e4dcd4e29c8b6a65aeab595282d3c06bd2762cf Mon Sep 17 00:00:00 2001 From: Jen <60794961+jennyg0@users.noreply.github.com> Date: Mon, 26 Aug 2024 17:42:54 -0400 Subject: [PATCH] fix: update 101 templates (#23) --- templates/101/deploy/2-contract-factory/deploy.ts | 2 +- templates/101/deploy/3-proxy-contracts/uups/upgrade.ts | 4 ++-- templates/101/deploy/4-paymaster/approval/interact.ts | 2 +- templates/101/package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/101/deploy/2-contract-factory/deploy.ts b/templates/101/deploy/2-contract-factory/deploy.ts index 67240bb..7adb7d5 100644 --- a/templates/101/deploy/2-contract-factory/deploy.ts +++ b/templates/101/deploy/2-contract-factory/deploy.ts @@ -1,4 +1,4 @@ -import { deployContract, getWallet } from "../utils"; +import { deployContract, getWallet } from "../../utils"; import { ethers } from "ethers"; import { HardhatRuntimeEnvironment } from "hardhat/types"; diff --git a/templates/101/deploy/3-proxy-contracts/uups/upgrade.ts b/templates/101/deploy/3-proxy-contracts/uups/upgrade.ts index 52aeb7c..02fd447 100644 --- a/templates/101/deploy/3-proxy-contracts/uups/upgrade.ts +++ b/templates/101/deploy/3-proxy-contracts/uups/upgrade.ts @@ -3,7 +3,7 @@ import { Deployer } from "@matterlabs/hardhat-zksync"; import { HardhatRuntimeEnvironment } from "hardhat/types"; // Replace with the address of the proxy contract you want to upgrade -const proxyAddress = "0x60Aa68f9D0D736B9a0a716d04323Ba3b22602840"; +const proxyAddress = "YOUR_PROXY_ADDRESS_HERE"; export default async function (hre: HardhatRuntimeEnvironment) { const wallet = getWallet(); @@ -30,5 +30,5 @@ export default async function (hre: HardhatRuntimeEnvironment) { const initTx = await upgradedContract.initializeV2(durationInSeconds); const receipt = await initTx.wait(); - console.log("V2_UUPSCrowdfundingCampaign initialized!", receipt.hash); + console.log("V2_UUPSCrowdfundingCampaign initialized! Transaction Hash: ", receipt.hash); } diff --git a/templates/101/deploy/4-paymaster/approval/interact.ts b/templates/101/deploy/4-paymaster/approval/interact.ts index efa021a..17176ac 100644 --- a/templates/101/deploy/4-paymaster/approval/interact.ts +++ b/templates/101/deploy/4-paymaster/approval/interact.ts @@ -29,7 +29,7 @@ export default async function (hre: HardhatRuntimeEnvironment) { const contract = new ethers.Contract( await deployedContract.getAddress(), contractArtifact.abi, - getWallet(LOCAL_RICH_WALLETS[1].privateKey) + getWallet(LOCAL_RICH_WALLETS[0].privateKey) ); const contributionAmount = ethers.parseEther("0.0001"); diff --git a/templates/101/package.json b/templates/101/package.json index a5e6930..7ab529f 100644 --- a/templates/101/package.json +++ b/templates/101/package.json @@ -16,7 +16,7 @@ ], "scripts": { "deploy:hello-zksync": "hardhat deploy-zksync --script 1-hello-zksync/deploy.ts", - "deploy:crowdfunding-factory": "hardhat deploy-zksync --script 2-crowdfunding-factory/deploy.ts", + "deploy:crowdfunding-factory": "hardhat deploy-zksync --script 2-contract-factory/deploy.ts", "test:crowdfunding-campaign": "hardhat test --network hardhat test/1-hello-zksync/CrowdfundingCampaign.test.ts", "deploy:transparent-proxy": "hardhat deploy-zksync --script 3-proxy-contracts/transparent/deploy.ts", "upgrade:transparent-proxy": "hardhat deploy-zksync --script 3-proxy-contracts/transparent/upgrade.ts",