简体   繁体   English

Truffle Migrate 部署问题

[英]Truffle Migrate deployment issue

I've successfully deployed my Smart Contracts locally to Ganache and wanna now take it to the next level by testing them on ROPSTEN .我已经成功地将我的智能合约本地部署到Ganache ,现在想通过在ROPSTEN上对其进行测试将其提升到一个新的水平。

For some reason, even though I've done this a million times before with other projects, when I run出于某种原因,即使我之前在其他项目中已经这样做了一百万次,但当我运行时

truffle migrate --network ropsten

I'm not getting any sort of results, which is to say I'm not getting errors, but its also just not succeeding.我没有得到任何结果,也就是说我没有得到错误,但它也没有成功。 It just says:它只是说:

Compiled successfully using:
   - solc: 0.5.8+commit.23d335f2.Emscripten.clang

...and puts me back at the prompt line, waiting for my next command. ...然后让我回到提示行,等待我的下一个命令。

My DEV ENVIRONMENT is:我的开发环境是:

  • Operating System: Mac OS Catalina v.10.15.1操作系统:Mac OS Catalina v.10.15.1
  • Truffle Version (truffle version): v.5.0.34松露版(松露版):v.5.0.34
  • Node Version (node --version): v.10.16.3节点版本(node --version):v.10.16.3
  • NPM Version (npm --version): v.6.14.4 NPM 版本(npm --version):v.6.14.4
  • ├─┬ @truffle/hdwallet-provider@1.0.35 ├─┬@truffle/hdwallet-provider@1.0.35
    │ └── web3@1.2.1 │ └── web3@1.2.1
    ├─┬ truffle-hdwallet-provider@1.0.17 ├─┬ truffle-hdwallet-provider@1.0.17
    │ └── web3@1.2.1 │ └── web3@1.2.1
    └── web3@0.20.7 └── web3@0.20.7

(Yes, I seem to have two versions of Web3 - but I don't think that's the problem...) (是的,我似乎有两个版本的 Web3 - 但我认为这不是问题......)

My truffle-config.js file looks like this:truffle-config.js文件如下所示:

require('dotenv').config();
const HDWalletProvider = require('truffle-hdwallet-provider');


module.exports = {

ropsten: {
  provider: function () {
      return new HDWalletProvider(
          process.env.GANACHE_MNENOMIC,
          "https://ropsten.infura.io/${process.env.INFURA_API_KEY}"
      )
  },
  network_id: 3,
  from: "0xB4xxxxxxxxxxxxxxxxxxxxxxx",
  gas: 8000000,
  gasPrice: 20000000000,
  confirmations: 2, // # of confs to wait between deployments. (default: 0)
  skipDryRun: true
},

My .env file has the MNEMONIC s and the INFURA_API_KEY which are all valid.我的.env文件有MNEMONICINFURA_API_KEY都是有效的。

Any ideas what might be going on here?有什么想法可能会在这里发生吗?

I know this is and old qustion, but you need a faucet and get some funds on your ropsten address so that migration of contract is executed...for anyone serching for the same "error".我知道这是一个老问题,但是您需要一个水龙头并在您的 ropsten 地址上获得一些资金,以便执行合同迁移……对于任何寻找相同“错误”的人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM