Questions tagged [gas-price]
Questions dealing with the gas price of a transaction.
160
questions with no upvoted or accepted answers
5
votes
1
answer
555
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? ...
3
votes
0
answers
277
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 ...
3
votes
0
answers
217
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 ...
3
votes
0
answers
533
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 ...
3
votes
0
answers
217
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: ...
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?
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?
2
votes
0
answers
133
views
Gas costs for contract deployment
Whenever I deploy a contract on Sepolia, there is an additional gas cost I haven't quite figured out. The flow as I understand is:
21,000 gas (base)
32,000 gas (contract creation)
4*(zero-value bytes ...
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....
2
votes
0
answers
80
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 '...
2
votes
0
answers
361
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 ...
2
votes
1
answer
782
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 ...
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 ...
2
votes
1
answer
63
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 ...
2
votes
0
answers
155
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 "...
2
votes
0
answers
92
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 ...
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.
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 ...
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(...
2
votes
0
answers
630
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 ...
1
vote
1
answer
22
views
Why don't ETH transfers cost more when the recipient's balance is zero?
The SSTORE opcode has differential pricing depending on what the original, current, and new storage values are (see EIP-2200 for the full details). In short, the idea is that setting a zero value to a ...
1
vote
0
answers
23
views
How to get transaction fees and minus it from balance
I created an auction exchange smart contract using solidity programming language and I am using ganache for testing this is a test file written in JavaScript. seller is the creator of auction and ...
1
vote
0
answers
14
views
"ProviderError: transaction would cause overdraft" with gasPrice of 1 wei
I have a hardhat deployment script that has been working for months.
But a few hours ago, it stopped working, and I keep getting gasPrice related errors.
I tried:
gasPrice: "auto"
gasPrice: ...
1
vote
2
answers
52
views
Transaction fails due to: Insufficient funds for gas * price + value
I am trying to make transactions on Polygon Mainnet, but unfortunately when I automatically try to calculate the transaction fees, the transaction gets reverted because I assume that the fees are to ...
1
vote
0
answers
19
views
Reduce gas price?
I'm working on a sniping bot on uniswap, and i have a little problem : the first ones to buy are those who pay the most. Pretty logical, but I don't really want to pay 300$ in priority gas to be the ...
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 ...
1
vote
1
answer
116
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, ...
1
vote
0
answers
35
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 ...
1
vote
0
answers
32
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 ...
1
vote
0
answers
54
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 ...
1
vote
0
answers
19
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://...
1
vote
1
answer
77
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....
1
vote
0
answers
90
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:
...
1
vote
0
answers
60
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=...
1
vote
2
answers
598
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 ...
1
vote
0
answers
1k
views
Transaction underpriced on Metamask?
I'm trying to burn one of my ERC721 tokens in my deployed contract but as you can see from my image the transaction fails with that error even if I did not touch anything when metamask prompts me to ...
1
vote
1
answer
96
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 ...
1
vote
0
answers
907
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 ...
1
vote
0
answers
241
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:
1
vote
0
answers
28
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 ...
1
vote
0
answers
56
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 ...
1
vote
1
answer
464
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 ...
1
vote
1
answer
199
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 ...
1
vote
0
answers
390
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'...
1
vote
0
answers
100
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 ...
1
vote
0
answers
266
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.
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 ...
1
vote
1
answer
45
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 ...
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 ...
1
vote
0
answers
280
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. ...