-
Notifications
You must be signed in to change notification settings - Fork 41
/
truffle.js
71 lines (68 loc) · 1.95 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
58
59
60
61
62
63
64
65
66
67
68
69
const yargs = require('yargs');
var provider, address;
// Not using remote node until secure way to store seed/private key is established.
//
// if (yargs.argv.network == 'ropsten' || yargs.argv.network == 'mainnet') {
// var providerURL = 'http://localhost:8545';
// // var providerURL = `https://${yargs.argv.network}.infura.io`
// var HDWalletProvider = require("truffle-privatekey-provider");
// // todo: Think about more secure way
// var mnemonic = yargs.argv.mnemonic;
// provider = new HDWalletProvider(mnemonic, providerURL, 0);
// // address = "0x" + provider.wallet.getAddress().toString("hex");
// // console.log('Provider address', provider.getAddress());
// console.log('Deploying to ', providerURL);
// }
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
gas: 6712388,
// gasPrice: 2000000000, // 1 gwei
network_id: "*"
},
test: {
host: "localhost",
port: 8545,
network_id: "*",
gasPrice: 0x01
},
coverage: {
host: "localhost",
network_id: "*",
port: 8555, // <-- 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
},
rinkeby: {
host: "localhost",
network_id: 4,
port: 8545,
gasPrice: 50000000000 // 50 gwei,
},
ropsten: {
gasPrice: 50000000000, // 50 gwei,
// provider: provider,
network_id: 3,
// from: address
},
mainnet: {
// gas: 5000000,
host: "localhost",
gasPrice: 1000000000, // 1 gwei
port: 8545,
// provider:provider,
// from: "0x4b3A4F3F42BA61141A4F7101F77dC141AE15c59A",
from: "0x4b3a4f3f42ba61141a4f7101f77dc141ae15c59a",
network_id: 1
}
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions : {
currency: 'USD',
gasPrice: 1
}
}
};