How to fix "insufficient funds for gas * price + value"?
Asked Answered
I

1

6

Windows 10 Home x64
bignumber.js@^7.2.1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

Full version reference:
https://github.com/tooploox/ethereum-ico-examples/blob/master/package.json

I have done a lot of research. I found so many sources but none of them found a solution and some threads are not updated any more or probably they already found an answer but did not post it. Some people manage to fix it in Mac, but I am using Windows. Some people fix it 5 months ago but when I tried it, it did not work out, buy changing the gas higher a little bit and run again. I also have 6 Ether in my Ropsten account.

This is my truffle.js:

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

when I 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 reference:
https://github.com/tooploox/ethereum-ico-examples
Instruction Reference:
https://www.tooploox.com/blog/create-and-distribute-your-erc20-token-with-openzeppelin

Incessant answered 15/11, 2018 at 5:13 Comment(1)
Have you tried reducing the gas price?Currier
A
5

Try setting gas price in truffle.js file.

    gasPrice: 10000000000 // Something price like this

Source

Hope this helps!

Autotruck answered 15/11, 2018 at 9:55 Comment(2)
thank you! it really works and leads to another problemIncessant
This is the follow up question, you might wanna check thanks! #53321030Incessant

© 2022 - 2024 — McMap. All rights reserved.