Hi there,
I can not send transaction by Error: insufficient funds for gas * price + value
Please help me.
System information
Geth version: 1.8.0-unstable
OS & Version: OSX
Commit hash : 722bac8
Expected behaviour
$ geth --networkid 11 --nodiscover --maxpeers 0 --datadir ~/data_testnet console 2>> ~/data_testnet/geth.log
Welcome to the Geth JavaScript console!
instance: Geth/v1.8.0-unstable-722bac84/darwin-amd64/go1.9.3
coinbase: 0x3aabdf52f4b29276847f0a767410cf3cad3d228e
at block: 593 (Sun, 28 Jan 2018 21:08:20 JST)
datadir: /Users/suzukikeita/data_testnet
modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
> eth.getBalance(eth.accounts[0])
2.965e+21
> eth.getBalance(eth.accounts[1])
0
> eth.gasPrice
18000000000
> eth.getBalance(eth.accounts[0]) - 20000 * eth.gasPrice
2.9649996399999996e+21
> personal.unlockAccount(eth.accounts[0])
> eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei("1", "ether")})
Actual behaviour
> eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei("1", "ether")})
Error: insufficient funds for gas * price + value
at web3.js:3143:20
at web3.js:6347:15
at web3.js:5081:36
at <anonymous>:1:1
> eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei("1", "ether"), gas:20000})
Error: insufficient funds for gas * price + value
at web3.js:3143:20
at web3.js:6347:15
at web3.js:5081:36
at <anonymous>:1:1
Steps to reproduce the behaviour
Backtrace
$ geth --networkid 11 --nodiscover --maxpeers 0 --datadir ~/data_testnet console 2>> ~/data_testnet/geth.log
Welcome to the Geth JavaScript console!
instance: Geth/v1.8.0-unstable-722bac84/darwin-amd64/go1.9.3
coinbase: 0x3aabdf52f4b29276847f0a767410cf3cad3d228e
at block: 593 (Sun, 28 Jan 2018 21:08:20 JST)
datadir: /Users/suzukikeita/data_testnet
modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
> eth.getBalance(eth.accounts[0])
2.965e+21
> eth.getBalance(eth.accounts[1])
0
> eth.gasPrice
18000000000
> eth.getBalance(eth.accounts[0]) - 20000 * eth.gasPrice
2.9649996399999996e+21
> personal.unlockAccount(eth.accounts[0])
> eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei("1", "ether")})
Error: insufficient funds for gas * price + value
at web3.js:3143:20
at web3.js:6347:15
at web3.js:5081:36
at <anonymous>:1:1
> eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei("1", "ether"), gas:20000})
Error: insufficient funds for gas * price + value
at web3.js:3143:20
at web3.js:6347:15
at web3.js:5081:36
at <anonymous>:1:1
-
#1
Друзья, всем привет!
Нужно отправить токен BlueSparrow в сети ERC-20, но при отправке через MetaMask выдает ошибку Insufficient funds for gas. Открыл кошелек через MEW, тоже не дает вывести, но при выставлении Gas Limit’a вручную кнопочка SEND загорается. Собсно, поискав ответ, почему так происходит, наткнулся на вот это «Похоже, это проблема с некоторыми контрактами с определенными бэкэндами, где бэкэнд не может правильно оценить газ».
Теперь вопрос, как можно узнать, сколько газлимита выставить при транзакции? Могу выставить в принципе до 250000, но хватит ли этого?
exI
Гений мысли
-
#2
Друзья, всем привет!
Нужно отправить токен BlueSparrow в сети ERC-20, но при отправке через MetaMask выдает ошибку Insufficient funds for gas. Открыл кошелек через MEW, тоже не дает вывести, но при выставлении Gas Limit’a вручную кнопочка SEND загорается. Собсно, поискав ответ, почему так происходит, наткнулся на вот это «Похоже, это проблема с некоторыми контрактами с определенными бэкэндами, где бэкэнд не может правильно оценить газ».
Теперь вопрос, как можно узнать, сколько газлимита выставить при транзакции? Могу выставить в принципе до 250000, но хватит ли этого?
зайти на адрес контракта этого токена, найти похожие транзакции transfer, посмотреть сколько в них расходуется газлимита, прибавить сверху 30000 для запаса на всякий случай. Имейте ввиду, что это для обычного перевода, то-есть НЕ на адрес контракта, например адрес биржи
Последнее редактирование: 9 Янв 2022
-
#3
зайти на адрес контракта этого токена, найти похожие транзакции transfer, посмотреть сколько в них расходуется газлимита, прибавить сверху 30000 для запаса на всякий случай. Имейте ввиду, что это для обычного перевода, то-есть НЕ на адрес контракта, например адрес биржи
Да, мне просто нужно перевести токены на адрес кошелька другому человеку. Большое спасибо!!
-
#4
поставь скока угодно много, лишнее сеть не возьмет
Sending Address has over 1 Eth in current Balance.
Using the Geth
console, I can send many transactions of any amount less than .033
eth.sendTransaction({to:'0x8B9da75fda99bAd680154050Ba386523CA3AD112',
from:'0x62396567241bC92Ee3D082AC3C4144511Ec6c773',
value:web3.toWei(.033,'ether'),gas:30000})
"0x113dd5b9c8bb6d48fe2b3ef16576905f6e46aa4ed6cd080120a2aaf54113e7b4"
If I try to send .034 ETH or greater, then I always get this error.
eth.sendTransaction({to:’0x8B9da75fda99bAd680154050Ba386523CA3AD112′,
from:’0x62396567241bC92Ee3D082AC3C4144511Ec6c773′,value:web3.toWei(.034
,’ether’),gas:30000}) Insufficient funds for gas * price + value
at web3.js:3119:20
at web3.js:6023:15
at web3.js:4995:36
at :1:1
jrbedard
5241 gold badge6 silver badges15 bronze badges
asked Oct 5, 2016 at 17:04
5
It seems to be a bug in geth, try the solution presented here : https://github.com/ethereum/go-ethereum/issues/2173
they assume that the solution is :
Convert all values to hex (with bc if you use bash)
Make sure to specify both gas and gasPrice! Enclose all values in single quotes
eth.sendTransaction({from:’0x123456′, to:’0x123456′,
value: ‘0x8AC4270ACC4B7FF7’, gas: ‘0x5208’, gasPrice:
‘0x4A817C800’});»
answered Oct 5, 2016 at 18:06
Badr Bellaj♦Badr Bellaj
18.2k4 gold badges55 silver badges73 bronze badges
2
I wanted to add an important information:
gas * price + value really means MAXGas * price.
In my case transactions failed from time to time when gas price increased because gas limit was set too high! Even if you know that it won’t be that expensive you should use a reasonable amount.
answered Jul 3, 2018 at 19:58
CodingYourLifeCodingYourLife
6791 gold badge6 silver badges17 bronze badges
1
I was able to solve my issue by upgrading geth to: Geth/v1.4.16-stable/linux/go1.6.2
answered Oct 7, 2016 at 1:10
John HeeterJohn Heeter
4911 gold badge4 silver badges5 bronze badges
5
i solved this by reducing my gas
answered Oct 16, 2017 at 0:02
Aasim aliAasim ali
1312 silver badges3 bronze badges
2
gas:4.7M, gasPrice:101 GWei => error: insufficient funds.
gas:3.7M, gasPrice:101 GWei => it works ok.
gas:4.7M, gasPrice:100 GWei => error: insufficient funds.
gas:4.7M, gasPrice:90 GWei => error: insufficient funds.
gas:4.7M, gasPrice:70 GWei => it works ok.
gas:4.7M, gasPrice:80 GWei => it works ok.
gas:4.7M, gasPrice:85 GWei => error: insufficient funds.
gas:4.7M, gasPrice:82 GWei => it works ok.
...
gas:1.0M, gasPrice:10 GWei => it works ok.
So, there is a (variable?) limit for gas*gasPrice that throws the error. Using gas and prices lower and far from this limit is probably the safer approach.
answered Feb 1, 2018 at 17:28
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.
answered May 3, 2018 at 13:28
2
I was having the same issue using Sepolia Test Network. In the truffle-config.js file I copied and pasted another network setting to create one for Sepolia. This configuration came with default gas and gasPrice parameter values. I removed them and let Sepolia dictate the default values for those parameters.
At the end my Sepolia config section was:
sepolia: {
provider: () => new HDWalletProvider(mnemonic,url_to_infuria_service),
network_id: 11155111,
}
}
Error was gone, and truffle log showed the the total cost for the transactions.
answered Oct 11, 2022 at 11:36
yaachyaach
1211 bronze badge