Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

Filter by
Sorted by
Tagged with
0 votes
1 answer
12 views

Why is each block getting under utilized in ethereum?

The current block gas limit in ethereum is 30 million units but far from getting completely filled they are way underutilized. Is it because the gas price sent by transaction not attractive enough for ...
shadow's user avatar
  • 23
1 vote
1 answer
175 views

Is there a way to make the user pay "aggressive" gas fees automatically instead of them choosing that in MetaMask?

I am having issues with MetaMask in my DApp because users are using wrong or invalid RPCs. Is there a way of making users add a network automatically to MetaMask with the right RPC and override the ...
Falcon Stakepool's user avatar
0 votes
2 answers
22 views

How can I efficiently handle gas costs when deploying Ethereum smart contracts?"

I'm relatively new to Ethereum development and I'm currently working on deploying smart contracts to the Ethereum mainnet. One concern I have is managing gas costs effectively to ensure that my ...
Ian Park's user avatar
0 votes
1 answer
26 views

Very High gas fee in my staking contract

I am trying to implement my staking contract, for some reason calling stake() or claimRewards() costs 2MATIC ~ 4MATIC. I know my code is kind of complex since I loop and use data structures but still ...
Mohamed Wael's user avatar
0 votes
0 answers
44 views

Zero gas fee for transactions

I saw some people on ethereum and bsc chain that execute transactions paying 0 gwei per gas. How is it possible and how to do the same thing?
John's user avatar
  • 11
0 votes
0 answers
27 views

Why does transaction value have impact on transaction fee in Ethereum?

