I have tried adjusting the Gas Limit and GWEI and I get this error. I am using infura and Ropsten. Has anyone any ideas about this?

Code -

        var rawTransaction = {"from":myAddress,
        "data":contract.addBonus.getData(bonusType, target, year, month, day, token, bonus, bonusName, ineq),

        console.log("raw txn " + rawTransaction);
        //creating tranaction via ethereumjs-tx
        var transaction = new Tx(rawTransaction);
        //signing transaction with private key
        //sending transacton via web3js module
    //    web3js.eth.sendRawTransaction('0x'+transaction.serialize().toString('hex'))
    //    .on('transactionHash',console.log);

       var serializedTx = transaction.serialize();

       web3js.eth.sendRawTransaction('0x'+serializedTx.toString('hex'), function(err, hash) {
       if (!err)
          console.log("hash = " + hash);
       else console.log("err = " + err);

I get this error -

err = Error: insufficient funds for gas * price + value

2 Answers 2


Key was wrong - I corrected the key and now it runs.


This is probably not the case here since you're using Infura, but in case others are seeing this error when submitting transactions to a light node:
If the light node has no peers to ask about chain state, it may return this error since it can't determine the balance of the sender, and thus considers it insufficient.

  • The key was incorrect. I already corrected it. Oct 18, 2018 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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