Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
1 vote
1 answer
28 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 ...
1 vote
0 answers
8 views

What is current block gas limit after Ethereum Merge update?

What is the current block gas limit after Ethereum Merge update?
0 votes
0 answers
19 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 ...
0 votes
0 answers
39 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....
0 votes
0 answers
9 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://...
  • 23
0 votes
0 answers
24 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....
0 votes
0 answers
12 views

How to define gas Limit in typescript eth transaction?

I am currently working on my frist dApp with React and Typescript and come across the problem that MetaMask shows no value and gas limit when signing the transaction -> next step: transaction get ...
0 votes
1 answer
17 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 ...
  • 1,234
0 votes
0 answers
36 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;. ...
0 votes
1 answer
51 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 ...
0 votes
2 answers
17 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 ...
1 vote
1 answer
33 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 ...
0 votes
1 answer
45 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; ...
0 votes
1 answer
20 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 ...
1 vote
0 answers
56 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 ...
1 vote
0 answers
23 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 ...
  • 11
0 votes
0 answers
12 views

0X swap quote api return expected slippage null

Why in the response object, expected slippage variable is null when a user fetch for swap-quote? In the docs its available for only few ethereum pairs but not others. How else can we warn the user of ...
1 vote
0 answers
12 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'...
0 votes
0 answers
26 views

How many addresses would I be able to loop through before crossing block gas limit?

I'm developing my dapp on the polyogon blockchain and I'd like to know how many addresses I'd be able to loop through before exceeding the block gas limit. The will also be a feature which allows ...
0 votes
0 answers
90 views

Smart Contract Transactions Gas Limit on Polygon

