-
Notifications
You must be signed in to change notification settings - Fork 9
/
hardhat.config.js
executable file
·93 lines (88 loc) · 1.94 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
require('@nomiclabs/hardhat-waffle');
require('@nomiclabs/hardhat-etherscan');
require('@nomiclabs/hardhat-web3');
require('hardhat-contract-sizer');
require('hardhat-gas-reporter');
require('solidity-docgen');
require('hardhat-tracer');
require('dotenv').config();
require('@typechain/hardhat');
require('solidity-coverage');
/* Aurora */
module.exports = (function () {
let chainId = process.env.CHAIN_ID;
const chainIdInt = parseInt(chainId);
const config = {
solidity: {
compilers: [
// Needed for static code analysis tools to compile OpenZeppelin contracts pegged to 0.8.2
{
version: '0.8.2',
settings: {
optimizer: {
enabled: true,
runs: 100,
},
},
paths: ['./contracts', './mocks']
},
{
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 100,
},
},
paths: ['./contracts', './mocks']
}
],
},
networks: {
localhost: {
url: 'http://localhost:8545',
accounts: [process.env.CLIENT, process.env.CONTRIBUTOR]
},
docker: {
url: process.env.PROVIDER_URL,
chainId: chainIdInt
},
mumbai: {
url: process.env.PROVIDER_URL,
accounts: [process.env.CLIENT, process.env.CONTRIBUTOR],
chainId: chainIdInt,
gas: 9999999
},
polygon: {
url: process.env.PROVIDER_URL,
accounts: [process.env.CLIENT, process.env.CONTRIBUTOR],
chainId: chainIdInt,
gasPrice: 250000000000
},
},
etherscan: {
apiKey: process.env.POLYGON_SCAN_API_KEY
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: false,
strict: true
},
gasReporter: {
enabled: false,
currency: 'USD',
gasPrice: 21,
token: 'ETH',
gasPriceApi: 'https://api.etherscan.io/api?module=proxy&action=eth_gasPrice'
},
docgen: {
outputDir: '../OpenQ-Documentation',
pages: 'files'
},
typechain: {
outDir: './generated/typechain',
},
};
return config;
})();