This commit is contained in:
pradyuman-verma 2021-12-11 03:42:05 +05:30
parent 9efae44e2a
commit 7866a4553f
2 changed files with 9 additions and 3 deletions

View File

@ -34,13 +34,17 @@ if (!alchemyApiKey) {
throw new Error("Please set your ALCHEMY_API_KEY in a .env file");
}
const PRIVATE_KEY = process.env.PRIVATE_KEY;
let PRIVATE_KEY;
const ETHERSCAN_API = process.env.ETHERSCAN_API_KEY;
const POLYGONSCAN_API = process.env.POLYGON_API_KEY;
const ARBISCAN_API = process.env.ARBISCAN_API_KEY;
const SNOWTRACE_API = process.env.SNOWTRACE_API_KEY;
const mnemonic = process.env.MNEMONIC;
if(!mnemonic) {
PRIVATE_KEY = process.env.PRIVATE_KEY
}
function createTestnetConfig(
network: keyof typeof chainIds
): NetworkUserConfig {

View File

@ -1,6 +1,8 @@
import { addresses as addressesPolygon } from "./polygon/addresses";
import { addresses } from "./mainnet/addresses";
import { abis } from "../constant/abis";
import { addresses as addressesArbitrum } from "./arbitrum/addresses";
import { addresses as addressesAvalanche } from "./avalanche/addresses";
import hre from "hardhat";
import type { Signer, Contract } from "ethers";
@ -18,8 +20,8 @@ interface DeployInterface {
function getAddress(network: string | undefined) {
if (network === "polygon") return addressesPolygon;
// else if (network === "arbitrum") return addressesPolygon;
// else if (network === "avalanche") return addressesPolygon;
else if (network === "arbitrum") return addressesArbitrum;
else if (network === "avalanche") return addressesAvalanche;
else return addresses;
}