-
Notifications
You must be signed in to change notification settings - Fork 3
/
truffle.js
44 lines (40 loc) · 963 Bytes
/
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
var HDWalletProvider = require("truffle-hdwallet-provider");
var fs = require('fs');
var secrets = fs.readFileSync('secrets.json', 'utf8');
try {
var obj = JSON.parse(secrets);
} catch (error) {
console.log('Invalid data in secrets.json.');
}
var mnemonic = obj.mnemonic;
module.exports = {
solc: {
optimizer: {
enabled: true,
runs: 200
}
},
networks: {
development: {
host: 'localhost',
port: 9545,
network_id: '*'
},
ropsten: {
provider: new HDWalletProvider(mnemonic, 'https://ropsten.infura.io'),
network_id: '3',
gas: 1251680,
gasPrice: 4000000000
},
kovan: {
provider: new HDWalletProvider(mnemonic, 'https://kovan.infura.io/'),
network_id: '4'
},
mainnet: {
provider: new HDWalletProvider(mnemonic, 'https://mainnet.infura.io/'),
network_id: 1, // Main net
gas: 1251680,
gasPrice: 6000000000 // 6 Gwei
}
}
}