-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtruffle.js
62 lines (57 loc) · 1.34 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
fs = require('fs');
const HDWalletProvider = require("truffle-hdwallet-provider");
const getMnemonic = function (env) {
try {
return fs.readFileSync('./config/' + env + '/mnemonic').toString()
} catch (exception) {
return "fundrequest"
}
};
const getSecret = function () {
try {
return fs.readFileSync('./config/secrets/infura-token.js').toString();
} catch (ex) {
console.log(ex);
return "";
}
};
module.exports = {
networks: {
development: {
network_id: '*',
host: "localhost",
port: 8545
},
local: {
provider: new HDWalletProvider(getMnemonic('local'), "http://localhost:8545/"),
network_id: '*',
},
kovan: {
network_id: '42',
host: "https://kovan.infura.io/" + getSecret(),
provider: new HDWalletProvider(getMnemonic('kovan'), "https://kovan.infura.io/" + getSecret())
},
ropsten: {
network_id: '3',
host: "https://ropsten.infura.io/",
provider: new HDWalletProvider(getMnemonic('ropsten'), "https://ropsten.infura.io/" + getSecret())
},
rinkeby: {
network_id: '4',
host: "https://rinkeby.infura.io/" + getSecret(),
provider: new HDWalletProvider(getMnemonic('rinkeby'), "https://rinkeby.infura.io/" + getSecret())
},
rinkeby_local: {
network_id: '4',
host: "localhost",
port: 8545,
gas: 4612388
},
solc: {
optimizer: {
enabled: true,
runs: 200
}
}
},
};