-
Notifications
You must be signed in to change notification settings - Fork 6
/
truffle-config.js
55 lines (48 loc) · 1.05 KB
/
truffle-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
require('babel-register');
require('babel-polyfill');
/* eslint-disable import/no-extraneous-dependencies */
require('chai')
.use(require('chai-as-promised'))
.use(require('chai-bn')(require('bn.js')))
.use(require('dirty-chai'))
.expect();
const ganache = require('ganache-core');
/* eslint-enable import/no-extraneous-dependencies */
const process = require('process');
const mochaOptions = {
useColors: true,
slow: 30000,
bail: true,
};
const { WITH_GAS_PROFILER } = process.env;
if (WITH_GAS_PROFILER) {
mochaOptions.reporter = 'eth-gas-reporter';
mochaOptions.reporterOptions = {
currency: 'USD',
gasPrice: 2,
};
}
module.exports = {
networks: {
development: {
network_id: '*',
provider: ganache.provider({
total_accounts: 30,
defaultEtherBalance: 1000,
}),
},
},
plugins: ['solidity-coverage'],
compilers: {
solc: {
version: '0.5.16',
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
},
mocha: mochaOptions,
};