update hardhat.config

This commit is contained in:
pk1411 2022-03-04 10:25:08 +05:30
parent 6965116993
commit 6f67400b62

View File

@ -41,17 +41,17 @@ const 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";
const networkGasPriceConfig: Record<string, Number> = { const networkGasPriceConfig: Record<string, Number> = {
"mainnet": 160000000000, "mainnet": 160,
"polygon": 50000000000, "polygon": 50,
"avalanche": 50000000000, "avalanche": 25,
"arbitrum": 2000000000 "arbitrum":1,
} }
function createConfig(network: string) { function createConfig(network: string) {
return { return {
url: getNetworkUrl(network), url: getNetworkUrl(network),
accounts: !!PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : { mnemonic }, accounts: !!PRIVATE_KEY ? [`0x${PRIVATE_KEY}`] : { mnemonic },
// gasPrice: 1000000, // 0.0001 GWEI gasPrice: Number(networkGasPriceConfig[network])*1e9, // 0.0001 GWEI
}; };
} }
@ -109,7 +109,7 @@ const config: HardhatUserConfig = {
avalanche: createConfig("avalanche"), avalanche: createConfig("avalanche"),
arbitrum: createConfig("arbitrum"), arbitrum: createConfig("arbitrum"),
optimism: createConfig("optimism"), optimism: createConfig("optimism"),
}, },
paths: { paths: {
artifacts: "./artifacts", artifacts: "./artifacts",
cache: "./cache", cache: "./cache",