forked from Synthetixio/synthetix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
64 lines (59 loc) · 1.36 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
'use strict';
require('dotenv').config();
const path = require('path');
require('./hardhat');
require('@nomiclabs/hardhat-truffle5');
require('solidity-coverage');
require('hardhat-gas-reporter');
const {
constants: { inflationStartTimestampInSecs, AST_FILENAME, AST_FOLDER, BUILD_FOLDER },
} = require('.');
const GAS_PRICE = 20e9; // 20 GWEI
const CACHE_FOLDER = 'cache';
module.exports = {
GAS_PRICE,
solidity: {
compilers: [
{
version: '0.4.25',
},
{
version: '0.5.16',
},
],
},
paths: {
sources: './contracts',
tests: './test/contracts',
artifacts: path.join(BUILD_FOLDER, 'artifacts'),
cache: path.join(BUILD_FOLDER, CACHE_FOLDER),
},
astdocs: {
path: path.join(BUILD_FOLDER, AST_FOLDER),
file: AST_FILENAME,
ignores: 'test-helpers',
},
defaultNetwork: 'hardhat',
networks: {
hardhat: {
gas: 12e6,
blockGasLimit: 12e6,
allowUnlimitedContractSize: true,
gasPrice: GAS_PRICE,
initialDate: new Date(inflationStartTimestampInSecs * 1000).toISOString(),
// Note: forking settings are injected at runtime by hardhat/tasks/task-node.js
},
localhost: {
gas: 12e6,
blockGasLimit: 12e6,
url: 'http://localhost:8545',
},
},
gasReporter: {
enabled: false,
showTimeSpent: true,
currency: 'USD',
maxMethodDiff: 25, // CI will fail if gas usage is > than this %
outputFile: 'test-gas-used.log',
},
};