I am trying to submit a transaction via web3 and getting the following error: Error: Returned error: insufficient funds for gas * price + value.

Here is my code:

const tx = await this.web3.eth.accounts.signTransaction(

the console statement outputs the following:

{ from: '0xc9d71816ffe465bb682302808f6169ee2B704468', to: '0x556586125be6e8c3ace675da4fdcb04369ed999d', gas: '0x5208',
gasPrice: '0x4a817c800', value: '0x10457c59124000' }

The account I am trying to has the requisite ether. What could be wrong?


I had a similar problem. I was able to resolve it by changing the format of my private key. The upgraded version of Web3 accepts the key in "0x" format.

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.