I have reviewed the other posts in the last few days following what seem like forever for get to sync to my local machine - so this is my last try to get it to deploy the petshop contract to ropsten via using a key from infura as suggested by someone as the sync in ropsten is taking too long.
I have reconfigured my truffle.js
to use an infura key but when
I run the command to deploy I get the cannot find module truffle-hdwallet-provider
- (see screenshot below)
Any other suggestions would be greatly appreciated -
Update:
npm uninstall ethereumjs-wallet
npm uninstall truffle-hdwallet-provider
npm install --save ethereumjs-[email protected]
npm install --save [email protected]
my truffle script is below - I have grey out the key for obvious reasons :)
var HDWalletProvider = require("truffle-hdwallet-provider");
const MNEMONIC = '*******************************************************';
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*"
},
ropsten: {
provider: function() {
return new HDWalletProvider(MNEMONIC, "https://ropsten.infura.io/v3/*****************************")
},
network_id: 3,
gas: 4000000 //make sure this gas allocation isn't over 4M, which is the max
}
}
};