Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 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 ...
user avatar
0 votes
0 answers
5 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.
user avatar
0 votes
0 answers
7 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 "...
user avatar
0 votes
0 answers
34 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 ...
user avatar
  • 1
0 votes
0 answers
20 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 ...
user avatar
  • 121
1 vote
1 answer
29 views

Can gas limit get increased while transaction is executing?

Suppose that we have a transaction that calls a contract method with an i.e. 200,000 gas limit. While the transaction is mining, the called contract finds out that it will run out of gas before ...
user avatar
0 votes
0 answers
21 views

How do I determine the gas limit properly?

So I developed a minting website. But I don't know how can I determine and set the gas limit for users. I am new to blockchain.
user avatar
2 votes
2 answers
152 views

What is the maximum amount of gas the Ethereum Virtual Machine can handle?

I'd like to know the EVM gas limit of a single node with modern computing specs. My understanding is that the current gas limit of Ethereum(15m/block or 1m/s) is constrained such that all nodes in the ...
user avatar
  • 230
0 votes
0 answers
41 views

Is gasleft() the best way to manage big loops in solidity?

I'm developing an Smart Contract that has to iterate through an undetermined size list of ERC20 tokens, and make a swap for each token. I'm aware that you cannot loop an undetermined size list, ...
user avatar
  • 646
0 votes
2 answers
44 views

What if a dynamic call at the end of a function uses all the remaining gas of the caller?

