-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtruffle.js
More file actions
47 lines (42 loc) · 1.16 KB
/
truffle.js
File metadata and controls
47 lines (42 loc) · 1.16 KB
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
// Allows us to use ES6 in our migrations and tests.
require('babel-register')
require('babel-polyfill')
require('dotenv').config();
const INFURA_API_KEY = process.env.INFURA_API_KEY;
const MNEMONIC = process.env.MNEMONIC;
const HDWalletProvider = require('truffle-hdwallet-provider');
const WALLET_INDEX = process.env.WALLET_INDEX; // HDwallet needs to know which account based off the seed to generate
const NETWORK_IDS = {
// mainnet: 1,
ropsten: 2,
rinkeby: 4,
kovan: 42
};
module.exports = {
migrations_directory: "./migrations",
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*"
},
rinkeby: {
provider: () => new HDWalletProvider(MNEMONIC, 'https://rinkeby.infura.io/' + INFURA_API_KEY, WALLET_INDEX),
network_id: 4
}
},
solc: {
optimizer: {
enabled: true,
runs: 500
}
}
};
// for (let networkName in NETWORK_IDS) {
// module.exports.networks[ networkName ] = {
// provider: new HDWalletProvider(MNEMONIC, 'https://' + networkName + '.infura.io/' + INFURA_API_KEY),
// network_id: NETWORK_IDS[networkName],
// gas: 6500000,
// gasPrice: 21
// };
// }