Insufficient funds for gas*price+value error
Asked Answered
V

5

14

While deploying contract on blockchain, on adding transaction it gives error insufficient funds for

gas *price +value

What is that mean?

Vaclava answered 23/3, 2017 at 8:27 Comment(1)
How did you deploy the contract? Parity, Truffle, etc? What does the contract look like?Mcafee
F
10

Value is the amount of Ether set to be transferred with the transaction. E.g. "Send 10 ETH to Contract X."

Gas is the transaction verification fee; basically units of network computing required to execute the transaction. E.g. "30,000 gas estimate".

Price is the bid for Gas, priced in Ether. E.g. "0.0001 ETH/gas". While the gas requirement depends on the complexity of the transaction, the bid for gas is under the sender's control, with higher gas bids incentivizing miners to prioritize the transaction.

Altogether, something like "Send 10ETH to the contract with 30,000 gas in processing at 0.0001 ETH/gas" = total transaction funding required, and it exceeds the sending account balance. Meaning, insufficient funds.

Hope it helps.

Frowsty answered 23/3, 2017 at 16:57 Comment(4)
can you please explain what to write in code to avoid this error ? because this is bit confusuingOblivious
@rob-hitchens If the contract seems to be deployed, but the migration, seems, was not saved "Saving migration to chain.insufficient funds for gas * price + value" , should I re-deploy the contract again?Armillas
Should point Value somewhere in code, e.g: truffle.js?Armillas
Start with truffle networks to get a sense of how successful it was. Maybe good maybe not.Frowsty
T
2

In my private Ethereum Blockchain network, I resolved the issue by changing the chainId variable in my genesis block code to any random number except 0.

Please find the code for my genesis block below:

{
"config":{
        "chainId": 45,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0,
        "byzantiumBlock": 12
    },
  "alloc"      : {},
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x20000",
  "extraData"  : "",
  "gasLimit"   : "0x2fefd8",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}

I hope it might be helpful for you.

Torsibility answered 3/5, 2018 at 13:35 Comment(0)
A
2

If you are a Chainlink node operator, to fix this error you will need to fund your oracle account OR the oracle contract.

The oracle contract is what you "deploy" in remix. The oracle account is the page you can log into. See here for more info.

If you are a contract creator, the node operator you are trying to hit may have insufficient ETH in their address, or your contract is not funded properly.

See the example walkthrough for more information on hitting a node.

Alvardo answered 29/10, 2019 at 4:1 Comment(0)
J
1

I encounter this error for a while. and for those who still have the same issue here are some suggested solution:

  1. make sure you have enough ether in the account provided to the send method.
  2. make sure you provided the send method with the folowing properties : from , gas , gasPrice like so : .send({ from: accounts[0], gas: '0xF4240', gasPrice: '0x4A817C800'})
  3. make sure the gas and gasPrice are hexadecimal.
Juliennejuliet answered 4/11, 2021 at 17:11 Comment(0)
C
1

in https://dashboard.alchemyapi.io/ go to :

enter image description here

  1. Apps
  2. select your app
  3. Edit App
  4. select chain Ethereum
  5. select network Ropsten

make sure to change the network on Meta Mask from Main Net to Ropstn Test Network. enter image description here

Make sure to have balance in Ropsten network, you can use this url to transfer some Ether to your wallet https://faucet.ropsten.be/

that set.

Conto answered 18/11, 2021 at 6:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.