I am sending a transaction to Sepolia test network from browsers. The code I have is something like: provider.request({ method: 'eth_sendTransaction', params: [ { ...
Joey Yi Zhao's user avatar
0 votes
0 answers
18 views

How to send entire account balance to another address on Base

The below code is what I used to transfer entire account balance to other address on the ERC20 network and it works fine on it, but not on Base. Maybe it's because Base has different transaction fee ...
Zero's user avatar
  • 103
0 votes
0 answers
33 views

Replacement fee too low, Base Sepolia

This is the code I have for sending a transaction on Base Sepolia. I am using this to split the balance in my account into two halves and sending each half to an address one by one. export async ...
Zero's user avatar
  • 103
1 vote
0 answers
14 views

Feasibility of Manipulating (Increasing) Ethereum's Basefee (Gas Price)

Has anyone explored how feasible it is to manipulate the block.basefee (i.e., the gas price) on Ethereum? After running some numbers, it seems more achievable than initially thought. Consider this: ...
DaveTheAl's user avatar
  • 111
1 vote
1 answer
19 views

Influencing/Setting tx.gasprice

I am currently trying to solve a security challenge. Thereby, as the last step in order to solve it, I have to make sure that the following require is true: modifier filter() { require(tx.gasprice ...
pekusbill's user avatar
0 votes
1 answer
24 views

maxFeePerGas, is this per gas unit? or per the gas the tx needs?

Let's say I have a tx that requires 10,000 gas units. Let's say I want to pay upto 50gwei per gas unit. When I send maxFeePerGas, do I set it to: 50 * 10^-9 ? // i.e. 50gwei, as in "this is the ...
shaharsol's user avatar
  • 561
0 votes
0 answers
30 views

Contract deployment costs

I have a contract that when deployed to Sepolia costs ~550K gas to deploy: current gas rate on the mainnet is <50 gwei: yet, when I try to deploy to the mainnet, I am declined on not having ...
shaharsol's user avatar
  • 561
0 votes
1 answer
35 views

How to transfer entire address balance to another address

After going through the questions here and here I came up with the code below to transfer the entire balance from one address to another using web3.js. export async function sendTransaction( ...
Zero's user avatar
  • 103
4 votes
0 answers
62 views

k-th auction confusion from Vitalik's article

I was reading an article from Vitalik where he mentions the weaknesses for k-th auction. If the gasPrices of users are as follows: "0.02, 0.03, 0.05, 0.08, 0.13, 0.19, 1.00" and miner has ...
Neo's user avatar
  • 103
0 votes
1 answer
23 views

Transaction fees too high for swapExactETHForTokens

I've written a script to buy tokens in javascript. The issue is I keep getting an error showing abnormally high transaction fees. This is my script const buyFunction = this.pancakeContract.methods....
ahabsy's user avatar
  • 1
0 votes
1 answer
73 views

Error when attempting to send SepoliaETH between two accounts in remix via smart contract with specific conditions: Cause of error -->undefined gas

I would like to use my smart contract to map a payment transaction from SepoliaETH from one Metamask account to another Metamask account. The conditions of a transaction limit and a recall function of ...
Dan Schönitz's user avatar
0 votes
1 answer
31 views

how can I store more than ten thousands address in solidity array

i am trying to make lottery contract, and expected applicants will be about 2~30,000. i want to set those applicants by this code. function setApplicants(address[] memory _applicants) public onlyRole(...
rrrrssss's user avatar
0 votes
0 answers
13 views

Reducing Ethereum gas costs for crypto exchanges using layer 2 platforms

As I researched on reducing Ethereum gas costs for crypto exchanges using layer 2 platforms, the use of these platforms is beneficial for an crypto exchange when the users of that exchange, after ...
Alireza's user avatar
  • 547
0 votes
0 answers
97 views

ResponseError: Returned error: err: insufficient funds for gas * price + value

=====USING=== Sepolia Testnet, metamask, web3js and walletConnectModel =====ERROR=== sendSignedTransaction error: ResponseError: Returned error: err: insufficient funds for gas * price + value: ...
Rommer 's user avatar
0 votes
1 answer
38 views

historical Ethereum trading volume data at a minute interval

I want to access historical Ethereum trading volume and price data at a minute interval for the last six months, I found daily intervals but could not find for minute interval, any suggestion to find ...
Mocak's user avatar
  • 3
0 votes
0 answers
14 views

Error occurs when my gas fee isn't zero. Otherwise transaction runs fine with 0 gas fee

I've created a smart contract that helps user to buy erc-20 tokens in exchange of matics. I am getting this error whenever I do some calculations in my function, which increases gas fee. I have 0....
Abdul Aleem's user avatar
0 votes
1 answer
112 views

How to get rid of the gas estimation error in ethers.js

const fs = require("fs-extra"); const { ethers, JsonRpcProvider } = require("ethers"); async function main() { const provider = new ethers.providers.JsonRpcProvider( "...
Mahami's user avatar
  • 1
1 vote
2 answers
22 views

How much gas does defining an error consume

I have written a contract with minimal declaration of errors; Hopping to achieve more readable and concise code. However, if I define more errors, would it cost more gas, if so how much per error? ...
Ibra's user avatar
  • 71
0 votes
0 answers
83 views

Why is Web3.js estimating 0 GWEI for gas price on Sepolia?

For some reason Web3.js cannot estimate gas correctly on Sepolia I have pulled in the Web3.js library via CDN <script src="https://cdn.jsdelivr.net/npm/[email protected]/web3.min.js">&...
Oscar Chambers's user avatar
0 votes
1 answer
129 views

How to change the gas price and gas limit in private blockchain

I wan to change the gas price and gas limit in the private blockchain as you know the currrent contract limit is 21000 so I want to change the default and also the gas limit I wan to cut more than 1 ...
Mustakbil Pakistan's user avatar
1 vote
1 answer
44 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 ...
Paul Razvan Berg'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
1 vote
0 answers
40 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 ...
Huzaifa Ahmed's user avatar
0 votes
0 answers
27 views

Eth::Client::ContractExecutionError - transaction underpriced

I am using the eth gem ruby library https://q9f.github.io/eth.rb/ to execute a function called from the ABI but it keeps getting the error transaction underpriced. I assume that it has something to do ...
javanoob2pro's user avatar
1 vote
1 answer
250 views

Optimizing Gas Costs in Solidity Smart Contracts: Best Practices?

I'm working on a Solidity smart contract and I'm concerned about the gas costs associated with its execution. I want to optimize my contract for gas efficiency to save on transaction fees and improve ...
Mehran Ra's user avatar
  • 590
1 vote
2 answers
727 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 ...
Dakata's user avatar
  • 225
0 votes
0 answers
10 views

How can l compare tx fee for main network and testnet

I have a contract on testnet and how can l learn how much tx fee will be on main network with same contract. Is there any way to get this information.
syringe92 e's user avatar
0 votes
1 answer
2k views

How accurately does sepolia gas/transaction price correlate with ETH

I'm currently using Sepolia testnet while learning how to mint nft's through javascript, and wondering how accurate the gas price/transaction fee's are for when I switch to using real ETH. I'm making ...
Alex T's user avatar
  • 1
1 vote
0 answers
26 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 ...
Newly Sama's user avatar
0 votes
0 answers
53 views

Web3.py: 'intrinsic gas too low', how to select gasPrice and gas?

In previous question on the forum this issue was already discussed, but it does not address another one: how to select gas and gasPrice so that you wouldn't bet all wallet's money and transaction ...
EndOfTheGlory's user avatar
0 votes
1 answer
1k views

How to fix "Transaction was not mined within 50 blocks, please make sure you transaction was properly sent." error?

I'm here for your help. When I call the signTransaction function defined in web3.js, Transaction was not mined within 50 blocks, please make sure your transaction was properly sent error occurs. I ...
AresColin's user avatar
1 vote
5 answers
8k views

Why gas fee on Uniswap is far far higher than normal gas fee

The transaction fee for swapping tokens on Uniswap is significantly higher than the normal Ethereum transaction fee. I wonder why? Note: You can obtain real-time gas fees from https://etherscan.io/...
user376830's user avatar
0 votes
1 answer
316 views

Cannot set gas price price to zero in Hardhat tests

I am trying to test a contract using Hardhat and want to set the gas price to zero. This will make it easier to see if my functions are working correctly, in that I can easily calculate the correct ...
Eric Falkenstein's user avatar
0 votes
0 answers
1k views

Getting "err: max fee per gas less than block base fee" when estimating gas cost of a transaction

For the last few days, I have some trouble using the eth_estimateGas function from the Quick Node provider. Indeed, after fetching a transaction from the mempool, I want to estimate the gas cost of ...
VeeN's user avatar
  • 101
0 votes
2 answers
61 views

Gas price error when minting a created token

I created the following token https://bscscan.com/address/0xb3497b2a0368e9b96ace9b6ad3033f440457d1b9. In addition to the written code, the imported calls were ERC20 such as import "@openzeppelin/...
Pablo Santos's user avatar
0 votes
1 answer
1k views

How to correctly specify maxPriorityFeePerGas?

I am trying to send a transaction quickly by adding a priority fee that is half the base fee with the following logic: const { baseFeePerGas } = await client.getBlock(); const priorityFee = ...
Sam Scolari's user avatar
2 votes
0 answers
341 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 ...
Peter's user avatar
  • 186
0 votes
1 answer
296 views

How much does it cost to clog the Ethereum Network exactly?

Currently the largest gas guzzler to clog the Ethereum network is the Mint contract below. Supposedly there are users purposely causing high gas prices using this function. Why would anyone do this ...
Patoshi パトシ's user avatar
1 vote
0 answers
31 views

How to calculate a tx's effectiveGasPrice within a block?

Let's say I query all transactions within a block. Assuming all transactions are already settled, how can I know what will be their effectiveGasPrice ? I'm confused that transactions specify a ...
Cizia's user avatar
  • 263
1 vote
0 answers
27 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
361 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
1 answer
312 views

EtherJS calculates gas fee too low

newbie here so please bear with me. I am using EthersJS latest v5 in order to interact with our contracts, which works great so far. However, I spotted that for a certain period of time (around 1st ...
supersize's user avatar
0 votes
1 answer
570 views

SEPOLIA / ETHEREUM BEHAVIOR Problem with Gas

For a customer I've created a smart contract that run very well on SEPOLIA(without any problems). The contract has been deployed then on the Ethereum mainnet. Both compiled with solidity 0.8.18 But ...
Julien L's user avatar
1 vote
1 answer
122 views

Not understanding gas calculation on an EVM network [Fantom]

This is a question about Gas fees for transactions. The bottom line is I can't understand the price (in gas units) of transaction - And I will walk you through a specific transaction to show you my ...
Michael Rabinovich's user avatar
1 vote
0 answers
85 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
2 3 4 5
10