-
Notifications
You must be signed in to change notification settings - Fork 9
/
hardhat.base.config.js
59 lines (55 loc) · 1.2 KB
/
hardhat.base.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
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const hardhatUserConfig = {
solidity: {
compilers: [
{
version: '0.8.18',
settings: {
viaIR: true,
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
overrides: {
'contracts/Arbitrator.sol': {
version: '0.8.25',
settings: {
viaIR: true,
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: 'cancun',
},
},
},
},
networks: {
hardhat: {
allowUnlimitedContractSize: true,
},
},
gasReporter: {
enabled: !!process.env.REPORT_GAS,
},
mocha: {
timeout: 600000,
},
};
// custom hardhat user config for different net
if (process.env.NET !== undefined) {
const netName = process.env.NET;
hardhatUserConfig.defaultNetwork = netName;
const netConfig = require(`./etc/${netName}.json`);
hardhatUserConfig.networks[netName] = netConfig.network;
// config contract verify key if exist
if (netConfig.etherscan !== undefined) {
hardhatUserConfig.etherscan = netConfig.etherscan;
}
}
module.exports = hardhatUserConfig;