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

Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

Returned error: gas required exceeds allowance (448144)

Here is my code, would you please verify what causes the problem for deployment on Remix (only on the eth mainnet)? Returned error: gas required exceeds allowance (448144) // SPDX-License-Identifier: ...
Morty's user avatar
  • 3
0 votes
2 answers
52 views

how to verify the minimum gas fee for deploying a contract on the mainnet?

how to verify the minimum gas fee for deploying a contract on the mainnet? my contract creation failed in Remix IDE, I choosed estimated gas fee and the process were not successfully finished, is it ...
Morty's user avatar
  • 3
2 votes
0 answers
16 views

Gas cost of simple ETH transfers on Arbitrum

Historically, Arbitrum enforced a minimum of 400k gas for transactions. Here's an example of a simple ETH transfer I performed in July 2023, which cost ~411k gas: https://arbiscan.io/tx/...
Paul Razvan Berg's user avatar
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
  • 13
0 votes
2 answers
29 views

Why out of gas if it doesn't consume that much in the end?

I tried modify gas limit to a number I checked it should be enough to run transfer on USDT (62,800) but failed with "out of gas" error. When I send another transaction without modifying ...
zklim's user avatar
  • 1
0 votes
1 answer
63 views

What's the value of "gasLimit = 21000" of Ethereum in Polygon?

In Ethereum the gasLimit is 21000. The constant. I haven't found anywhere the value of it for Polygon, though. How much is it? For a token as well as for MATIC itself. I've found the number 57000 on ...
kriss100's user avatar
0 votes
0 answers
12 views

Gas estimation failed in solidity leaseProperty function

i am creating smart contract for my property leasing problem all function are work good in hedera network but the leaseProperty function is getting below error and transaction is failed if we ...
Ronak Bharadiya's user avatar
1 vote
1 answer
116 views

What is the maximum of transaction gas limit?

I have some bulk calculations in a contract, so I used a function that compare the gas left with a constant value and save the current state. At the next time it continues the calculations until it ...
Alireza Zojaji's user avatar
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
1 vote
1 answer
19 views

Transaction within block gas limits: Will it possibly run out of gas?

Is there any risk in running a transaction that needs quite some gas, even if always within the borders of block gas limits? Let's say 20M, with block limit being 30M. The transaction runs complex ...
user130657's user avatar
0 votes
0 answers
20 views

Remix Gas Limit, Transaction Cost, Execution Cost calculation

As can be seen in the screenshot, I am trying to deploy an entirely empty smart contract locally. The gas limit is set to 3, so logically, this should revert the transaction, right? However, it ...
Mark's user avatar
  • 13
0 votes
0 answers
96 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
22 views

Metamask Transaction pending of bscscan

my transaction of bscscan mainnet metamask showing pending on metamask but when i increase the gas fee it gets executed , what might be the issue , is it contract optimization issue ?
Bhushan Dhiware's user avatar
1 vote
1 answer
40 views

Avoiding loops in Solidity for a simple situation

Suppose I have a pool that contains some coin say ETH. Imagine there are 100 users that benefit from this pool and I want to keep track of how much ETH in that pool is allocated to each user. When new ...
qubitz's user avatar
  • 296
0 votes
2 answers
39 views

gas estimation error because of reverted

here is a situation I have: a user came to my platform to buy mytoken and he paid 44 matic for it and 266,087 | 263,663 (99.09%) which reverted because of the gas out. is there any solution to add gas ...
Helia Marami's user avatar
0 votes
0 answers
77 views

Setting High Gas Limit

I hope you guys are doing well! I am new to the Web3 space, so please excuse my ignorance. After viewing numerous tutorials, many of the tutorials like to do this when setting the gas limit const ...
Matt Gates'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
0 votes
1 answer
31 views

How to Determine the Optimal Gas Limit for Maximum Gas Refund without Excess?

I'm optimizing the gasLimit for transactions to ensure the maximum possible gas refund without leaving any unused gas. Given most web3 network's have a maximum gas refund policy where a portion of the ...
MShakeG's user avatar
  • 1,703
0 votes
1 answer
50 views

MetaMask - failed transaction, maximum gas rate suggested is to low

I recently bought a code for a coin flip game and I have been modifying it while I learn to program. I have reached the point of launching the website but when I play and approve the transaction I ...
VelasTiger's user avatar
1 vote
1 answer
68 views

Why does MetaMask cap the gasLimit for ERC20 transfers?

We have found that MetaMask doesn't appear to actually estimate gas for ERC20 transfers as it does for interactions with other contracts. Here, it appears to estimateGas when the interaction is with a ...
Rob Hitchens's user avatar
  • 55.3k
0 votes
0 answers
135 views

Is there anyway to reduce gas fee for uniswap v3 ExactOutputSingleParams?

