-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathtruffle.js
30 lines (29 loc) · 954 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
const HDWalletProvider = require('truffle-hdwallet-provider');
const secrets = require('./secrets.json');
const bip39 = require('bip39');
const hdkey = require('ethereumjs-wallet/hdkey');
const hdwallet = hdkey.fromMasterSeed(bip39.mnemonicToSeed(secrets.mnemonic));
const node = hdwallet.derivePath(secrets.hdPath + '0');
const addr = node.getWallet().getAddressString();
module.exports = {
networks: {
development: {
name: "Dev",
host: 'localhost',
port: 7545,
network_id: '*', // Match any network id
gas: 20000000 // https://github.com/trufflesuite/truffle/issues/825#issuecomment-369189238
},
developmentB: {
name: "devB",
host: 'localhost',
port: 8545,
network_id: '*',
gas: 20000000
},
/*ropsten: {
provider: new HDWalletProvider(secrets.mnemonic, 'https://ropsten.infura.io/'),
network_id: 3, // official id of the ropsten network
},*/
},
};