forked from skmgoldin/tcr
/
truffle.js
57 lines (53 loc) · 1.33 KB
/
truffle.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
require('babel-register')
require('babel-polyfill')
const HDWalletProvider = require('truffle-hdwallet-provider');
const fs = require('fs');
let secrets;
let mnemonic = '';
if (fs.existsSync('secrets.json')) {
secrets = JSON.parse(fs.readFileSync('secrets.json', 'utf8'));
({ mnemonic } = secrets);
}
module.exports = {
networks: {
development: {
host: 'localhost',
network_id: '*',
port: 8545,
gas: 6500000,
gasPrice: 5000000000
},
testing: {
host: 'localhost',
network_id: '*',
port: 8545,
gas: 6500000,
gasPrice: 5000000000
},
// mainnet: {
// provider: new HDWalletProvider(mnemonic, 'https://mainnet.infura.io'),
// network_id: '1',
// gas: 4500000,
// gasPrice: 10000000000,
// },
rinkeby: {
provider: new HDWalletProvider(mnemonic, 'https://rinkeby.infura.io'),
network_id: '*',
gas: 6500000,
gasPrice: 5000000000,
},
// config for solidity-coverage
// coverage: {
// host: 'localhost',
// network_id: '*',
// port: 7545, // <-- If you change this, also set the port option in .solcover.js.
// gas: 0xfffffffffff, // <-- Use this high gas value
// gasPrice: 0x01, // <-- Use this low gas price
// },
},
solc: {
optimizer: {
enabled: true
}
}
};