Question is simple. Is there anyway to reduce gas fee for ExactOutputSingleParams ? function swapExactOutputSingle(uint256 amountOut, uint256 amountInMaximum) external returns (uint256 amountIn) { ...
xlogic land's user avatar
0 votes
0 answers
28 views

bug in the contract/I cant deploy but I dont see it it fails when I want to deploy it its not a gas problem

/** *Submitted for verification at Etherscan.io on 2023-04-24 */ /* Your Name Token is a cryptocurrency inspired by the popular anime movie "Your Name", which has gained the admiration ...
ocean's user avatar
  • 1
3 votes
3 answers
537 views

MetaMask incorrectly estimates 100,000 gas for ERC20 transfer. Why?

MetaMask is incorrectly limiting the gas limit estimate to 100,000. This is actually a rather complex "transfer" that will need about 145,000. Why does MetaMask limit ERC20 .transfer() to ...
Rob Hitchens's user avatar
  • 55.3k
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
0 votes
0 answers
58 views

`gas` vs. `gasLimit` fields

I am trying to submit a transaction with a gas limit set. In the documentation, I find a field referred to as gasLimit with the following description gasLimit – the maximum amount of gas units that ...
davidsawyer's user avatar
0 votes
1 answer
36 views

What is the recommended gas limit when minting NFTs on Ethereum?

I was trying to mint 70 NFTs at once and I set a limit of 8,700,000 but ran out of gas (wasted $300). What is the max limit we should set?
ratib90486's user avatar
1 vote
1 answer
49 views

The simplest way to return a list of items + gas limits on long lists when using pragma experimental ABIEncoderV2?

This question has two parts. I would like to return a list of items from my smart contract in a simple way, ideally a one-liner solution, something that I consume on the front-end. I tried some of the ...
Mars Robertson's user avatar
0 votes
0 answers
23 views

Method call gets reverted when block gas limit setting of ganache is left of default

I deployed a T-REX token (version 3.9.4) to first Sepolia then also to a local ganache instance and my process (Token (and substructures) deployment -> Add Token agent -> Create Identity -> ...
András Ballai's user avatar
0 votes
1 answer
19 views

Getting error when I am trying to call the function listUser and the function listProductOnSale and also have some warning related to infinite gas

Getting the following error: revert The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value you send should be less than ...
Abhishek Bhagat's user avatar
0 votes
1 answer
33 views

Can OpenZeppelin Defender call nonReentrant functions?

I am getting this error running a transaction with a relayer in Open Zeppelin Defender: cannot estimate gas; transaction may fail or may require manual gas limit I know that you get this error when ...
Falcon Stakepool's user avatar
0 votes
1 answer
146 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
  • 121
0 votes
1 answer
43 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
0 votes
0 answers
56 views

How do validators pick transactions to fill the gas usage per block?

I was looking through Etherscan and noticed blocks vary widely in gas usage from one to the other. I was wondering how do validators pick transactions that they'll include in their pending block, as ...
Stephen's user avatar
  • 101
1 vote
0 answers
64 views

Is in L2 gas limit much higher than in L1?

Naturally, in a blockchain gas per transaction is limited, because block place and distributed calculating power are scarce resources. Can you point me a Level 2 system, where the gas limit per ...
porton's user avatar
  • 1,804
1 vote
1 answer
295 views

increase the gas limit for read functions

hey guys this may be a broad question... I'm writing a smart contract that recursively builds an svg image given a seed number. the function that draws the image is a view function so it doesn't cost ...
Nolan Jannotta's user avatar
1 vote
0 answers
15 views

What is current block gas limit after Ethereum Merge update?

What is the current block gas limit after Ethereum Merge update?
Decode_me's user avatar
0 votes
0 answers
834 views

Gas required exceeds allowance(0)

I've seen a lot of posts on this error, but I can't figure out what's wrong with my contract and why this is happening. I have my contract code below: //SPDX-License-Identifier: MIT pragma solidity ^0....
src2012's user avatar
  • 11
1 vote
0 answers
28 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
0 votes
0 answers
200 views

ValueError: Gas estimation failed: 'execution reverted'. Gaslimit already set

I'm getting this error when I try to run my Brownie Python script: myAwesomeGasLimit = 200000 def enter_for_free(): account = get_account() lottery = Lottery[-1] tx = lottery....
Christopherus's user avatar
0 votes
2 answers
31 views

What is the optimal way to estimate dependent transactions together?

I am looking for a solution to estimate multiple transactions together before submitting any of them. However some of these transaction depend on the other in the sense, if they are not submitted in ...
Sanjay S B's user avatar
  • 1,339
1 vote
0 answers
137 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
207 views

Intrinsic Gas Too Low - Where Do I Add The Gas?

I've seen this question here a lot, but just to restate for my purposes, I'm using truffle and attempting to monitor the blockchain for price swaps. I do not currently have a contract deployed but, I ...
Trent Kennelly's user avatar
0 votes
2 answers
135 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 vote
1 answer
63 views

Smart contract has stopped working well (runs out of gas)

I created an ERC20-compliant token with a tax and redistribution mechanism and deployed to the Bitgert chain and it has worked fine for days now. It stopped working well yesterday and efforts to ...
King Einsteinet's user avatar
0 votes
1 answer
168 views

What is the default gas limit for low-level calls?

I deployed the following contracts where one of the low level functions writes to a state variable and the other does not. ''' //SPDX-License-Identifier: MIT pragma solidity <0.9.0; ...
GimmeGinNtonic's user avatar
2 votes
1 answer
31 views

How can I keep gas execution cost as close to gas limit as possible?

I notice that the percentage of total consumption varies across different functions on the blockchain. For example: this one uses 94%, while this one only uses 51%. From a developer perspective, how ...
Bandersnatch's user avatar
1 vote
0 answers
320 views

Why does the Polygon PoS Chain Average Gas Limit (per block) keep changing?

Most EVM chains have a fixed gas limit and gas target per block. For Ethereum, it's 30M and 15M: https://etherscan.io/chart/gaslimit For Polygon, the gas limit seems to change every single block. How ...
Mal Plankton's user avatar
1 vote
0 answers
32 views

Deterministic gas use

In ether, any pure ether transfer will always cost 21000 gas. However, due to the nature of the MPT used in the Balances tree, wouldn't some addresses have more layers of the tree to hop through and ...
Anton M's user avatar
  • 11
1 vote
0 answers
17 views

Can I use a function gas cost to calculate network utilisation?

I’m developing a governance DApp and need to research various blockchains and their scalability. One of the ways I’m doing this is by estimating the gas price of all the smart contract functions that'...
Furkan Öztürk's user avatar

1
2 3 4 5
9