From b7b21acab0814f0b7d856af9fe06a42522f21f49 Mon Sep 17 00:00:00 2001 From: Austin Griffith Date: Wed, 31 Aug 2022 14:05:36 -0600 Subject: [PATCH] use better gas defaults and etherscan api keys for testnet --- packages/hardhat/hardhat.config.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/hardhat/hardhat.config.js b/packages/hardhat/hardhat.config.js index ab6e3cd54..fb38bca14 100644 --- a/packages/hardhat/hardhat.config.js +++ b/packages/hardhat/hardhat.config.js @@ -29,8 +29,6 @@ const { isAddress, getAddress, formatUnits, parseUnits } = utils; // const defaultNetwork = "localhost"; -const mainnetGwei = 21; - function mnemonic() { try { return fs.readFileSync("./mnemonic.txt").toString().trim(); @@ -67,10 +65,10 @@ module.exports = { networks: { localhost: { url: "http://localhost:8545", - /* + /* notice no mnemonic here? it will just use account 0 of the hardhat node to deploy (you can put in a mnemonic here to set the deployer locally) - + */ }, rinkeby: { @@ -90,7 +88,6 @@ module.exports = { mainnet: { url: "https://mainnet.infura.io/v3/460f40a260564ac4a4f4b3fffb032dad", // <---- YOUR INFURA ID! (or it won't work) // url: "https://speedy-nodes-nyc.moralis.io/XXXXXXXXXXXXXXXXXXXXXXXXX/eth/mainnet", // <---- YOUR MORALIS ID! (not limited to infura) - gasPrice: mainnetGwei * 1000000000, accounts: { mnemonic: mnemonic(), }, @@ -111,7 +108,6 @@ module.exports = { }, xdai: { url: "https://rpc.xdaichain.com/", - gasPrice: 1000000000, accounts: { mnemonic: mnemonic(), }, @@ -133,7 +129,6 @@ module.exports = { polygon: { url: "https://polygon-rpc.com", // url: "https://speedy-nodes-nyc.moralis.io/XXXXXXXXXXXXXXXXXXXx/polygon/mainnet", // <---- YOUR MORALIS ID! (not limited to infura) - gasPrice: 3200000000, accounts: { mnemonic: mnemonic(), }, @@ -141,14 +136,12 @@ module.exports = { mumbai: { url: "https://rpc-mumbai.maticvigil.com", // url: "https://speedy-nodes-nyc.moralis.io/XXXXXXXXXXXXXXXXXXXXXXX/polygon/mumbai", // <---- YOUR MORALIS ID! (not limited to infura) - gasPrice: 3200000000, accounts: { mnemonic: mnemonic(), }, }, matic: { url: "https://rpc-mainnet.maticvigil.com/", - gasPrice: 1000000000, accounts: { mnemonic: mnemonic(), }, @@ -320,6 +313,10 @@ module.exports = { etherscan: { apiKey: { mainnet: "DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW", + goerli: "DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW", + kovan: "DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW", + rinkeby: "DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW", + ropsten: "DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW", // add other network's API key here }, },