updated truffle.json
This commit is contained in:
parent
bf953940e5
commit
7f67a468d0
36
truffle.js
36
truffle.js
|
@ -1,9 +1,35 @@
|
|||
const HDWalletProvider = require('truffle-hdwallet-provider')
|
||||
const fs = require('fs')
|
||||
|
||||
// First read in the secrets.json to get our mnemonic
|
||||
let secrets
|
||||
let mnemonic
|
||||
if (fs.existsSync('secrets.json')) {
|
||||
secrets = JSON.parse(fs.readFileSync('secrets.json', 'utf8'))
|
||||
mnemonic = secrets.mnemonic
|
||||
} else {
|
||||
console.log('No secrets.json found. If you are trying to publish EPM ' +
|
||||
'this will fail. Otherwise, you can ignore this message!')
|
||||
mnemonic = ''
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
networks: {
|
||||
development: {
|
||||
host: "localhost",
|
||||
port: 8545,
|
||||
network_id: "*" // Match any network id
|
||||
live: {
|
||||
network_id: 1 // Ethereum public network
|
||||
// optional config values
|
||||
// host - defaults to "localhost"
|
||||
// port - defaults to 8545
|
||||
// gas
|
||||
// gasPrice
|
||||
// from - default address to use for any transaction Truffle makes during migrations
|
||||
},
|
||||
ropsten: {
|
||||
provider: new HDWalletProvider(mnemonic, 'https://ropsten.infura.io'),
|
||||
network_id: '3'
|
||||
},
|
||||
testrpc: {
|
||||
network_id: 'default'
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue