-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtruffle.js
35 lines (28 loc) · 846 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
30
31
32
33
34
35
var HDWalletProvider = require("truffle-hdwallet-provider");
var path = process.cwd();
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
gas: 6900000,
network_id: "*" // Match any network id
},
rinkeby: {
provider: function () {
var fs = require('fs');
var walletMmnemonic = fs.readFileSync(path + "/private/wallet.mnemonic.rinkeby").toString();
//console.log(walletMmnemonic);
var apiKey = fs.readFileSync(path + "/private/api.key").toString();
//console.log(apiKey);
let provider = new HDWalletProvider(
walletMmnemonic,
"https://rinkeby.infura.io/v3/" + apiKey);
provider.getAddress();
return provider;
},
gas: 6900000,
network_id: 4
}
}
};