-
Notifications
You must be signed in to change notification settings - Fork 27
/
truffle.js
48 lines (41 loc) · 1.08 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
// For working with INFURA
const HDWalletProvider = require("truffle-hdwallet-provider")
const fs = require("fs")
// First read in the secrets.json to get our mnemonic
let secrets
let mnemonic
if(fs.existsSync("secrets.json")) {
secrets = JSON.parse(fs.readFileSync("secrets.json", "utf8"))
mnemonic = secrets.mnemonic
} else {
console.log("No secrets.json found. If you are trying to publish EPM " +
"this will fail. Otherwise, you can ignore this message!")
mnemonic = ""
}
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*", // Match any network id
},
ropsten: {
provider: new HDWalletProvider(mnemonic, "https://ropsten.infura.io/"),
host: "localhost",
port: 8545,
network_id: 3,
// from: "0x0073a284FE9C6f9ad578F23E2397BF2fe6De59A1"
},
kovan: {
host: "localhost",
port: 8545,
network_id: 42,
from: "0x00C0d8F90F2c982A66d764aD025C0992F9B8d9c1"
},
mainnet: {
host: "localhost",
port: 8545,
network_id: 1
}
}
};