-
Notifications
You must be signed in to change notification settings - Fork 4
/
hardhat.config.ts
110 lines (106 loc) · 2.32 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import * as dotenv from "dotenv";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-ethers";
import "@typechain/hardhat";
import "hardhat-contract-sizer";
import "hardhat-gas-reporter";
import "@nomiclabs/hardhat-etherscan";
import "hardhat-deploy";
import "solidity-coverage";
import "@openzeppelin/hardhat-upgrades";
import { HardhatUserConfig } from "hardhat/types";
import { BLOCK_NUMBER } from "./test/constants";
dotenv.config();
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
solidity: {
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 100000,
},
},
},
networks: {
hardhat: {
chainId: 1,
accounts: {
mnemonic: process.env.MNEMONIC,
},
forking: {
url: process.env.MAINNET_URL || "",
blockNumber: BLOCK_NUMBER,
enabled: true, // Set to false to disable forked mainnet mode
},
},
goerli: {
url: process.env.GOERLI_URL || "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
rinkeby: {
url: process.env.RINKEBY_URL || "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
mainnet: {
url: process.env.MAINNET_URL || "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
paths: {
deploy: "./scripts/deploy",
deployments: "./deployments",
sources: "./src/contracts",
},
namedAccounts: {
admin: {
default: 0,
},
daoTreasury: {
default: 1,
},
staker1: {
default: 2,
},
staker2: {
default: 3,
},
staker3: {
default: 4,
},
stakingContractMock: {
default: 5,
},
liquidityProvider1: {
default: 6,
},
liquidityProvider2: {
default: 7,
},
liquidityProvider3: {
default: 8,
},
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
},
gasReporter: {
enabled: false,
currency: "USD",
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
mocha: {
timeout: 130000,
},
};
export default config;