关灯

Error: cannot find module hdwallet-provider - trying to deploy contract to ropst

  [复制链接]
区块链技术 发表于 2018-12-5 08:08:51 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题
 

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x

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-wallet@0.6.0 npm install --save truffle-hdwallet-provider@0.0.3

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 } } };




上一篇:How to call geth mining through java code manually ?
下一篇:Interact with created contract on Truffle
版权申明:此文如未标注转载均为本站原创,自由转载请注明 本贴地址:https://xuesq.cn/thread-103111-1-1.html 上篇帖子: 12月5日 | 小葱隔夜重要消息一览 下篇帖子: Interact with created contract on Truffle module trying deploy contract
回复

使用道具 举报

 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

排行榜

关注我们:微信订阅号

官方微信

APP下载

全国服务邮箱:

admin@xuesq.cn

公司地址:重庆南岸区学府大道

运营中心:重庆微生派网络工作室

邮编:610066 Email:1401171837#qq.com

Copyright   ©2017-2018  中比特Powered by©xuesq.cn!技术支持:中比特    ( 蜀ICP备16009247号-1 )