forked from singnet/platform-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle.js
29 lines (27 loc) · 807 Bytes
/
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
let HDWalletProvider = require("truffle-hdwallet-provider");
let Web3 = require("web3");
let provider = (endpoint) => {
if (process.env.HDWALLET_MNEMONIC) {
return new HDWalletProvider(process.env.HDWALLET_MNEMONIC, endpoint);
} else {
return new Web3.providers.HttpProvider(endpoint);
}
}
module.exports = {
networks: {
local: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Any network ID
},
localhd: {
provider: () => provider("http://127.0.0.1:8545"),
network_id: "*" // Any network ID
},
kovan: {
gasPrice: 500000000,
provider: () => provider("https://kovan.infura.io"),
network_id: "42" // Kovan network ID
},
},
}