Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

Filter by
Sorted by
Tagged with
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 ...
Paul Razvan Berg's user avatar
2 votes
1 answer
29 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
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 ...
Huzaifa Ahmed's user avatar
0 votes
0 answers
17 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
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: ...
António Gonçalves's user avatar
1 vote
1 answer
35 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
  • 410
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 ...
Dakata's user avatar
  • 195
0 votes
0 answers
8 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
277 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
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 ...
Newly Sama's user avatar
0 votes
0 answers
12 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
75 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
0 votes
2 answers
357 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
44 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
213 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
24 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
93 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
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 ...
Peter's user avatar
  • 121
0 votes
1 answer
73 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
0 votes
0 answers
15 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
  • 233
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
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, ...
Kob3Bryant's user avatar
1 vote
1 answer
122 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
0 answers
221 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
66 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
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 ...
Bengican Altunsu's user avatar
0 votes
0 answers
14 views

Gas fees differ for updating different values?

I've did some gas efficiency tests on the testnet and wonder why the following is the case... Updating values can be done with both of these methods: x += y; /// or /// x = x + y; For mappings, like ...
Andy's user avatar
  • 185
0 votes
0 answers
58 views

replacement transaction underpriced while deploying

I am attempting to deploy a contract to an address that I generated. I use https://sepolia.infura.io/v3/ as my test net. This is my code. package main import ( "context" "...
pigfox's user avatar
  • 213
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 ...
Stanislav Breadless's user avatar
0 votes
1 answer
67 views

Error: cannot estimate gas

when calling the following code from a js script a get "Error: cannot estimate gas; transaction may fail or may require manual gas limit " , how to fix this error ? : function ...
adam mr's user avatar
  • 61
0 votes
1 answer
33 views

Why is MyCrypto is disabling the Sign Transaction button?

I'm using MyCrypto to execute a function of a smart contract but the sign Transaction button is disabled. I'm using the setting to auto calculate the Gas Limit and its suggesting a limit of 68908 with ...
TheLogicMan's user avatar
1 vote
1 answer
145 views

How to transfer the whole balance of ERC20 token?

At the moment I have this code: //............ const contract = new ethers.Contract(smartContractAddress, ERC20_ABI, provider); const signer = new ethers.Wallet(prKey, provider); const txSigner = ...
Kyell's user avatar
  • 91
0 votes
0 answers
71 views

How to estimate fee price for exact address using quicknode and web3?

I have this contract: 0x32400084C286CF3E17e7B677ea9583e60a000324 How could I get fee price which is recommended by the contract? So that it gives the same fee price as per MetaMask. This is https://...
Oleksandr Tserkovnyi's user avatar
0 votes
1 answer
39 views

Smart contract gas costs

What is the gas cost of deploying a Solidity contract, and how can I estimate it before deploying? Are there any strategies for minimizing deployment costs?
PSS's user avatar
  • 519
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 ...
porton's user avatar
  • 1,714
0 votes
0 answers
107 views

Error: cannot estimate gas; transaction may fail or may require manual gas limit in goerli testnet

I am Trying to send transaction to my smart contract and I get this error: I estimated the gas price with const gasPrice = await provider.getGasPrice(); got the error tried using gas price greater ...
user118535's user avatar
0 votes
1 answer
185 views

Contract deployment on Polygon mainnet being stuck

So I've been trying to deploy the simplest contract on Polygon mainnet for hours now with no luck. The transaction is stuck on pending. I tried with many different contracts and I tried changing the ...
Hasan Khadra's user avatar
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://...
Xing Li's user avatar
  • 33
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....
mtx dev's user avatar
  • 11
0 votes
1 answer
41 views

reactjs get contract call fees

Chain used: Poylgon/mainnet or mumbai I am trying to get gas fees for a contract call. I should be able to let user chose if : Medium or High Same as metamask does it: but this should be done on user ...
heustfd gehsgd's user avatar
0 votes
1 answer
40 views

Ethereum Mainnet Error: "Migrations" could not deploy due to insufficient funds

Newbie to Ethereum NFT contract deployment here. So please bear with my questions. I am trying to deploy a ERC-721 contract to ETH Mainnet and I have 0.285 ETH in my wallet. But I am still getting ...
j7coder's user avatar
0 votes
0 answers
31 views

Change actual gasPrice for transaction

I'm using web3js & ethereumjs/tx I have some problem: get and calc gasPrice: fixedGasPrice = Math.round((await web3.eth.getGasPrice()) * 1.2); forming data for tx: const rawTx = { ...
kiruxaspb's user avatar
0 votes
0 answers
336 views

transfer all ether from one account to a smart contract with ethers.js

i want to transfer ALL the ether in my account to the smart contract. I am calculating the gasEstimate and then subtracting it from my total ether balance...but i get an ERROR saying code: -32000, ...
Sukirat Warring's user avatar
0 votes
0 answers
43 views

Gas cost of calling a function

I have two cases here : CASE 1: Let's say i have a conract A with three functions myFunctionA(), myFunctionB() and myFunctionC(), and when i call myFunctionB from myFunctionA, it calls myFunctionC: ...
noro meb's user avatar
  • 328
0 votes
1 answer
122 views

How to transfer all the coins that an account may have?

I have a system where there'll be dozens of accounts, for ETH and tokens. I'll have access to the private keys of those. From time to time I'll need to withdraw all of the coins in each account, in ...
Camila326's user avatar
0 votes
1 answer
73 views

Who pays gas when one transaction triggers functions from multiple smart contracts

The scenario is when an EOA interacted with Function 1 from smart contract A. But in a single transaction, function 1 also makes calls to contract B, which makes calls to contract C. Question 1: Would ...
bzpassersby's user avatar
0 votes
0 answers
73 views

tx.gasprice gives wrong gas estimation

I am using tx.gasprice and block.basefee in my contract to calculate the used gas. The problem is that I can't estimate the gas correctly or sometimes not at all when the contract uses tx.gasprice;. ...
Marvin Daum's user avatar
0 votes
1 answer
89 views

Wrong gas estimation when using tx.gasprice

I use tx.gasprice and block.basefee in my Smart Contract to calculate how much eth the User spent, to send the spent amount back to the Relayer, because I am using meta Transactions. Now I wanted to ...
Marvin Daum's user avatar
2 votes
1 answer
996 views

How to get gas estimate and gas price on Polygon Mumbai Chain using web3.py?

I have deployed a contract on Goerli test net and used the following to get the estimated gas and current gas price. contract = web3.eth.contract(address=contract_address, abi=contract_abi) ...
Sam11's user avatar
  • 63
0 votes
2 answers
41 views

Issues with custodial and non custodial wallet smart contract interactions

We have smart contract for minting ERC721 tokens. The non custodial mints work fine through Javascript but custodial mints are always in pending state. We are using go-ethereum to make that smart ...
ethnoob's user avatar

1
2 3 4 5
10