-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtruffle.js
42 lines (39 loc) · 1.01 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
const HDWalletProvider = require('truffle-hdwallet-provider')
const fs = require('fs')
// first read in the secrets.json to get our mnemonic
let key = ''
if (fs.existsSync('./secrets.json')) {
const secrets = require('./secrets.json')
key = secrets.private
//key = secrets.mnemonic
} else {
console.log('no secrets.json found. You can only deploy to the testrpc.');
key = ''
}
module.exports = {
networks: {
development: {
host: 'localhost',
port: 8545,
network_id: '*' // Match any network id
},
kovan: {
provider: new HDWalletProvider(key, 'https://kovan.infura.io'),
network_id: '*',
gas: 4712383,
gasPrice: 20000000000
},
rinkeby: {
provider: new HDWalletProvider(key, 'https://rinkeby.infura.io'),
network_id: '*',
gas: 4712383,
gasPrice: 20000000000
},
mainnet: {
provider: new HDWalletProvider(key, 'https://mainnet.infura.io'),
network_id: 1,
gas: 4500000,
gasPrice: 10000000000
}
}
};