diff --git a/contracts/deploy/allowListPaymaster.ts b/contracts/deploy/allowListPaymaster.ts index f61877a..ce753a2 100644 --- a/contracts/deploy/allowListPaymaster.ts +++ b/contracts/deploy/allowListPaymaster.ts @@ -1,10 +1,12 @@ -import { Provider, Wallet } from "zksync-web3"; import * as ethers from "ethers"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { Provider, Wallet } from "zksync-web3"; + +import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; // load env file import dotenv from "dotenv"; + dotenv.config(); // load wallet private key from env file @@ -15,7 +17,7 @@ if (!PRIVATE_KEY) export default async function (hre: HardhatRuntimeEnvironment) { console.log(`Running deploy script for the AllowlistPaymaster contract...`); - const provider = new Provider("https://testnet.era.zksync.dev"); + const provider = new Provider("https://sepolia.era.zksync.dev"); // The wallet that will deploy the token and the paymaster // It is assumed that this wallet already has sufficient funds on zkSync diff --git a/contracts/deploy/erc20.ts b/contracts/deploy/erc20.ts index e8c375e..f8dbec3 100644 --- a/contracts/deploy/erc20.ts +++ b/contracts/deploy/erc20.ts @@ -1,10 +1,11 @@ -import { Provider, Wallet } from "zksync-web3"; import * as ethers from "ethers"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { Wallet } from "zksync-web3"; // load env file import dotenv from "dotenv"; + dotenv.config(); // load wallet private key from env file @@ -20,8 +21,6 @@ if (!RECIPIENT_ADDRESS) export default async function (hre: HardhatRuntimeEnvironment) { console.log(`Running deploy script for the MyERC20 contract...`); - const provider = new Provider("https://testnet.era.zksync.dev"); - // The wallet that will deploy the token and the paymaster // It is assumed that this wallet already has sufficient funds on zkSync const wallet = new Wallet(PRIVATE_KEY); diff --git a/contracts/deploy/erc20fixedPaymaster.ts b/contracts/deploy/erc20fixedPaymaster.ts index a30d5de..0e9af2f 100644 --- a/contracts/deploy/erc20fixedPaymaster.ts +++ b/contracts/deploy/erc20fixedPaymaster.ts @@ -1,10 +1,12 @@ -import { Provider, Wallet } from "zksync-web3"; import * as ethers from "ethers"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { Provider, Wallet } from "zksync-web3"; + +import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; // load env file import dotenv from "dotenv"; + dotenv.config(); // load wallet private key from env file @@ -20,7 +22,7 @@ if (!TOKEN_ADDRESS) export default async function (hre: HardhatRuntimeEnvironment) { console.log(`Running deploy script for the ERC20fixedPaymaster contract...`); - const provider = new Provider("https://testnet.era.zksync.dev"); + const provider = new Provider("https://sepolia.era.zksync.dev/"); // The wallet that will deploy the token and the paymaster // It is assumed that this wallet already has sufficient funds on zkSync const wallet = new Wallet(PRIVATE_KEY); diff --git a/contracts/deploy/erc721.ts b/contracts/deploy/erc721.ts index 3337043..b2cf9f6 100644 --- a/contracts/deploy/erc721.ts +++ b/contracts/deploy/erc721.ts @@ -1,9 +1,10 @@ import { Provider, Wallet } from "zksync-web3"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; // load env file import dotenv from "dotenv"; + dotenv.config(); // load wallet private key from env file @@ -19,7 +20,7 @@ if (!RECIPIENT_ADDRESS) export default async function (hre: HardhatRuntimeEnvironment) { console.log(`Running deploy script for the MyNFT contract...`); - const provider = new Provider("https://testnet.era.zksync.dev"); + const provider = new Provider("https://sepolia.era.zksync.dev/"); // The wallet that will deploy the token and the paymaster // It is assumed that this wallet already has sufficient funds on zkSync diff --git a/contracts/deploy/erc721gatedPaymaster.ts b/contracts/deploy/erc721gatedPaymaster.ts index 5014d57..38f6524 100644 --- a/contracts/deploy/erc721gatedPaymaster.ts +++ b/contracts/deploy/erc721gatedPaymaster.ts @@ -1,10 +1,12 @@ -import { Provider, Wallet } from "zksync-web3"; import * as ethers from "ethers"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { Provider, Wallet } from "zksync-web3"; + +import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; // load env file import dotenv from "dotenv"; + dotenv.config(); // load wallet private key from env file @@ -20,7 +22,7 @@ if (!NFT_COLLECTION_ADDRESS) export default async function (hre: HardhatRuntimeEnvironment) { console.log(`Running deploy script for the ERC721gatedPaymaster contract...`); - const provider = new Provider("https://testnet.era.zksync.dev"); + const provider = new Provider("https://sepolia.era.zksync.dev/"); // The wallet that will deploy the token and the paymaster // It is assumed that this wallet already has sufficient funds on zkSync diff --git a/contracts/deploy/gaslessPaymaster.ts b/contracts/deploy/gaslessPaymaster.ts index 43d1521..21a5d54 100644 --- a/contracts/deploy/gaslessPaymaster.ts +++ b/contracts/deploy/gaslessPaymaster.ts @@ -1,10 +1,12 @@ -import { Provider, Wallet } from "zksync-web3"; import * as ethers from "ethers"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { Provider, Wallet } from "zksync-web3"; + +import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; // load env file import dotenv from "dotenv"; + dotenv.config(); // load wallet private key from env file @@ -15,7 +17,7 @@ if (!PRIVATE_KEY) export default async function (hre: HardhatRuntimeEnvironment) { console.log(`Running deploy script for the GaslessPaymaster contract...`); - const provider = new Provider("https://testnet.era.zksync.dev"); + const provider = new Provider("https://sepolia.era.zksync.dev/"); // The wallet that will deploy the token and the paymaster // It is assumed that this wallet already has sufficient funds on zkSync diff --git a/contracts/deploy/timeBasedPaymaster.ts b/contracts/deploy/timeBasedPaymaster.ts index 469cb49..b505978 100644 --- a/contracts/deploy/timeBasedPaymaster.ts +++ b/contracts/deploy/timeBasedPaymaster.ts @@ -1,10 +1,12 @@ -import { Provider, Wallet } from "zksync-web3"; import * as ethers from "ethers"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { Provider, Wallet } from "zksync-web3"; + +import { Deployer } from "@matterlabs/hardhat-zksync-deploy"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; // load env file import dotenv from "dotenv"; + dotenv.config(); // load wallet private key from env file @@ -15,7 +17,7 @@ if (!PRIVATE_KEY) export default async function (hre: HardhatRuntimeEnvironment) { console.log(`Running deploy script for the TimeBasedPaymaster contract...`); - const provider = new Provider("https://testnet.era.zksync.dev"); + const provider = new Provider("https://sepolia.era.zksync.dev/"); const wallet = new Wallet(PRIVATE_KEY); const deployer = new Deployer(hre, wallet); diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 8cb3bc0..eb46829 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -1,10 +1,10 @@ -import { HardhatUserConfig } from "hardhat/config"; - import "@matterlabs/hardhat-zksync-deploy"; import "@matterlabs/hardhat-zksync-solc"; import "@matterlabs/hardhat-zksync-verify"; import "@nomiclabs/hardhat-etherscan"; +import { HardhatUserConfig } from "hardhat/config"; + const getNetworkConfig = () => { const env = process.env.DEPLOY_ENV || "local"; switch (env) { @@ -17,17 +17,17 @@ const getNetworkConfig = () => { case "ci": return { url: "http://127.0.0.1:8011", - ethNetwork: "goerli", + ethNetwork: "sepolia", zksync: true, }; case "testnet": return { - url: "https://zksync2-testnet.zksync.dev", - ethNetwork: "goerli", + url: "https://sepolia.era.zksync.dev", + ethNetwork: "sepolia", zksync: true, - // Verification endpoint for Goerli + // Verification endpoint for Sepolia verifyURL: - "https://zksync2-testnet-explorer.zksync.dev/contract_verification", + "https://explorer.sepolia.era.zksync.dev/contract_verification", }; default: throw new Error(`Unsupported DEPLOY_ENV: ${env}`); diff --git a/frontend/src/constants/consts.js b/frontend/src/constants/consts.js index ee660b2..79ec223 100644 --- a/frontend/src/constants/consts.js +++ b/frontend/src/constants/consts.js @@ -11,4 +11,4 @@ export const ERC721_GATED_PAYMASTER = "ERC721Gated Paymaster 🎨"; export const ERC20_GATED_PAYMASTER = "ERC20Fixed Paymaster 🎫"; export const GASLESS_PAYMASTER = "Gasless Paymaster 🆓"; export const ALLOWLIST_PAYMASTER = "Allowlist Paymaster 📜"; -export const TESTNET_EXPLORER_URL = "https://goerli.explorer.zksync.io/tx/"; +export const TESTNET_EXPLORER_URL = "https://sepolia.explorer.zksync.io/";