Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

154 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
1 answer
492 views

Does anything change on getGasPrice( ) in Web3js after EIP-1559?

Using getGasPrice in web3js returns the last few blocks median gas price. After EIP-1559, the fees system is divided into Base + Tip. My question is, what is returned using getGasPrice after EIP1559? ...
sigmaxf's user avatar
  • 1,050
4 votes
1 answer
484 views

Understanding gas tokens and create2

I am going through a sample gas token code on Ethereum. The token mints some dummy smart contracts using CREATE2 and then calculates the address. Later on it destroys them to get the gas refund. ...
smartContract's user avatar
3 votes
0 answers
232 views

block.basefee, tx.gasprice and gasleft() in Optimism/Arbitrum

Does block.basefee, tx.gasprice and gasleft() work the same in Optimism and Arbitrum as they do on L1? If not, how do they differ? Do these L2s even have a base fee like L1 does? I'm trying to make a ...
Jonah's user avatar
  • 655
3 votes
0 answers
198 views

Does brownie have functionality to analyze gas costs for all function calls?

Does brownie have any sort of functionality that gives a breakdown of the cost to deploy all contracts and execute all function calls within a brownie project with min, max and average gas cost ...
MShakeG's user avatar
  • 573
3 votes
0 answers
524 views

Bypassing metamask notice about "Insufficient funds for gas"

I wish to make a transfer of the remaining ETH from one wallet to an other. Trying to do it from metamask, it prevents me to do so with the "Insufficient funds for gas" error. Event though ...
challet's user avatar
  • 131
3 votes
0 answers
216 views

Denial attacks by submitting transactions with strategically calculated gas prices

As can be understood from the title, there is a specific form of denial attack where specific transactions are blocked by submitting transactions with strategically calculated gas prices. Example 1: ...
osolmaz's user avatar
  • 389
3 votes
0 answers
250 views

Why are there pending TXs with high gas prices?

Rinkeby has pending transactions, some of which have gas prices of 100+ gwei and have been pending for over half an hour. Why is that? Are sending too little gas?
will_durant's user avatar
  • 1,104
3 votes
0 answers
571 views

The gas price on the Ropsten test net today rose from 0.211 ether per million gas to 1.8 ether per million gas, why?

Seems like Ethereum adjusts its gas price to meet demand. How does it do this?
dragosb's user avatar
  • 31
2 votes
0 answers
2k views

Set maxFeePerGas and maxPriorityFeePerGas dynamically in ethers js

