【问题标题】:how to fix "insufficient funds for gas * price + value"?如何解决“gas * price + value”的资金不足?
【发布时间】:2019-04-18 03:58:12
【问题描述】:

Windows 10 家庭 x64
bignumber.js@^7.2.1
openzeppelin-solidity@1.10.0
反应@16.4.1
react-dom@16.4.1
松露@4.1.13
web3@1.0.0-beta.34
完整版参考:
https://github.com/tooploox/ethereum-ico-examples/blob/master/package.json

我做了很多研究。我找到了很多来源,但没有一个找到解决方案,有些线程不再更新,或者他们可能已经找到答案但没有发布。有些人设法在 Mac 中修复它,但我使用的是 Windows。有些人在 5 个月前修复了它,但当我尝试它时,它没有成功,购买将气体调高一点,然后再次运行。我的 Ropsten 帐户中还有 6 Ether

这是我的truffle.js

ropsten: {
  provider: new HDWalletProvider(mnemonic, "https://ropsten.infura.io/"+infura_apikey),
  network_id: 3,
  gas: 4000000
},  

当我truffle migrate --network ropsten

it triggers this error:   
Running migration: 1_initial-migration.js
  Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
insufficient funds for gas * price + value

Github 参考:
https://github.com/tooploox/ethereum-ico-examples
指令参考:
https://www.tooploox.com/blog/create-and-distribute-your-erc20-token-with-openzeppelin

【问题讨论】:

  • 你试过降低gas价格吗?

标签: ethereum solidity smartcontracts truffle erc20


【解决方案1】:

尝试在 truffle.js 文件中设置 gas 价格。

    gasPrice: 10000000000 // Something price like this

Source

希望这会有所帮助!

【讨论】:

猜你喜欢
  • 2017-08-15
  • 2018-05-03
  • 2021-11-19
  • 2018-03-20
  • 2019-01-03
  • 2022-06-11
  • 1970-01-01
  • 2018-04-30
  • 2018-11-30
相关资源
最近更新 更多