-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle.js
55 lines (49 loc) · 1.44 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
require('babel-register');
require('babel-polyfill');
var keys = require('./keys');
var HDWalletProvider = require("truffle-hdwallet-provider");
var infura_apikey = keys.infura_apikey;
var mnemonic = keys.mnemonic;
var ropstenProvider = new HDWalletProvider(mnemonic, "https://ropsten.infura.io/" + infura_apikey);
var rinkebyProvider = new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/" + infura_apikey);
var kovanProvider = new HDWalletProvider(mnemonic, "https://kovan.infura.io/" + infura_apikey);
var liveProvider = new HDWalletProvider(mnemonic, "https://mainnet.infura.io/" + infura_apikey);
const gasPrice = 40 * 1000000000; // gigawei
const gas = 1000000;
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*" // Match any network id
},
live: {
gasPrice: gasPrice,
gas: gas,
provider: liveProvider,
network_id: 1,
from: liveProvider.getAddress()
},
ropsten: {
gasPrice: gasPrice,
gas: gas,
provider: ropstenProvider,
network_id: 3,
from: ropstenProvider.getAddress()
},
rinkeby: {
gasPrice: gasPrice,
gas: gas,
network_id: 4,
provider: rinkebyProvider,
from: rinkebyProvider.getAddress()
},
kovan: {
gasPrice: gasPrice,
gas: gas,
provider: kovanProvider,
network_id: 42,
from: kovanProvider.getAddress()
}
}
};