|
@@ -35,12 +35,11 @@ if (!infuraApiKey) {
|
|
|
throw new Error("Please set your INFURA_API_KEY in a .env file");
|
|
|
}
|
|
|
|
|
|
-function createTestnetConfig(network: keyof typeof chainIds): NetworkUserConfig {
|
|
|
+function getChainConfig(network: keyof typeof chainIds): NetworkUserConfig {
|
|
|
const url: string = "https://" + network + ".infura.io/v3/" + infuraApiKey;
|
|
|
return {
|
|
|
accounts: {
|
|
|
count: 10,
|
|
|
- initialIndex: 0,
|
|
|
mnemonic,
|
|
|
path: "m/44'/60'/0'/0",
|
|
|
},
|
|
@@ -64,10 +63,10 @@ const config: HardhatUserConfig = {
|
|
|
},
|
|
|
chainId: chainIds.hardhat,
|
|
|
},
|
|
|
- goerli: createTestnetConfig("goerli"),
|
|
|
- kovan: createTestnetConfig("kovan"),
|
|
|
- rinkeby: createTestnetConfig("rinkeby"),
|
|
|
- ropsten: createTestnetConfig("ropsten"),
|
|
|
+ goerli: getChainConfig("goerli"),
|
|
|
+ kovan: getChainConfig("kovan"),
|
|
|
+ rinkeby: getChainConfig("rinkeby"),
|
|
|
+ ropsten: getChainConfig("ropsten"),
|
|
|
},
|
|
|
paths: {
|
|
|
artifacts: "./artifacts",
|