forked from DAObox/lens-voting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
66 lines (59 loc) · 1.59 KB
/
hardhat.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import * as dotenv from "dotenv";
import fs from "fs";
import path from "path";
import "@nomicfoundation/hardhat-chai-matchers";
import "@nomiclabs/hardhat-etherscan";
import "@typechain/hardhat";
import "hardhat-deploy";
import "@openzeppelin/hardhat-upgrades";
dotenv.config();
const ETH_KEY = process.env.ETH_KEY;
const accounts = ETH_KEY ? ETH_KEY.split(",") : [];
const networks = JSON.parse(
fs.readFileSync(path.join(__dirname, "./networks.json"), "utf8")
);
// add accounts to network configs
for (const network of Object.keys(networks)) {
networks[network].accounts = accounts;
}
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
const config = {
solidity: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 2000,
},
},
},
defaultNetwork: "hardhat",
networks: {
local: {
url: "http://localhost:8545",
maxPriorityFeePerGas: "2 gwei",
maxFeePerGas: "100 gwei",
},
hardhat: {
throwOnTransactionFailures: true,
throwOnCallFailures: true,
blockGasLimit: 3000000000, // really high to test some things that are only possible with a higher block gas limit
gasPrice: 8000000000,
},
...networks,
},
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_KEY || "",
goerli: process.env.ETHERSCAN_KEY || "",
polygon: process.env.POLYGONSCAN_KEY || "",
polygonMumbai: process.env.POLYGONSCAN_KEY || "",
},
customChains: [],
},
namedAccounts: {
deployer: 0,
},
};
export default config;