-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle.js
30 lines (26 loc) · 963 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
"use strict";
const HDWalletProvider = require("truffle-hdwallet-provider");
const fs = require("fs");
const path = require("path");
let secrets = {};
const secretFilePath = path.resolve(__dirname, "secret.config.json");
if (fs.existsSync(secretFilePath)) {
secrets = JSON.parse(fs.readFileSync(secretFilePath).toString());
}
const INFURA_KEY = secrets.INFURA_KEY || process.env.ESCROW_INFURA_KEY;
const INDIFI_ACCOUNT_MNEMONIC = secrets.INDIFI_ACCOUNT_MNEMONIC || process.env.ESCROW_INDIFI_ACCOUNT_MNEMONIC;
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*"
},
rinkeby: {
provider: new HDWalletProvider(INDIFI_ACCOUNT_MNEMONIC, "https://rinkeby.infura.io/ " + INFURA_KEY),
network_id: 3
}
}
};