0

While deploying contract to ropsten tesnet (truffle migrate --network ropsten) I am getting an error:

insufficient funds for gas * price + value

  ropsten: {
      network_id: 3,
      host: "localhost",
      port:  8545,
      gas:   4698712,
      gasPrice:   65000000000,
      from: '14e6b19304fb3c98a73acea5f80d2c056ee5c09f'

    }

I checked eth.syncing, it was initially false. But after some times it shows something like this:

 eth.syncing
{
  currentBlock: 3733045,
  highestBlock: 3737770,
  knownStates: 46235540,
  pulledStates: 46235540,
  startingBlock: 3732532
}

How can I fix the error and solve the syncing issue. The syncing has not been completed since 7 days.

| improve this question | | | | |
  • For faster syncing : Be sure that you have SSD and i recommend you to use Parity instead of Geth. – Kerem atam Jul 31 '18 at 16:57
1

For one, your node is slightly out of sync, by about 5000 blocks or so,

For another, 0x14e6b19304fb3c98a73acea5f80d2c056ee5c09f has no ropsten ether in it, so you would be unable to deploy even with a synced node.

Try using the faucet to get some testnet ether and trying again (you will have to wait until your node has synced up to the block containing the tx that gives you ether).

| improve this answer | | | | |
  • Not much you can usually do, beyond buying an SSD if you're using an HDD. Just wait it out, ropsten syncs don't take very long, and you're almost done. – Raghav Sood Jul 30 '18 at 7:28
  • Thanks. I got an Ether from faucet. The problem was that metamask could not import account using JSON. So, I extracted the private key through myetherwaller.com and imported it in metamask. Now its shows the ether balance and account info correctly on metamask. I was able to deploy contract successfully after sync was completed. Thanks mate! – Vivek Sadh Jul 30 '18 at 7:41
  • One more question, what do you mean by ropsten ether ? Ether means ether and I think it can be used in any network, isn't it ? Ofcourse its a fake ether though. – Vivek Sadh Jul 30 '18 at 7:42
  • It's the same as regular ether, but since they are two separate chains, you need to get some for the correct chain. – Raghav Sood Jul 30 '18 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.