Suppose we have a contact like this: contract x { function y() external { // do some majic! if (some_condition) { another_contract_address.call(abi.encodeWithSignature("...
user avatar
0 votes
0 answers
68 views

Gas estimation failed: 'invalid opcode: INVALID'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually

I'm following the solidity course on youtube by patrick collins and i'm stuck with an issue i've described below, the deploy_and_create.py script was executed to be deployed to rinkeby network and i'm ...
user avatar
0 votes
1 answer
43 views

Is it possible to get consumed and remained gas from within a smart contract?

How can I get consumed gas as well as remained gas (which is sent with tx by the caller) from within a smart contract in solidity?
user avatar
0 votes
2 answers
71 views

Block Gas Limit calculation

[ Working on BSC ] I'm trying to better understand the block gasLimit field, As I know, it places an upper limit on the gas limit of transactions Gas Limit in a block, therefore a validator cannot ...
user avatar
  • 124
0 votes
0 answers
17 views

How many transferFrom function executions can be done in one transaction? (airdrop use case)

I'm developing a dApp, with an Smart Contract, to be able to send multiple tokens at once, in order to save gas (like https://cryptomultisender.com/). The tasks are pretty simple: Take an array of ...
user avatar
  • 646
2 votes
2 answers
84 views

Why is the block limit so low?

The Ethereum block limit is currently 30M gas. From what I have read elsewhere, this limit has been ostensibly chosen so as to ensure that processing transactions remains feasible for consumer grade ...
user avatar
  • 21
0 votes
0 answers
40 views

Block capacity - Hyperledger Besu

Good afternoon, I am trying to perform a transaction capacity test on my network with Hyperledger Besu with 4 validator nodes and a time per block of 4seconds. I have created a script with NodeJS that ...
user avatar
0 votes
0 answers
39 views

What to set as block gas limit with truffle deployment with Opensea

I have been struggling for a few hours now. What exactly should I set as the block gas limit when deploying with Truffle on the ETH mainnet? If it is too low, I get "CreatureFactory" ran out ...
user avatar
0 votes
2 answers
54 views

High gas cost, still fails

I'm trying to deploy a smart contract to the Ethereum mainnet. I paid about $161 in gas fees before the transaction failed, because it ran out of gas. I tried again with a higher gas limit, and it ran ...
user avatar
0 votes
0 answers
34 views

executeTransaction function's estimated gas limit was not enough to execute the transaction

When I executed a transaction with executeTransaction function then it failed on Ethereum Mainnet due to out of gas but when I tried again then it succeed. I compared the gas limits of both the ...
user avatar
1 vote
1 answer
282 views

What is max amount of ETH that can be spent during a single transaction (theoretically)

I know users can set up a gas limit as not to spend too much. I am also aware of the "gas block limit" (how much gas can be consumed in a single ETH block). However, the user can set the gas ...
user avatar
  • 636
0 votes
1 answer
417 views

Error: Transaction's maxFeePerGas (0) is less than the block's baseFeePerGas (527514873)

Not Able to deploy to Ganache- Local chain, I have tried using func from Web3.eth , tried to import GasNowStrategy, Redownload the ganache as well and also tried to copy exact same code from GIT. ...
user avatar
0 votes
1 answer
237 views

Execution will likely fail Internal JSON-RPC error. { "code": -32000, "message": "stack limit reached 1024 (1023)" } On The Polygon Network

I have been working on this Flashloan arbitrage and when I call the execute operation function I get Gas estimation errored with the following message (see below). The transaction execution will ...
user avatar
  • 107
0 votes
0 answers
61 views

withdraw in Re-entrancy attack throws (Although one or more Error Occurred [out of gas] Contract Execution Completed)

I am a programming novice and was trying Re-entrancy attack on my own contract, but whenever I call withdraw, it makes a lot of internal trxs and each one of them fails with "out of gas", ...
user avatar
  • 1
1 vote
0 answers
52 views

How can I use eth_estimateGas on a mint function when the public sale is closed?

function mint(uint256 addr, uint256 id) public payable { require(id < 10000000000, "id invalid"); require(saleActive == true, "Public Sale not active!"); require(msg....
user avatar
0 votes
0 answers
34 views

Why call function in truffle test returns block gas limit

I`m writing unit test using chai for deposit ether to contract function depositEther() public payable override onlyOwner { require(msg.sender.balance >= msg.value, "Not enough funds&...
user avatar
1 vote
0 answers
41 views

Setting gasLimit hides actual error returned from contract

I have a minting smart contract deployed on Rinkeby and using dapp to call mint function using ethers.js. However I’m kind of stuck in loop of two problems that revolve around each other. 1- If I don’...
user avatar
0 votes
1 answer
87 views

How to optimize gas cost of specific function on solidity

source code:https://testnet.bscscan.com/address/0x09850b9d949c71e1d9b7e9acaa3645ac5b63d6bb#code This is a betting smart contract, I have a problem with the allocated prize. The gas cost is very high, ...
user avatar
1 vote
0 answers
278 views

how Set manual gas limit for specific transaction(using hardhat, polygon test and main network)?

how Set manual gas limit when deploying(mint) for specific transaction(using hardhat, polygon test and main network)?
user avatar
0 votes
1 answer
63 views

Mint preproduced tokenurl(file size in range 42:50 Kb) , using svg to store full metadata on chain , Erc-721 , polygon (test & main network)

greeting 1- i will start by writing the general configurations(system, version, smart contract overall idea). 2- then i will show the main problem(with small code line, that i think it need edit). 3- ...
user avatar
0 votes
0 answers
213 views

Web3js: How do you specify gas limit for transactions?

I'm running into some issues with metamask estimating the wrong amount of gas for a specific transaction for my Dapp. It needs around 130k gas to execute, but metamask (around 5% of the time) will set ...
user avatar
  • 111
0 votes
0 answers
35 views

Who's responsible for estimating gas price and gas limit?

I know that when you use Metamask, gas estimation is done for you automatically. Also ethers.js has a getGasPrice function that does this for you. I was wondering what happens under the hood? Do both ...
user avatar
1 vote
1 answer
24 views

If gas limit is too low is still part of the contract executed? [duplicate]

Basically my question is, let's say a smart contract requires 50k of gas and I set my gas limit to 25k, is it an atomic operation or does it execute part of the contract until gas runs out?
user avatar
  • 35
0 votes
0 answers
62 views

Finding the proper transaction gas and gasLimit combinations in contract deployment on private network

The long story I am trying to deploy a contract to a private network. The contract is written in Solidity and pre-compiled into bytecode using Hardhat, and I've successfully tested it using Ganache ...
user avatar
1 vote
1 answer
396 views

What is the gas limit for a view function call *not made from a contract*?

So this question seems trivial but I can't find any comprehensive answer, though reading through: Is there a gas limit for view requests? Why view/pure functions need gas? Exceeds block gas limit ...
user avatar
0 votes
0 answers
12 views

gas vs gasLimit in web3.js [duplicate]

I've seen a bunch of stackoverflow posts on this and want to make sure I've got it right. I'm running into an issue where on test networks I can do this: contract.methods.mint(1).send({ from: ...
user avatar
  • 101
0 votes
0 answers
22 views

Transaction interacting with contract used gas higher than estimated

I have a transaction interacting with a contract, I have used eth_estimateGas to calculate the gas limit because I do not have much ETH. Here are the eth_estimateGas params: { "jsonrpc": ...
user avatar
  • 25
0 votes
1 answer
54 views

Do any one had a template API to display/show estimated gas price for a transaction?

Description of the issue: I do not have sufficient funds in my wallet to transfer a token from my wallet to an external wallet. So the transaction will fail and shows us an error message. Instead of ...
user avatar
0 votes
1 answer
102 views

Why does one transaction fail with "Out of gas" while another tx succeed with the same gas limit?

During a recent NFT mint (contract), approximately 50 out of 920 transactions failed with an "Out of gas" error. We discovered users with failed transactions used the same settings as others ...
user avatar
0 votes
1 answer
151 views

Why is gas used depended of the given gas limit?

I have an interesting phenomena EDIT: on the Fantom network, sorry if this is the wrong place to ask which I do not understand, so maybe someone is able to explain this: When I send a transaction with ...
user avatar
  • 113
0 votes
1 answer
29 views

how to tackle block gas limit to send large data file as transaction on ethereum

I want to send ethereum blockchain a file approx 39KB. The file is like array generated by python code. I dont want to use IPFS and oracle. Is this file exceed block gas limit? if yes, then can i ...
user avatar
  • 101
0 votes
1 answer
110 views

estimate gas usage for a contract

I'm trying to estimate the gas usage for a smart contract for an NFT token - is it possible to do before the actual sale? contract is already published and all functions as well. so I want to know how ...
user avatar
1 vote
1 answer
275 views

My ERC-721 minting gas fee is almost $10000. Too high. How fix it?

I just deployed NFT Dapp on mainnet. Estimated gas fee is too High. It's almost $10000 How can i fix it? I never knew on local canache or rinkeby testnet There was fine gas fee.. is it depend on ...
user avatar
  • 23
0 votes
1 answer
322 views

Gas estimation failed on run in rinkeby network

ValueError: Gas estimation failed: 'invalid opcode: opcode 0xfe not defined'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually. Could someone please ...
user avatar
0 votes
1 answer
431 views

Transaction failing due to can't estimate Gas Cost on Polygon

I have a function function tokenValue( address _token, uint _amount ) public view returns ( uint ) { return _amount.mul( 10 ** IERC20( MY_TOKEN ).decimals() ).div( 10 ** IERC20( _token )....
user avatar
0 votes
0 answers
33 views

Out of gas exception though only 99% was consumed

We know one of our transactions consumes always 62_599 of gas, once we have decided to set the gas limit to 63_000 the tx has failed with out of gas exception. Right after we have increased the gas ...
user avatar
  • 183
2 votes
2 answers
974 views

Brownie / Rinkeby ValueError: Gas estimation failed: "you must set the gas limit manually"

from brownie import AdvancedCollectible, accounts, config, network from scripts.helpful_scripts import get_breed import time static_seed = 123 def main(): dev = accounts.add(config["wallets&...
user avatar
0 votes
0 answers
42 views

How to provide enough Gas while calling a function from another function

Here are my two functions. One of them loops over the other. However, when I execute the scheduleMultipleTransactions(), it seems it runs out of gas for calling scheduleTrasnactions() several times. ...
user avatar
0 votes
0 answers
37 views

Payable function that calls another contract out of gas

I have a smart contract that implements a payable interface for a mint function. The contract is pretty simple: pragma solidity ^0.4.5; contract PayableMinter { address dc; function ...
user avatar
  • 89
0 votes
0 answers
47 views

gasFee for transaction HASH?

I have simple web page (HTML,JS). I need to calculate gas fee for each transaction. Currently I'm using the etherscan api to get fee. I'm trying to analyze wallet which has 48 000 NFT token's and ...
user avatar
1 vote
1 answer
1k views

Increase block gas limit hardhat

I'm just running some tests with massive functions, and I keep running into InvalidInputError: Transaction gas limit is 30429720 and exceeds block gas limit of 30000000 How do I increase the block ...
user avatar

1
2 3 4 5
8