This commit is contained in:
pradyuman-verma 2022-01-11 15:17:35 +05:30
parent 4138b37c58
commit ddb0a55af5
No known key found for this signature in database
GPG Key ID: E36FD6BC8923221F
2 changed files with 9 additions and 9 deletions

View File

@ -51,7 +51,7 @@ function getNetworkUrl(networkType: string) {
if (networkType === "avalanche") if (networkType === "avalanche")
return "https://api.avax.network/ext/bc/C/rpc"; return "https://api.avax.network/ext/bc/C/rpc";
else if (networkType === "polygon") else if (networkType === "polygon")
return `https://polygon-mainnet.g.alchemy.com/v2/${alchemyApiKey}`; return `https://polygon-mumbai.g.alchemy.com/v2/${alchemyApiKey}`;
else if (networkType === "arbitrum") else if (networkType === "arbitrum")
return `https://arb-mainnet.g.alchemy.com/v2/${alchemyApiKey}`; return `https://arb-mainnet.g.alchemy.com/v2/${alchemyApiKey}`;
else return `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`; else return `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`;
@ -112,7 +112,7 @@ const config: HardhatUserConfig = {
tests: "./test", tests: "./test",
}, },
etherscan: { etherscan: {
apiKey: getScanApiKey(getNetworkUrl(String(process.env.networkType))), apiKey: "VT3JEKZ573EIRIMBRREREV2NNJ18NVNI51",
}, },
typechain: { typechain: {
outDir: "typechain", outDir: "typechain",

View File

@ -3,7 +3,7 @@ import inquirer from "inquirer";
import { connectors, connectMapping } from "./connectors"; import { connectors, connectMapping } from "./connectors";
import { join } from "path"; import { join } from "path";
let start: number, end: number; let start: number, end: number, runchain: string;
async function connectorSelect(chain: string) { async function connectorSelect(chain: string) {
let { connector } = await inquirer.prompt([ let { connector } = await inquirer.prompt([
@ -46,18 +46,18 @@ async function deployRunner() {
let { choice1 } = await inquirer.prompt([ let { choice1 } = await inquirer.prompt([
{ {
name: "choice", name: "choice1",
message: "Do you wanna try deploy on hardhat first?", message: "Do you wanna try deploy on hardhat first?",
type: "list", type: "list",
choices: ["yes", "no"], choices: ["yes", "no"],
}, },
]); ]);
if (choice1 === "yes") { runchain = choice1 === "yes" ? "hardhat" : chain;
chain = "hardhat";
}
console.log(`Deploying ${connector} on ${chain}, press (ctrl + c) to stop`); console.log(
`Deploying ${connector} on ${runchain}, press (ctrl + c) to stop`
);
start = Date.now(); start = Date.now();
await execScript({ await execScript({
@ -67,7 +67,7 @@ async function deployRunner() {
"run", "run",
"scripts/deployment/deploy.ts", "scripts/deployment/deploy.ts",
"--network", "--network",
`${chain}`, `${runchain}`,
], ],
env: { env: {
connectorName: connector, connectorName: connector,