I want to set the value of maxPriorityFeePerGas and maxFeePerGas these two parameters when sending a transaction, say 10 gwei greater than the response from getFeeData() function. /* provider....
SHRENIK SHAH's user avatar
2 votes
0 answers
75 views

Eth-gas-reporter typeError

I am trying to understand how the eth-gas-reporter works but I keep getting TypeError: invalid reporter 'eth-gas-reporter' when I ran truffle test. Specifically the output is: Using network '...
null_user's user avatar
2 votes
0 answers
337 views

Do providers block transactions sent with a too low gas fee?

I am getting the following error when deploying a contract: ProviderError: err: max fee per gas less than block base fee, address ..., maxFeePerGas: 45000000000 baseFee: 63475853125 (supplied gas ...
phaze's user avatar
  • 1,500
2 votes
1 answer
779 views

gas fee on OpenSea

First, I'm brand new to the Ethereum platform, so I do apologise if any of the following is considered stupid questions. Now, I will ask my question anyway I am setting up the first sale of one of my ...
Mohamed Dabbous's user avatar
2 votes
0 answers
1k views

How to optimize (lower gas) random ERC721 NFT mint?

I am creating an NFT that on-chain generates random body parts which off-chain is being combined and made into images and such. I am doing it on-chain to keep it true to the purpose of NFTs, but also ...
Cobble's user avatar
  • 31
2 votes
1 answer
58 views

Most precise website to estimate gas price for volatile days

I am trying to understand which website is the best way to estimate the gasprice for volatile days. There are some sites but they do not work out so well on a volatile day like today. I compared and ...
user54512's user avatar
  • 121
2 votes
0 answers
152 views

What Web3JS method do I call to know what value to use for the gas price with sendSignedTransaction?

I am using Web3JS 1.0+ to send transactions to my smart contract. I've been using the following constant for the gas price in my code that I got a long time ago from a tutorial. What is the "...
Robert Oschler's user avatar
2 votes
0 answers
91 views

Early 2018 gas price volatility

What have caused the recent default gas price To go up (default was in some point near 100 GWei) To come down (now it seems to be 20 GWei) Specifically, was this because of Actual demand for ...
Mikko Ohtamaa's user avatar
2 votes
0 answers
47 views

Posted blocks on ethgasstation/Low gas price watchlist

Does anyone understand the posted blocks on ethgasstation/Low gas price watchlist? I would guess that posted block < mined block is always true - but this is not what I see there.
ligi's user avatar
  • 1,173
2 votes
0 answers
184 views

what is the lowest gas price that clients (Geth / Parity) relay

I read here that nodes (at least Geth) only relay transactions that have a gas price above some limit. What is that default limit currently? As also mentioned there it is probably not zero as that ...
SCBuergel's user avatar
  • 8,544
2 votes
0 answers
142 views

Very big fee for token on testnet

I'm new here and try to make my own token. I kinda made it actually, but fee for it is very big(cheapest one is 0.65 eth). Here's my code: pragma solidity ^0.4.13; library SafeMath { function mul(...
Tukanoid's user avatar
2 votes
0 answers
618 views

Why is there a difference between eth.estimateGas and the real cost in testRPC?

When I want to deploy a smart contract, I use the eth.estimateGas before deploying my smart contract. This gave me 688180 Gas. let bytecode = compiledContract.contracts['Document'].bytecode; let ...
FrenchieiSverige's user avatar
1 vote
0 answers
26 views

Post Merge transaction selection time

I was wondering if anyone has some historical data on how long the delay is from broadcasting a transaction to the Ethereum network before it is being picked up by a miner after The Merge? Preferably ...
JanseManse's user avatar
1 vote
1 answer
28 views

Prioritize Ethereum Transaction

What would be a good strategy to prioritize a transaction given the EIP-1559 definitions: Base Fee: minimum fee a transaction must pay to be a valid transaction. The Base Fee changes per block, ...
Kob3Bryant's user avatar
1 vote
0 answers
15 views

Prevent/Wait for sending transaction if gas price is too high

I am implementing a smart contract function to work from my backend using the owner wallet. This function will be called when user does some kind of activation in frontend so this function can be ...
Bengican Altunsu's user avatar
1 vote
0 answers
31 views

Why is the price of the `call` is not linear to the contract's length?

If I understand correctly, the price of the far call to a new address is ~2300 gas. Source: https://github.com/wolflo/evm-opcodes/blob/main/gas.md#aa-call-operations. There are some other costs ...
Stanislav Breadless's user avatar
1 vote
0 answers
34 views

How to set gas price to zero?

I set Nethermind to zero gas price: "Blocks": { "MinGasPrice": 0 }, Nevertheless, MetaMask for this network shows rather big positive gas prices and does not allow ...
porton's user avatar
  • 1,714
1 vote
0 answers
17 views

Error message after contract interaction was successful

When calling a contract function, I am getting the common unable to estimate gaslimit error message: Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://...
Xing Li's user avatar
  • 33
1 vote
1 answer
54 views

0x swap api gas is doubled when adding feeRecipient and buyTokenPercentageFee

I would like to collect fees on trade using 0x API. But the gas in the quote response is doubled or more when adding feeRecipient and buyTokenPercentageFee which doubles the gas price users are paying....
mtx dev's user avatar
  • 11
1 vote
0 answers
57 views

What are the specifics of the base fee formula?

Looking at the ethereum.org page on Gas I see that post-London upgrade base fees are calculated according to the size of the previous block relative the target gas limit of 15 million. Then I read: ...
user5415713's user avatar
1 vote
0 answers
45 views

What is the right way to round the suggestBaseFee value from Etherscan Gas Tracker API?

We are currently trying to calculate the correct priority gas value in GWEI as displayed on the Gas Tracker page on Etherscan using this API: https://api.etherscan.io/api?module=gastracker&action=...
buckwhitzer's user avatar
1 vote
2 answers
382 views

I need to know gas price C# Nethereum

How can I get current gas price? I want to calculate the gas fee per transaction. I need to multiply Gas Price by _estimatedGas. I looked at the Gas price on https://bscscan.com/ it's 5 Gwei. Can I ...
Oleg's user avatar
  • 11
1 vote
1 answer
87 views

What settings should a private PoA blockchain have to be free to use? ( No ether in use )

I am a total noob in creating blockchains, and I am trying to make one using geth with PoA. I want to make a PoA private blockchain where transactions and smart contracts ( usage and deployments ) are ...
MrFrenzoid's user avatar
1 vote
0 answers
777 views

tx fee exceeds the configured cap in a private ethereum sidechain

i need your help with this one. I have been struggling with the same issue for days now. I'm getting this error response (tx fee exceeds the configured cap (1.00 ether) when i try to set a relatively ...
Jazzine's user avatar
  • 11
1 vote
0 answers
200 views

Is there a tool in VScode to predict optimal amount of gas price?

On MetaMask, it shows you the optimal (estimated) gas price (and you can even tweak it). Is there a similar tool for VSCode (Visual studio code) as well? Below is the screenshot of MetaMask:
MehmedB's user avatar
  • 212
1 vote
0 answers
27 views

How do miners choose what transactions to include first in the block (after London)?

I have read Does using a very high gas limit somehow get your transactions executed slower? and How transactions are selected by the miners? My main question is the same, how do miners include ...
Alex's user avatar
  • 11
1 vote
0 answers
53 views

Charge a user a fee based on gas price?

I want to let users mint NFTs and charge them a fee for each NFT that is a percentage of the gas price they are paying to mint. For example, if the total gas cost of minting one token is 0.1 ETH, and ...
Tom's user avatar
  • 133
1 vote
1 answer
427 views

My ERC-721 minting gas fee is almost $10000. Too high. How fix it?

I just deployed NFT Dapp on mainnet. Estimated gas fee is too High. It's almost $10000 How can i fix it? I never knew on local canache or rinkeby testnet There was fine gas fee.. is it depend on ...
PRB's user avatar
  • 33
1 vote
1 answer
196 views

Discrepancy in gas prices in ENS

I'm a bit confused, I'm trying to buy a domain name in https://ens.domains/ and the price is extremely high for a domain name, it's about $150. Most of that price comes from gas fees. The confusing ...
nelson687's user avatar
  • 113
1 vote
0 answers
365 views

Import existing code in Solidity, does it affect contract gas price?

I understand that import your own code in smart contract effect it's gas price (you can find more here: Import in Solidity.. Does it affect the Gas?) But what about already existing code? Let's say I'...
Alexander Zimin's user avatar
1 vote
0 answers
94 views

How can exchanges afford to offer free deposits for ETH and ERC-20 tokens?

The question has been asked previously but the accepted answer does not hold a candle to reality: In both cases, the exchange pays the gas fee to send the tokens to the hot wallet. That's why the ...
Bradford Griggs's user avatar
1 vote
0 answers
251 views

Hardhat config not working

I have defined from gas price gas limit in the config file but it picking up the default one not what I have defined.
Shubham Singh's user avatar
1 vote
2 answers
1k views

Transaction Underpriced at gas price less than 10Gwei on Binance Testnet

I am working on BEP20 token which I eventually want to deploy on the Mainnet. I have currently deployed the token on the Testnet. I am using metamask as my wallet. When I interact with the contract ...
jarvis1234d's user avatar
1 vote
1 answer
44 views

Does copying mappings variables that are large such as balances cosume a lot of gas?

In erc20 contracts, conventionally balances mapping saves the current balance the users are holding. mapping (address => uint256) private balances; If this contract has a lot of users( which means ...
Yongjun Kim's user avatar
1 vote
1 answer
3k views

Getting "ValueError: intrinsic gas too low" when trying to make a basic swap on Quickswap (polygon/matic)

I'm using Brownie to try and make a basic swap on Quickswap: from brownie import accounts, config, network, interface def main(): """ Runs the make_swap function on the Uniswap ...
Richard Jamieson's user avatar
1 vote
0 answers
279 views

ALERT: Transaction Error. Exception thrown in contract code. Metamask while interacting with contract

When I try to interact with my contract (.vue, Web3) via Metamask browser extension, I get the warning "ALERT: Transaction Error. Exception thrown in contract code." when I attempt to buy. ...
nurkic23's user avatar
1 vote
0 answers
696 views

Fail with error 'Min return not reached'

I am trying to make trades on 1inch and frequently get an error that reads Fail with error 'Min return not reached'. My gas prices are set very high because I need these trades to be as fast as ...
bambi's user avatar
  • 11
1 vote
0 answers
114 views

How do I find the average gas price of a given block?

How do I find the average gas price of a given block? This doesn't appear to be an easily accessible thing in ethers.js or Web3.js, but hopefully I'm just missing something.
maclover's user avatar
1 vote
0 answers
2k views

Set gas fee to a fixed value permanently in Metamask

At present, I can go to the advanced settings and specify the gas fee (in gwei) and gas limit manually. I'd like to make sure that this value is saved and re-used later on for the next few ...
Neon Flash's user avatar
1 vote
1 answer
109 views

Maximum GAS price

When I launch an Ethereum transaction, I have to choose how much WEI I am able to pay for one GAS. This is a "bid" concept: If my transaction is very important and if I want to run it ...
Bob5421's user avatar
  • 1,363
1 vote
0 answers
24 views

Will the tx fees of old contracts be greater or smaller than those of new contracts in ETH 2.0?

Will contracts that currently exist cost more or less to interact with after the ETH 2.0 upgrade? What about old contracts that call a new contract, or new contracts that call an old contract? Will ...
Jesbus's user avatar
  • 10k
1 vote
0 answers
385 views

Understanding eth_estimateGas with regards to gas price, and current mempool

Does anyone have a detailed understanding of how eth_estimateGas works with regards to gasPrice and the current mempool state? I have historically seen some really odd behavior when using ...
LampShade's user avatar
  • 640