From d6aaa161fdbfce439b31fe7f0422749de089ab03 Mon Sep 17 00:00:00 2001 From: pradyuman-verma Date: Sat, 15 Jan 2022 00:04:47 +0530 Subject: [PATCH] added optimism --- hardhat.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hardhat.config.ts b/hardhat.config.ts index df8fc553..94542cf8 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -23,6 +23,7 @@ const chainIds = { avalanche: 43114, polygon: 137, arbitrum: 42161, + optimism: 10 }; const alchemyApiKey = process.env.ALCHEMY_API_KEY; @@ -50,6 +51,7 @@ function createConfig(network: string) { return { url: getNetworkUrl(network), accounts: !!PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : { mnemonic }, + // gasPrice: 1000000, // 0.0001 GWEI }; } @@ -60,6 +62,8 @@ function getNetworkUrl(networkType: string) { return `https://polygon-mainnet.g.alchemy.com/v2/${alchemyApiKey}`; else if (networkType === "arbitrum") return `https://arb-mainnet.g.alchemy.com/v2/${alchemyApiKey}`; + else if (networkType === "optimism") + return `https://opt-mainnet.g.alchemy.com/v2/${alchemyApiKey}`; else return `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`; } @@ -111,6 +115,7 @@ const config: HardhatUserConfig = { polygon: createConfig("polygon"), avalanche: createConfig("avalanche"), arbitrum: createConfig("arbitrum"), + optimism: createConfig("optimism"), }, paths: { artifacts: "./artifacts",