Questions tagged [gas-price]
Questions dealing with the gas price of a transaction.
53
questions
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.
19
votes
2
answers
30k
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 ...
21
votes
3
answers
33k
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: ...
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 ...
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 ...
16
votes
5
answers
24k
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.
5
votes
1
answer
303
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 ...
16
votes
1
answer
3k
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?
13
votes
6
answers
9k
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 ...
8
votes
1
answer
692
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 ...
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 ...
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: ...
1
vote
2
answers
496
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?
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 ...
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 ...
7
votes
1
answer
631
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, ...
6
votes
2
answers
5k
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 ...
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?
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. ...
0
votes
2
answers
671
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 ...
0
votes
1
answer
8k
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 ...
8
votes
2
answers
859
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 ...
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?
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. ...
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 ...
7
votes
1
answer
226
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 ...
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 ...
6
votes
2
answers
3k
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/...
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("...
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 ...
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 ?
4
votes
1
answer
2k
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 ...
4
votes
1
answer
729
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: ...
3
votes
1
answer
371
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 ...
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 ...
3
votes
2
answers
3k
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/...
3
votes
2
answers
631
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 ...
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() ...
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. ...
2
votes
2
answers
2k
views
Internal contract-to-contract call
I am confused with the following sentence in the Solidity documentation:
During the execution of the fallback function, the contract can only rely on the “gas stipend” it is passed (2300 gas) being ...
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 ...
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 ...
2
votes
2
answers
714
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 ...
2
votes
1
answer
1k
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 ...
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 ...
1
vote
1
answer
445
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":"...
1
vote
1
answer
509
views
How much gas does looking up block.timestamp consume?
Trying to get some insight as to whether or not it's more optimal to call block.timestamp repeatedly for comparisons or to set a (memory) variable to hold the value and use it instead.
I've looked at ...
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 ...
1
vote
2
answers
497
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 ...
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 ...