mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
removed testnetwork support
This commit is contained in:
parent
66030dc0bb
commit
764098f2fa
|
@ -43,24 +43,7 @@ const mnemonic =
|
||||||
process.env.MNEMONIC ??
|
process.env.MNEMONIC ??
|
||||||
"test test test test test test test test test test test junk";
|
"test test test test test test test test test test test junk";
|
||||||
|
|
||||||
function createTestnetConfig(
|
function createConfig(network: string) {
|
||||||
network: keyof typeof chainIds
|
|
||||||
): NetworkUserConfig {
|
|
||||||
const url: string =
|
|
||||||
"https://eth-" + network + ".alchemyapi.io/v2/" + alchemyApiKey;
|
|
||||||
return {
|
|
||||||
accounts: {
|
|
||||||
count: 10,
|
|
||||||
initialIndex: 0,
|
|
||||||
mnemonic,
|
|
||||||
path: "m/44'/60'/0'/0",
|
|
||||||
},
|
|
||||||
chainId: chainIds[network],
|
|
||||||
url,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function createCofig(network: string) {
|
|
||||||
return {
|
return {
|
||||||
url: getNetworkUrl(network),
|
url: getNetworkUrl(network),
|
||||||
accounts: !!PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : { mnemonic },
|
accounts: !!PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : { mnemonic },
|
||||||
|
@ -121,14 +104,10 @@ const config: HardhatUserConfig = {
|
||||||
url: String(getNetworkUrl(String(process.env.networkType))),
|
url: String(getNetworkUrl(String(process.env.networkType))),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mainnet: createCofig("mainnet"),
|
mainnet: createConfig("mainnet"),
|
||||||
polygon: createCofig("polygon"),
|
polygon: createConfig("polygon"),
|
||||||
avalanche: createCofig("avalanche"),
|
avalanche: createConfig("avalanche"),
|
||||||
arbitrum: createCofig("arbitrum"),
|
arbitrum: createConfig("arbitrum"),
|
||||||
goerli: createTestnetConfig("goerli"),
|
|
||||||
kovan: createTestnetConfig("kovan"),
|
|
||||||
rinkeby: createTestnetConfig("rinkeby"),
|
|
||||||
ropsten: createTestnetConfig("ropsten"),
|
|
||||||
},
|
},
|
||||||
paths: {
|
paths: {
|
||||||
artifacts: "./artifacts",
|
artifacts: "./artifacts",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user