I've written my own arbitrage smart-contract on Polygon. As a simple protection from any losses I've made the following condition inside the function: require(endBalance > startBalance, "...
  • 11
0 votes
1 answer
98 views

What is the purpose of gasLimit in an EIP1559 transaction?

When rlp encoding an EIP1559 transaction 3 gas values are provided: maxPriorityFeePerGas,maxFeePerGas & gasLimit. maxFeePerGas = BaseFee + maxPriorityFeePerGas but what is the purpose of gasLimit ...
0 votes
0 answers
13 views

Out of gas in a simple balance change

I have a very strange and unusual case. An address is trying to claim tokens from a staking pool contract. In the call of the transfer function of the token contract, a line that performs a simple ...
0 votes
0 answers
8 views

I have verified token contract #11964 today, and another one one a while back #11040, but these are not showing upin my Etherscan.io account

What is the point of getting these verified if i can't get to any money that might be in them? As well as this being the most difficult thing i have ever tried to do, working on this for 4 years, not ...
0 votes
1 answer
283 views

Why the BSC block gas limit change and what's the logic behind it?

The bsc block gas limit is always very close to 120,000,000. But it can be 119,529,427 or 119,996,337 for some blocks. It seems to stay between 118M and 120M Why does it change and what's the logic ...
  • 3
0 votes
1 answer
410 views

baseFeePerGas missing from block in python web3 for web3.eth.get_block

I am using the python web3 library to connect to the Binance Smart Chain at RPC=https://bsc-dataseed.binance.org. Since BSC is a POA chain, I am also using web3.middleware.geth_poa_middleware as ...
  • 247
0 votes
0 answers
21 views

Gas estimation failed - 10K fpf project

Set 5000000 / 6000000 / 8000000 / 10000000 / 12000000 ... gas limit to deploy contract. "Gas estimation failed" window alert always , force to "Send transaction" , and allways fail....
0 votes
0 answers
18 views

Factors determining Gas limit

Need to know what all factors decide the gas limit. As observed gas limit fluctuates for the same token. I am sure the computational requirement of the token is not changed, then why does the gas ...
0 votes
0 answers
128 views

Error: Cannot estimate gas; transaction may fail UNPREDICTABLE_GAS_LIMIT

I have this error when I try to deploy with Fuji and also with a Subnet, but using Hardhat local node I have no problems. I have tried different options. Here is my hardhat.config.js with the ...
1 vote
1 answer
22 views

Gas adjustment of the smart contract function

I have function which uses for loops on the calldata array as following: mapping (address => bool) public userRegistered; function registerUsers(address[] calldata users) external { for (uint256 ...
0 votes
0 answers
26 views

Gas price seems very high

I'm fairly new in the world of blockchain so it might be I'm missing something obvious. I'm minting a NFT but it keeps exceeding the gas price despite the limit of 100000000429720. I'm trying to mint ...
0 votes
1 answer
543 views

Gas estimation failed: execution reverted on goerli with brownie

I'm trying to test an onlyOwner function on goerli testnet which's expected to be passed with pytest.raises(exceptions.VirtualMachineError) but it keeps getting below error. I added priority_fee and ...
  • 11
0 votes
0 answers
14 views

Changing flow of Chainlink callbacks to save gas paid in LINK

I'm currently developing a project using Chanlink. I'm thinking of changing flow from 2 to 3 steps, because step 2 takes ~200k gas. User sends transaction to contract and wants to mint NFT. Here goes ...
  • 101
1 vote
1 answer
26 views

Why isn’t there more fluctuation in the gas used per block?

If you look at gas used per block, since EIP-1559 it has been almost exactly at targetGas for every block https://www.etherchain.org/charts/blockGasUsage Do miners have a disincentive to make blocks ...
0 votes
1 answer
43 views

Geth gas limit decreases over time in private PoA network

I have deployed a PoA network with geth, setting gaslimit to 0x1fffffffffffffff in genesis file. When starting mining and over the time, I have realized gaslimit in each new block decreases. I have ...
  • 23
0 votes
0 answers
13 views

Calculating TPS with gas

As part of a project I need to get an estimated TPS value for a handful of Blockchains. Can you calculate TPS from gas alone? for example: TPS = (Gas Limit / Gas used) / block time
2 votes
2 answers
397 views

Are Ethereum blocks flexible in terms of size or are they capped?

Many blockchains have block size limits. But I am confused when it comes to Ethereum. On one hand, I read that its block size is flexible. But on the other hand, I strongly suspect there must be a ...
0 votes
0 answers
57 views

CALL_EXCEPTION execution reverted due to less gas limit

I have kind of complicated function with an dynamic array. Always, when I execute hardhat or metamask the gas limit is calculated to less, that the function runs into a CALL_EXCEPTION. Is there a ...
0 votes
2 answers
128 views

msg.sender.call{value: 0.1 ether, gas: 1}(""): Why it doesn't fail? Shouldn't?

I'm making a simple test to force a transaction to be reverted, but it just doesn't happen. I have this function where I intend to limit the gas to just 1. contract MyContract { constructor() ...
  • 153
1 vote
1 answer
109 views

Gas allowance geth

I have deployed an Ethereum private network PoA with geth connecting 3 nodes: 2 nodes in aws EC2 instances and my own laptop. My purpose is to store strings in the network, so therefore, i have ...
  • 23
0 votes
0 answers
24 views

Ethereum 0 gas cost Blockchain

Hi guys, I am looking for an Ethereum Blockchain like Quorum to use like a database for JSONs. I am actually using geth PoA with one node un my home and two nodes in AWS EC2. I have been facing some ...
  • 23
0 votes
0 answers
91 views

Why is the Gnosis Safe creation provided gas limit over Wallet Connect double what is required

I'm currently working on implementing Wallet Connect as part of a wallet and was testing with creating a 2 owner safe, but noticed the gas price shown was unusually high. Upon further investigation I ...
2 votes
1 answer
432 views

"contract x" ran out of gas. Something in the constructor (ex: infinite loop) caused gas estimation to fail ganache

i'm trying to deploy contracts on private network ganache using ganache application. but it threw an error because of its big size: "contract x" ran out of gas. Something in the constructor (...
2 votes
0 answers
25 views

Using veiw functions to overload Blockchain node

Question: What is stopping me from creating view function with heavy computation (infinite loop). Deploying it on Blockchain and then calling it just so I could overload a Blockchain node that ...
  • 1,819
2 votes
2 answers
102 views

What happens if a view function has gas cost above the block gas limit?

One of my projects has a complex view function that loops through arrays, maps etc. It doesn't spend gas, but I am afraid one day its estimated gas cost might exceed the block gas limit, and I ...
  • 1,819
0 votes
1 answer
31 views

How is transaction pushed to the block?

Let's imagine we have a 30kk gas limit block in ETH. 25kk of gas are already taken, and it's time for my transaction, which consumes 10kk gas. Will it be pushed to this block, with kind of "Out ...
  • 23
0 votes
0 answers
93 views

Please Help ValueError: execution reverted: VM Exception while processing transaction: revert

Hi am learning brownie fundme What I tried to do here, is use brownie to deploy a contract(FundMe) using ganache-local then after running (deploy.py),i write a new script fund_and_withdraw.py i got ...
0 votes
0 answers
8 views

How to calculate amount of gas? [duplicate]

How I can calculate gas used for transfer token for example Shiba Inu. I need to calculate it before transaction.
0 votes
0 answers
9 views

What is the composition of a transaction ? (size, purpose...) [duplicate]

I want to know more about transaction : What are the components of a transaction? (theirs size and purpose) What is the size (bytes) of an Ethereum transaction? (min and max) I know there is a "...
0 votes
0 answers
142 views

Gas Estimation Issue [gnosis-safe]

We encountered gas estimation related issues when using Request Finance in a safe app context. When we want to submit a transaction the gas limit is automatically computed and set by gnosis, however ...
  • 1
0 votes
0 answers
154 views

How to find gas settings for different chains?

I am using ethers.js and hardhat to deploy to different chains (testnets), but I don't know where to find the right gas settings. For example, if I wanted to deploy to the Aurora Testnet and used the ...
  • 141

1
2 3 4 5
9