Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

Filter by
Sorted by
Tagged with
16 votes
1 answer
8k views

How much does it cost to use a contract?

Still new to ethereum and would like to know the price for a contract.
Patoshi パトシ's user avatar
19 votes
2 answers
31k views

how to estimate gas cost?

I have a function that iterate through an array, which could cost a lot of gas. But I still want to test out the estimate gas cost, then decide if I should maintain the design or not. function ...
dome some's user avatar
  • 319
21 votes
3 answers
34k views

Can I set the gas price to whatever I want?

The default gas price is 0.02e12 Wei. But while creating transactions on the command line or Geth's Javascript console you can define your own gasPrice: web3.eth.sendTransaction({/* ... */, gasPrice: ...
q9f's user avatar
  • 32.9k
3 votes
2 answers
1k views

Would a minimal gas price tx ever be mined?

I want to mine and charge a minimal gas price (like the minimum required to prevent infinite loops and such), to enable many smaller transactions to be confirmed super cheaply and to lower the cost of ...
JohnAllen's user avatar
  • 1,318
22 votes
1 answer
3k views

What were the key assumptions and analyses that went into setting Ethereum's gas price?

Frontier was launched with a default gas price of 0.05e12 wei. In Homestead, the default was reduced to 0.02e12 wei. If this gas price is too low and operations on Ethereum are too cheap, for ...
eth's user avatar
  • 85.8k
16 votes
5 answers
26k views

How to get the actual Gas price?

Is there a way to get the lowest and average price miners are asking for gas? Some statistics sites seem to have prices but they are outdated.
Roland Kofler's user avatar
5 votes
1 answer
537 views

Why does zero to non-zero in storage take higher gas?

According to EIP-1087 https://eips.ethereum.org/EIPS/eip-1087 , it take 20,000 gas to set a slot from 0 to non-zero with SSTORE while it takes only 5000 gas for any other change. Why does 0 to non-0 ...
Naveen V's user avatar
16 votes
1 answer
4k views

How does "Gas Price Oracle" work?

How does "Gas Price Oracle" work? "Gas Price Oracle" is explained here in go-ethereum wiki, but it doesn't explain how it works. Where does it get the data from? How does it do its calculations?
Satoshi Nakanishi's user avatar
15 votes
6 answers
10k views

Why not mine my own transactions?

I have a contract which needs to be updated occasionally. So I create a transaction, sign it and send it to the network. When I do that, I state a gas-price. The higher the gas-price is, the faster ...
goodvibration's user avatar
9 votes
1 answer
874 views

How does EIP-1559 make Ethereum fees better?

I have a few questions that are mostly related to each other. I don't understand how EIP-1559 makes it a better way than the current one about fees. Since EIP-1559 brings priority fees and miners ...
Nika Kurashvili's user avatar
6 votes
1 answer
2k views

Is there a 'default' gas price and does it change when price of ether relative to fiat rises?

