Skip to content

Commit

Permalink
add(sepolia): as the main testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbionaHoti committed Dec 5, 2023
1 parent 996c50b commit 3a1b759
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 36 deletions.
10 changes: 6 additions & 4 deletions contracts/deploy/allowListPaymaster.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
9 changes: 4 additions & 5 deletions contracts/deploy/erc20.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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);
Expand Down
10 changes: 6 additions & 4 deletions contracts/deploy/erc20fixedPaymaster.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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);
Expand Down
7 changes: 4 additions & 3 deletions contracts/deploy/erc721.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions contracts/deploy/erc721gatedPaymaster.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions contracts/deploy/gaslessPaymaster.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions contracts/deploy/timeBasedPaymaster.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/constants/consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/";

0 comments on commit 3a1b759

Please sign in to comment.