From 25b62b0c7bb994c9459d826d0ff76fed6f3c4358 Mon Sep 17 00:00:00 2001 From: Maksim Kiselev Date: Tue, 4 Jun 2024 17:30:51 +0200 Subject: [PATCH] Added mainnet settings --- .env.mock | 5 ++++- hardhat.config.js | 13 ++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.env.mock b/.env.mock index 6be7459..f27648a 100644 --- a/.env.mock +++ b/.env.mock @@ -3,5 +3,8 @@ UNSTAKEPERIOD=2592000 REWARD_POOL_ADDRESS= POLYGONSCAN_API_KEY=1N..XX +ETHERSCAN_API_KEY=1N..XX MUMBAI_PRIVATE_KEY=db0e..82c2 -POLYGON_PRIVATE_KEY=db0e..82c2 \ No newline at end of file +POLYGON_PRIVATE_KEY=db0e..82c2 +MAINNET_PRIVATE_KEY=db0e..82c2 +INFURA_API_KEY= \ No newline at end of file diff --git a/hardhat.config.js b/hardhat.config.js index a9428d5..35a0ebe 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -4,9 +4,12 @@ require("hardhat-contract-sizer"); require("hardhat-gas-reporter"); require("dotenv").config(); +const MAINNET_PRIVATE_KEY = process.env.MAINNET_PRIVATE_KEY || ""; const MUMBAI_PRIVATE_KEY = process.env.MUMBAI_PRIVATE_KEY || ""; const POLYGON_PRIVATE_KEY = process.env.POLYGON_PRIVATE_KEY || ""; const POLYGONSCAN_API_KEY = process.env.POLYGONSCAN_API_KEY || ""; +const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || ""; +const INFURA_API_KEY = process.env.INFURA_API_KEY || ""; const exportNetworks = { hardhat: { @@ -25,11 +28,18 @@ if (MUMBAI_PRIVATE_KEY != "") { if (POLYGON_PRIVATE_KEY != "") { exportNetworks["polygon"] = { - url: "https://polygon-bor-rpc.publicnode.com", + url: "https://polygon-rpc.com", accounts: [`${POLYGON_PRIVATE_KEY}`], }; } +if (MAINNET_PRIVATE_KEY != "") { + exportNetworks["mainnet"] = { + url: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`, + accounts: [`${MAINNET_PRIVATE_KEY}`] + } +} + module.exports = { solidity: { compilers: [ @@ -51,6 +61,7 @@ module.exports = { apiKey: { mumbai: POLYGONSCAN_API_KEY, polygon: POLYGONSCAN_API_KEY, + mainnet: ETHERSCAN_API_KEY, }, }, contractSizer: {