-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.Governor.js
103 lines (93 loc) · 2.09 KB
/
hardhat.config.Governor.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
require('@nomiclabs/hardhat-waffle');
require('@nomiclabs/hardhat-web3');
require('dotenv').config();
const fs = require('fs');
const path = require('path');
// const INFURA_PROJECT_ID = '719d739434254b88ac95d53e2b6ac997';
const argv = require('yargs/yargs')()
.env('')
.options({
ci: {
type: 'boolean',
default: false,
},
coverage: {
type: 'boolean',
default: false,
},
gas: {
alias: 'enableGasReport',
type: 'boolean',
default: false,
},
mode: {
alias: 'compileMode',
type: 'string',
choices: ['production', 'development'],
default: 'development',
},
compiler: {
alias: 'compileVersion',
type: 'string',
default: '0.8.9',
},
coinmarketcap: {
alias: 'coinmarketcapApiKey',
type: 'string',
},
})
.argv;
require('@nomiclabs/hardhat-truffle5');
if (argv.enableGasReport) {
require('hardhat-gas-reporter');
}
for (const f of fs.readdirSync(path.join(__dirname, 'hardhat'))) {
require(path.join(__dirname, 'hardhat', f));
}
const withOptimizations = argv.enableGasReport || argv.compileMode === 'production';
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
version: argv.compiler,
settings: {
optimizer: {
enabled: withOptimizations,
runs: 200,
},
},
},
defaultNetwork: 'testRpc',
networks: {
hardhat: {
loggingEnabled: true,
blockGasLimit: 10000000,
allowUnlimitedContractSize: !withOptimizations,
},
testRpc: {
url: process.env.TEST_RPC,
// gas:10000000,
gasMultiplier:2,
accounts: {
mnemonic: process.env.MNEMONIC_STR,
path: 'm/44\'/60\'/0\'/0',
initialIndex: 40,
count: 10,
passphrase: '',
},
},
},
mocha: {
timeout: 100000,
reporter: 'mochawesome',
retries:2,
reporterOptions: {
reportFilename: '[status]-Governor-report',
},
},
};
if (argv.coverage) {
require('solidity-coverage');
module.exports.networks.hardhat.initialBaseFeePerGas = 0;
}