diff --git a/hardhat.config.ts b/hardhat.config.ts index 94eaa311..fa9c282e 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -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 { diff --git a/scripts/tests/deployAndEnableConnector.ts b/scripts/tests/deployAndEnableConnector.ts index 8e1f5d4b..e08142e4 100644 --- a/scripts/tests/deployAndEnableConnector.ts +++ b/scripts/tests/deployAndEnableConnector.ts @@ -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; }