Skip to main content

Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
0 votes
2 answers
19 views

what exactly are the limitations of the require() function concerning my custom logic

I wrote some logic for a fundraising contract function fund() public payable { // myValue = myValue + 1; require(msg.value.getConversionRate(s_priceFeed) >= MINIMUM_USD, "...
Owanemi Osaye-William's user avatar
2 votes
2 answers
22 views

On-chain vs Off-chain: Where should data querying and pagination be handled for large datasets?

Let's say there was smart contract and dApp to manage books. The scenario is dApp need to perform a query and pagination then use the result to display to the end user. My concern is the stored books ...
Wildanzr's user avatar
0 votes
1 answer
81 views

How do I rectify an errored smart contract? [duplicate]

I am stuck at the following error message from my smart contract when I click start: Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you ...
Aniekan Ukpong's user avatar
0 votes
1 answer
153 views

How to increase gas limit for transactions in Foundry?

Is there a way to do it in the script file itself or through terminal command? Currently making transactions using the command: forge script script/Counter.s.sol:CounterScript --rpc-url $...
Surya M D G's user avatar
0 votes
1 answer
21 views

Chainlink Cross chain transaction getting reverted on source chain router call

If I set the below extra args on source chain contract: extraArgs: Client._argsToBytes( Client.EVMExtraArgsV1({gasLimit: 400000}) I set the gasLimit for function call on my contract as ...
MAYANK CHHIPA's user avatar
0 votes
2 answers
41 views

Transaction failing due to Out of gas

My transaction is failing due to Out of gas. Here is the transaction: https://sepolia.etherscan.io/tx/0x84577314e676382314b620d79fba2353cbb7962ed97071f404f81010bf56ea32 I'm using hardhat to deploy my ...
MAYANK CHHIPA's user avatar
0 votes
0 answers
41 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
117 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
49 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
16 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
  • 307
0 votes
2 answers
33 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
  • 3
0 votes
1 answer
146 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
525 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
49 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
24 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
23 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
152 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
32 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
50 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
51 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
110 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
177 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
39 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,825
0 votes
1 answer
59 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
73 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.5k
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
690 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.5k
0 votes
1 answer
2k 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
1 answer
47 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
57 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
1 answer
21 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
40 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
164 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
  • 131
0 votes
1 answer
45 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
64 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
78 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,814
1 vote
1 answer
353 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
859 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
29 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
211 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
35 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,359
1 vote
0 answers
148 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
288 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
155 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
69 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
185 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
332 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
2 3 4 5
9