forked from Idle-Labs/idle-tranches
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
140 lines (137 loc) · 4.24 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
require('dotenv').config();
require('chai').should();
require('@openzeppelin/hardhat-upgrades');
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-solhint");
// require('hardhat-abi-exporter');
// require('hardhat-contract-sizer');
require("hardhat-etherscan-abi");
// require('hardhat-docgen');
require("solidity-coverage");
// Tasks
require("./tasks/tests");
require("./tasks/cdo-factory");
require("./tasks/chain-utils");
require("./tasks/tranches-utils");
const BN = require("bignumber.js");
const mainContactRuns = 300;
const overrideConfig = {
version: "0.8.10",
settings: {
optimizer: {
enabled: true,
runs: mainContactRuns
}
}
};
module.exports = {
solidity: {
compilers: [
{
version: "0.8.10",
settings: {
optimizer: {
enabled: true,
runs: 999999
}
}
}
],
overrides: {
"contracts/GuardedLaunchUpgradable.sol": overrideConfig,
"contracts/IdleCDOTranche.sol": overrideConfig,
"contracts/IdleCDOStorage.sol": overrideConfig,
"contracts/IdleCDO.sol": overrideConfig,
"contracts/polygon/IdleCDOPolygon.sol": overrideConfig,
}
},
networks: {
hardhat: {
allowUnlimitedContractSize: true,
// forking: {
// url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}`,
// // url:`https://polygon-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
// // blockNumber: 12554260, // DAI all in compound for `integration` task
// // blockNumber: 13055073 // both tranches have deposits and both staking contracts have staked tranches
// // blockNumber: 13086034 // no stkAAVE in the contract (for test-harvest task)
// // blockNumber: 13126332 // there are stkAAVE in the contract in cooldown
// // blockNumber: 13261760 // pre transfer ownership
// // blockNumber: 13666020 // convex/lido integration tests
// // blockNumber: 13728440 // idleFEI upgraded
// // blockNumber: 13739407 // idleDAI upgraded
// // blockNumber: 13776718 // lido deploy
// // blockNumber: 13810230 // convex deploy
// // blockNumber: 14075568 // StakingRewards deploy
// // blockNumber: 14164982 // upgrade convex strategy
// // blockNumber: 14184625 // deploy tranche battle winners + mstable completed
// // blockNumber: 14204103 // deploy tranche battle winners + mstable completed
// // blockNumber: 14217710 // upgrade mstable tranche
// // blockNumber: 14141000 // harvest strategy
// // blockNumber: 14705834 // euler strategy
// // blockNumber: 14748963 // pbtc test
// // blockNumber: 14931960 // euler strategy update
// // blockNumber: 14956557 // eulerdai eulerusdt with AYS
// // blockNumber: 28479157 // polygon
// // blockNumber: 15014308, // clearpool strategy
// },
// // chainId: 137
},
coverage: {
url: "http://127.0.0.1:8545/",
blockGasLimit: 15000000,
allowUnlimitedContractSize: true,
},
local: {
url: "http://127.0.0.1:8545/",
timeout: 120000,
},
kovan: {
url: `https://eth-kovan.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}`,
},
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}`,
gasPrice: 'auto',
gas: 'auto',
gasMultiplier: 1.1,
timeout: 1200000
},
matic: {
url: `https://polygon-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
gasPrice: 'auto',
gas: 'auto',
timeout: 1200000,
chainId: 137
},
},
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
polygon: process.env.POLYGON_ETHERSCAN_API_KEY
}
},
abiExporter: {
// path: './abis',
// clear: true,
flat: true,
spacing: 2
},
docgen: {
path: './docs',
clear: true,
runOnCompile: false,
only: [
'^contracts/IdleCDO.sol',
'^contracts/IdleCDOTrancheRewards.sol',
'^contracts/IdleStrategy.sol'
]
},
contractSizer: {
// alphaSort: true,
// runOnCompile: true,
// disambiguatePaths: false,
},
mocha: {
timeout: 1000000
}
};