-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtruffle-config.js
77 lines (73 loc) · 1.63 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
const fs = require('fs');
let localConfig = {};
// eslint-disable-next-line func-names
let getProviderOf = function (network) { return () => `${network} is not implemented!`; };
if (fs.existsSync('truffle-config.local.js')) {
// eslint-disable-next-line global-require
const local = require('./truffle-config.local.js');
localConfig = local.config;
({ getProviderOf } = local);
}
const config = {
networks: {
mainnet: {
provider: getProviderOf('ethereum:mainnet'),
network_id: 1,
gas: 500000,
gasPrice: 12000000000, // 12 Gwei
},
ropsten: {
provider: getProviderOf('ethereum:ropsten'),
network_id: 3,
skipDryRun: true,
},
rinkeby: {
provider: getProviderOf('ethereum:rinkeby'),
network_id: 4,
skipDryRun: true,
},
local: {
host: '127.0.0.1',
port: 8545,
network_id: '*',
},
coverage: {
host: '127.0.0.1',
network_id: '*',
port: 8555,
gas: 0xfffffffffff,
gasPrice: 0x01,
},
dev: {
host: '127.0.0.1',
port: 9545,
network_id: '*',
},
baobab: {
provider: getProviderOf('klaytn:baobab'),
network_id: '1001',
gas: '8500000',
gasPrice: null,
},
cypress: {
provider: getProviderOf('klaytn:cypress'),
network_id: '8217', // unknown
gas: '8500000',
gasPrice: null,
},
},
solc: {
optimizer: {
enabled: true,
runs: 200,
},
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions: {
currency: 'KRW',
gasPrice: 10,
},
},
};
module.exports = Object.assign(config, localConfig);