-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.js
177 lines (174 loc) · 4.73 KB
/
hardhat.config.js
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
require("dotenv").config();
require("@1hive/hardhat-aragon");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-truffle5");
require("@nomiclabs/hardhat-web3");
require("hardhat-deploy");
require("hardhat-deploy-tenderly");
require("hardhat-gas-reporter");
require("solidity-coverage");
const { node_url, accounts, account } = require("./utils/network");
process.removeAllListeners("warning");
module.exports = {
solidity: {
compilers: [
{
version: "0.4.24",
settings: {
optimizer: {
enabled: true,
runs: 1000, // Set to 1000 for bytesize restricted envs
},
},
},
{
version: "0.5.17",
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
},
},
],
},
aragon: {
appEnsName: "disputable-voting.open.aragonpm.eth",
appContractName: "DisputableVoting",
appRoles: [
{
name: "Create new votes",
id: "CREATE_VOTES_ROLE",
params: ["Sender"],
},
{
name: "Challenge votes",
id: "CHALLENGE_ROLE",
params: [],
},
{
name: "Modify vote time",
id: "CHANGE_VOTE_TIME_ROLE",
params: ["New vote time"],
},
{
name: "Modify support",
id: "CHANGE_SUPPORT_ROLE",
params: ["New required support"],
},
{
name: "Modify quorum",
id: "CHANGE_QUORUM_ROLE",
params: ["New minimum acceptance quorum"],
},
{
name: "Modify delegated voting period",
id: "CHANGE_DELEGATED_VOTING_PERIOD_ROLE",
params: ["New delegated voting period"],
},
{
name: "Modify quiet ending configuration",
id: "CHANGE_QUIET_ENDING_ROLE",
params: ["New quiet ending period", "New quiet ending extension"],
},
{
name: "Modify execution delay",
id: "CHANGE_EXECUTION_DELAY_ROLE",
params: ["New execution delay"],
},
{
name: "Set agreement",
id: "SET_AGREEMENT_ROLE",
params: [],
},
],
},
networks: {
hardhat: {
// process.env.HARDHAT_FORK will specify the network that the fork is made from.
// this line ensure the use of the corresponding accounts
accounts: accounts(process.env.HARDHAT_FORK),
forking: process.env.HARDHAT_FORK
? {
url: node_url(process.env.HARDHAT_FORK),
blockNumber: process.env.HARDHAT_FORK_NUMBER
? parseInt(process.env.HARDHAT_FORK_NUMBER)
: undefined,
}
: undefined,
},
localhost: {
url: node_url("localhost"),
accounts: accounts(),
ensRegistry: "0x4E065c622d584Fbe5D9078C3081840155FA69581",
},
mainnet: {
url: node_url("mainnet"),
accounts: accounts("mainnet"),
},
goerli: {
url: node_url("goerli"),
accounts: accounts("goerli"),
ensRegistry: "0x8cF5A255ED61F403837F040B8D9f052857469273",
},
ropsten: {
url: node_url("ropsten"),
accounts: accounts("ropsten"),
ensRegistry: "0x6afe2cacee211ea9179992f89dc61ff25c61e923",
},
xdai: {
url: node_url("xdai"),
accounts: account("xdai"),
ensRegistry: "0xaafca6b0c89521752e559650206d7c925fd0e530",
},
polygon: {
url: node_url("polygon"),
accounts: accounts("polygon"),
ensRegistry: "0x7EdE100965B1E870d726cD480dD41F2af1Ca0130",
},
mumbai: {
url: node_url("mumbai"),
accounts: account("mumbai"),
ensRegistry: "0xB1576a9bE5EC445368740161174f3Dd1034fF8be"
},
arbitrum: {
url: node_url("arbitrum"),
accounts: accounts("arbitrum"),
ensRegistry: "0xB1576a9bE5EC445368740161174f3Dd1034fF8be",
},
arbtest: {
url: node_url("arbtest"),
accounts: accounts("arbtest"),
ensRegistry: "0x73ddD4B38982aB515daCf43289B41706f9A39199",
},
frame: {
url: "http://localhost:1248",
httpHeaders: { origin: "hardhat" },
timeout: 0,
gas: 0,
},
},
ipfs: {
gateway: "https://ipfs.blossom.software/",
pinata: {
key: process.env.PINATA_KEY || "",
secret: process.env.PINATA_SECRET_KEY || "",
},
},
gasReporter: {
enabled: process.env.REPORT_GAS ? true : false,
},
mocha: {
timeout: 0,
},
external: process.env.HARDHAT_FORK
? {
deployments: {
// process.env.HARDHAT_FORK will specify the network that the fork is made from.
// these lines allow it to fetch the deployments from the network being forked from both for node and deploy task
hardhat: ["deployments/" + process.env.HARDHAT_FORK],
localhost: ["deployments/" + process.env.HARDHAT_FORK],
},
}
: undefined,
};