I understand how gas pricing works, so that is not my question. My question is, as the price of ether relative to fiat (US $) rises, does the 'default' gas price lower (if there is such a thing as ...
Thomas Jay Rush's user avatar
4 votes
2 answers
3k views

What gives ether it's intrinsic value? [duplicate]

Trying to understand how ethereum and blockchain work. I keep hearing that miners are needed to do the computations to unlock a block (don't know if that's the correct term). My question is this: ...
Matt Cashatt's user avatar
1 vote
2 answers
499 views

Will gas be free in ETH 2.0?

Will gas be free in ETH 2.0? More generally, will gas ever be free? Is it feasible in near decades?
porton's user avatar
  • 1,774
23 votes
2 answers
65k views

Gas price in ETH unit

I am wondering if there's a website that provides the price of the standard gas limit (21000 Gas, transaction cost for sending ETH) in ETH unit. I checked Ether.Fund site, but it provides the gas ...
suburhok's user avatar
  • 401
10 votes
1 answer
2k views

Geth Gas price too low for acceptance

Why is geth not letting me post a transaction with a low gasPrice? > ./geth console > eth.sendTransaction({ "from": "...", "to": "...", "gas": "30000", "gasPrice": "10", "value": "0.1" }) Gas ...
Micah Zoltu's user avatar
8 votes
1 answer
332 views

Can I estimate the total gas limit of several dependent transactions?

Assume two dependent transactions A and B. Transaction B depends on transaction A and will fail if transaction A has failed. I would like to estimate the gas limit required for the success of both ...
amanusk's user avatar
  • 266
7 votes
1 answer
643 views

Is it possible to mine my own txs with no fees?

It seems like minimum tx fee is around .001$ in Ethereum (maybe a little bit less) but I was wondering about the possibility of performing zero fee transactions, mining them by myself. Obviously, ...
Juan Ignacio Pérez Sacristán's user avatar
6 votes
2 answers
6k views

How can I estimate price of data storage? [duplicate]

I'd like to make estimations of the cost of an application, and one of the things I need is the price to store n kB of data on a contract. In ether and in USD. Where could I find rates or prices of ...
Teleporting Goat's user avatar
5 votes
2 answers
1k views

With the rising Ether price to $9, doesn't this mean gas costs more?

With the increase in the ether price, doesn't gas cost more, hence higher price to execute a contract? What is the current gas price today to execute a typical contract or send a transaction?
Patoshi パトシ's user avatar
4 votes
1 answer
4k views

Why "Insufficient funds" error?

I'm trying to send a transaction into testnet from an account having a balance of 516,561,000 Babbages. According to my calculations, this is exactly the cost of the transaction to perform. ...
Juan Ignacio Pérez Sacristán's user avatar
0 votes
1 answer
9k views

5 gwei in gas, how long will this take?

I'm creating an erc20 contract and deploying with metamask. I only have 3 dollars in ether, so I could only afford 5 gwei for gas. It's been 3 hours, how long will it take? It looks like 40 gwei would ...
henry's user avatar
  • 3
12 votes
2 answers
13k views

How do I set a gasPrice with ethers deploy script?

I'd like to set a gasPrice in my deploy script, so I could deploy and let miners pick up my transaction when gas is low. Like deploy my contract over night while I'm sleeping to save money. How can I ...
caker's user avatar
  • 195
8 votes
3 answers
1k views

trouble matching gas used in transaction with difference in account balance

I've fired up my testrpc and deployed a simple HelloWorld contract using truffle. I send a simple transaction to my contract and I log my account balance before and after the transaction. ...
natsuki_2002's user avatar
8 votes
2 answers
950 views

eth.gasPrice is returning less value than expected

As mentioned in documentation eth.gasPrice returns the current gas price. The gas price is determined by the x latest blocks median gas price. I was relying on this method to estimate current gas ...
Prashant Prabhakar Singh's user avatar
8 votes
1 answer
2k views

How do events influence a transaction's gas?

Since events are stored in the transaction receipts trie they should influence the gas a transaction costs since storage costs, right?
rosul's user avatar
  • 353
7 votes
5 answers
5k views

How are miners minimum acceptable gas price determined?

In section 5 of the yellow paper, it states "there will be a (weighted) dustribution of minimum acceptable gas prices.." My question is what, if any, is the enforcement mechanism that ensures this ...
Gruff McGruff's user avatar
6 votes
2 answers
5k views

Deploying contract with no cost (gasPrice 0) on private network

In order to achieve a no-coin bootstrapping of my private network I'm trying to deploy a first special contract having zero funds in owner wallet (every wallet of this private network should have zero ...
Juan Ignacio Pérez Sacristán's user avatar
6 votes
2 answers
4k views

weird transaction sending to self

see some weird txs calling self addresses, for example, the last 2(the first and second tx in this block) transactions, at https://etherscan.io/txs?block=6475251&p=2 https://etherscan.io/tx/...
DiveInto's user avatar
  • 470
5 votes
2 answers
4k views

How to get the transaction cost in a Truffle unit test?

How can I get the actual gas consumed by a sendTransaction inside a truffle test? In the following test, buyer sends an amount of 50 ETH to a contract: const EmptyContract = artifacts.require("...
Robert's user avatar
  • 317
5 votes
2 answers
2k views

Will Ethereum 2.0 gas cost decrease?

I want to generate large number of transaction probably in thousands per day to store document hashes of certificates from Universities so that I can verify the integrity of documents through time ...
Mr.SsS's user avatar
  • 415
5 votes
1 answer
2k views

what is difference between "gas" "gas price" and "fee"?

Can we say that gas is the unit of transaction fee ? And gas price is the same transaction fee ? If so, why we do not use ether and wei instead of gas ?
Questioner's user avatar
  • 2,670
4 votes
1 answer
736 views

How do you provide a GasPrice and GasLimit to overcome the "low tx nonce or out of funds" log message

I am getting the following logged by my private chain geth node when running a test in truffle: removed tx ( TX(ff8ec4f713e64fb25df07d153607e29629c9276b57e0b7e331f17b5a3c31fdd1) Contract: ...
Interition's user avatar
4 votes
1 answer
3k views

Calculate transaction costs for storing data

I'm trying to figure out how the transaction costs are calculated for a transaction that is storing data on the Ethereum Blockchain. It seems I'm always off. Here is my way of calculating (I'm using ...
Mr. 124's user avatar
  • 65
3 votes
2 answers
6k views

Error "replacement transaction underpriced" using Nonce method of cancelling transaction

I have a pending transaction that is not going through because of low gas price. I tried sending a new transaction with the same 57 nonce (https://etherscan.io/tx/...
pachecovich's user avatar
3 votes
1 answer
3k views

SLOAD costs 800 gas - how is it possible?

I've got a very simple contract. It narrows down and measures cost of loading a storage variable: pragma solidity ^0.7.6; contract Bench { uint256 public data; function increment() ...
CodeSandwich's user avatar
3 votes
2 answers
639 views

Will sharding allow for a much lower gas limit?

The current gas costs are for all nodes to process a transaction or contract function call. Once we have sharding, only a subset on the nodes(1 shard) will process that transaction/contract function ...
Jethro82's user avatar
  • 115
3 votes
1 answer
383 views

Determine network congestion, min required gas/gas price based on current conditions

Say I have an application that is making some low priority transactions. I'd like to keep them as low priority as possible without having them take 20+ minutes or poof and disappear. What's the best ...
LampShade's user avatar
  • 640
3 votes
1 answer
1k views

When calling a smart contract function, who gets paid and how much does the caller pay?

This is an extended question to What is "gas" and transaction fee in Ethereum?. Who gets paid and how much does the caller pay? Let's make some assumptions: There is a function F which ...
Siu Ching Pong -Asuka Kenji-'s user avatar
3 votes
1 answer
10k views

Can gas price be fixed under 2 gwei?

I see that 20 gwei is the default gas price. A simple token exchange fee is around 0.5$ at the current price (230$). Reducing gas to 2 gwei takes more time to confirm transaction but reduce the fee. ...
ilmistra's user avatar
2 votes
1 answer
34 views

What do original, current, and new value mean in the context of pricing storage updates?

I've heard these terms thrown around in discussions surrounding storage pricing in the EVM. But what do they mean, more precisely?
Paul Razvan Berg's user avatar
2 votes
2 answers
1k views

I set a 3 gwei for gas price. Now my transaction has been pending for 48+ hours now. But blocks aren't even full!

I tried to set a gas price of 3 gwei for interacting with a smart contract. Now the transaction is pending for 48+ hours. If the blocks aren't full, why dont the miners pick it up? I can bump the fee ...
Patoshi パトシ's user avatar
2 votes
1 answer
2k views

How to caculate/estimate Gas Limit and Gas Price based on current state of the ether network?

Ethgasstation and similar websites estimate proper Gas Price based on current state of Ethereum network. Is there any way of using working with Geth/web3 to estimate proper Gas Price? and similar to ...
Vahid Kharazi's user avatar
2 votes
4 answers
2k views

Is there a gas price limit?

Every transaction on the Ethereum blockchain must consume less gas than the block gas limit, which can fluctuate depending on the weighted average sentiment of miners. To help incentivize inclusion of ...
lungj's user avatar
  • 6,680
2 votes
1 answer
3k views

Send ethereum tokens with zero gas price

I have seen the following transaction: https://etherscan.io/tx/0x173fd250d63a62bb407f214ff924b49e1c90593572eab1a8c523783f2aa58ba3 And I've seen that the gas price is 0. How could I do the same? When ...
Victor's user avatar
  • 443
1 vote
2 answers
874 views

High Gas Flashbots Transaction

I'm trying to better understand flashbots impact on frontrunning. Can anyone help me understand why this sandwich attack tx from a Flashbots bundle would pay such a high gas price? Here is a similar ...
j2abro's user avatar
  • 143
1 vote
1 answer
453 views

Alternative for String type in smart contract and Solidity?

Regarding the fact using String in contract is expensive, is there any alternative type in Solidity ? The input value (Payload) I want to set is as follows : {"SQN":4,"Node_ID":"...
Questioner's user avatar
  • 2,670
1 vote
1 answer
1k views

Infura not broadcasting my transactions

I am using Infura with the mainnet and web3py to interact with smart contracts and send transactions. Last week this same code worked fine, but today, trying to send the transaction for the deployment ...
RJ-mac's user avatar
  • 21
1 vote
2 answers
2k views

Explanation of Geth's Command Line option: targetgaslimit?

I have been trying to figure out what the targetgaslimit parameter does exactly for Geth, in the context of Private Blockchains. I have seen the following explanation but it never helped me: "Target ...
3mrsh's user avatar
  • 93
1 vote
1 answer
2k views

reliable way to get gas price [duplicate]

I've read that eth.gasPrice isn't reliable, because sometimes it suggests gas prices too low. Is there some API or something similar where I can get the current gas price? This is for an automated ...
Daniel Gretzke's user avatar
0 votes
2 answers
760 views

How can I send tokens to large number of addresses?

I have to send 221,000 tokens (ERC20) to 6477 different addresses. Airdrop guy used some automatic sending app and that tells 1.94 ETH is needed as approx cost of operation to send all this. Is there ...
user3183426's user avatar