-
-
Notifications
You must be signed in to change notification settings - Fork 233
/
hardhat.config.js
94 lines (80 loc) · 1.82 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
// hardhat.config.js
const {
networks,
etherscan,
parseForkUrl,
} = require('@unlock-protocol/hardhat-helpers')
require('@nomiclabs/hardhat-ethers')
// full stack trace if needed
require('hardhat-tracer')
// erc1820 deployment
require('hardhat-erc1820')
// for upgrades
require('@openzeppelin/hardhat-upgrades')
// debug storage
require('hardhat-storage-layout')
// gas reporting for tests
require('hardhat-gas-reporter')
// test coverage
require('solidity-coverage')
// eslint-disable-next-line global-require
require('@nomiclabs/hardhat-etherscan')
// check contract size
require('hardhat-contract-sizer')
// our own hardhat plugin (for mainnet tests)
require('@unlock-protocol/hardhat-plugin')
const settings = {
optimizer: {
enabled: true,
runs: 80,
},
outputSelection: {
'*': {
'*': ['storageLayout'],
},
},
}
// mainnet fork
if (process.env.RUN_FORK) {
parseForkUrl(networks)
}
// tasks
require('./tasks/accounts')
require('./tasks/upgrade')
require('./tasks/release')
require('./tasks/utils')
require('./tasks/keys')
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
networks,
etherscan,
gasReporter: {
currency: 'USD',
excludeContracts: ['TestNoop'],
gasPrice: 5,
},
solidity: {
compilers: [
{ version: '0.7.6', settings }, // required for uniswap
{ version: '0.8.4', settings }, // required for test/Lock/upgrades/V10
{ version: '0.8.7', settings }, // required for test/Lock/upgrades/V11
{ version: '0.8.13', settings }, // required for test/Lock/upgrades/V12
{
version: '0.8.21',
settings: {
...settings,
evmVersion: 'shanghai',
},
},
],
},
mocha: {
timeout: 2000000,
},
contractSizer: {
alphaSort: true,
only: [':PublicLock', 'Mixin'],
},
}