@@ -10,6 +10,10 @@ const FS = require('fs');
1010const Contract = require ( 'truffle-contract' ) ;
1111const HDWalletProvider = require ( "@truffle/hdwallet-provider" ) ;
1212const mnemonicPhrase = process . env . MNEMONIC ;
13+ const mnemonicPassword = process . env . MNEMONIC_PASSWORD ;
14+ const providerHost = process . env . PROVIDER_HOST || 'localhost' ;
15+ const providerPort = process . env . PROVIDER_PORT || 8545 ;
16+ const providerProtocol = process . env . PROVIDER_PROTOCOL || 'http' ;
1317
1418// Importing babel to be able to use ES6 imports
1519require ( "babel-register" ) ( {
@@ -42,16 +46,6 @@ module.exports = {
4246 plugins : [ "solidity-coverage" ] ,
4347 networks : {
4448 development : {
45- provider : ( ) =>
46- new HDWalletProvider ( {
47- mnemonic : {
48- phrase : mnemonicPhrase
49- } ,
50- providerOrUrl : "http://127.0.0.1:8545" ,
51- numberOfAddresses : 1 ,
52- shareNonce : true ,
53- derivationPath : "m/44'/60'/0'/0"
54- } ) ,
5549 network_id : '*' , // Match any network id
5650 gas : 12450000 ,
5751 host : '127.0.0.1' ,
@@ -79,26 +73,25 @@ module.exports = {
7973 network_id : "88" ,
8074 from : "0x9ad8fd4c83b752914a9b22484686666d9a30619c" ,
8175 gas : 12450000 ,
82-
8376 } ,
8477 // Geth RP Testnet Development
8578 // Remove accounts[0] lookup in migrations script when deploying
8679 'goerli' : {
8780 provider : ( ) =>
8881 new HDWalletProvider ( {
8982 mnemonic : {
90- phrase : mnemonicPhrase
83+ phrase : mnemonicPhrase ,
84+ password : mnemonicPassword
9185 } ,
92- providerOrUrl : "http ://127.0.0.1:8545" ,
86+ providerOrUrl : ` ${ providerProtocol } ://${ providerHost } : ${ providerPort } ` ,
9387 numberOfAddresses : 1 ,
9488 shareNonce : true ,
95- derivationPath : "m/44'/60'/0'/0"
9689 } ) ,
97- host : 'http://127.0.0.1' ,
98- port : 8545 ,
90+ host : providerHost ,
91+ port : providerPort ,
9992 network_id : "5" ,
100- from : "0xFfc1f495d6D033Bc3CE027A87bfDe574b09b7BeD" ,
10193 gas : 8000000 ,
94+ hasProvider : true
10295 } ,
10396 } ,
10497 mocha : {
0 commit comments