Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
0
votes
1answer
52 views

Gas price and limit with Truffle deployment in Ethereum

I am developing a smart contract in truffle. I'm having some trouble understanding how GAS works in Ethereum. I used the following parameters in my Rinkeby test net: gas limit: 4600000 gas price: ...
0
votes
0answers
10 views

How much is cost to deposit some ETH from 10 EOA address to a smart contract and withdraw the funds to one EOA address? [closed]

How much is cost to deposit some ETH from 10 EOA address to a smart contract and withdraw the funds to one EOA address? I want to know how much gas-limit is need to execute it? deposit part ...
0
votes
1answer
17 views

Gas requirement of function problem

I am trying to run below code, but I receive this error "Gas requirement of function Team3_SE427_Call.increaseCount is infinite: If the gas requirement of a function is higher than the block gas ...
0
votes
1answer
91 views

Sending funds to a possible smart-contract

When sending funds to an Ethereum address, Should my wallet check in the blockchain whether the address is associated with a smart contract? In order to choose the gas limit automatically. If someone ...
0
votes
0answers
4 views

Transaction Gas limit vs gas used vs start gas

I was inspecting one of my transactions on ropsten and I noticed something was off. The gas limit and gas spent as shown on etherscan and in metamask are 45666 and 29034 respectively so far so good. ...
0
votes
2answers
73 views

Infinite gas on assigning struct

I have this code and it gives me infinite gas. please help me improve it. pragma solidity ^0.4.23; // v6 contract owned { constructor() public { owner = msg.sender; } address owner; ...
0
votes
1answer
249 views

How to estimate gas limit for “payable” smart contract?

We all know that gas limit for EOA to EOA transfer is 21000. I am got stuck at a point and unable to get dynamic gas limit estimation for "payable" smart contract using Web3. When sending Ether from ...
1
vote
1answer
27 views

Best Practices for Recommendation regarding Gas Price & Limit in a Dapp

I am developing a Dapp. I was wondering what are the best practices for user recommendation regarding gas price and limit in such a Dapp? Should I be using the following methods in my contract, or ...
0
votes
1answer
37 views

Default gas limit set by web3 is unreasonably high?

I am trying to learn and understand solidity/defi by creating some copies of current popular protocols; I've created a small copy of the Curve Dai strategy from harvest finance, but I'm getting really ...
2
votes
1answer
31 views

What is the gas limit for a fallback function called when the method does not exist?

According to the docs a non matching function identifier will trigger the fallback function. So what happens if someone calls my contract with "thisMethodDoesntExist()", would the fallback ...
0
votes
0answers
17 views

is it possible to change block' gas limit?

I'm trying to execute some heavy transactions. Before execute it, Remix advises me about the gas limit: Ok, then I change my gas limit on Metamask to 9,000,000 (I'm on Ropsten network): And finally, ...
1
vote
1answer
13 views

Do gas refunds apply in a fallback function? What is the limit for non matching function identifiers?

I know that a fallback function called with a .transfer only has gas limit of 2300. What happens if the fallback function deletes some storage variables in the fallback function? Would the fallback ...
2
votes
2answers
5k views

How do I get `gasLimit` in web3?

I am running in a private ethereum network which I init with a genesis.json file that contains "gasLimit": "31415926" Now I am wondering how I can read that via web3, any suggestions? (I want to ...
1
vote
0answers
15 views

Reading gas limit inside solidity smart contract? [duplicate]

As we can read the gas left and the gas price inside solidity smart contract, is there any way that I can read the gas limit set for the transaction inside the solidity ?
1
vote
1answer
75 views

Locked ERC20 paid out as tx-fees to DAO holders

I'm creating a contract where people transact by using locked ERC20 tokens. For example - you'd have 500 of token A locked in the DAO contract. You decide to send 100 of token A to some other ...
0
votes
1answer
237 views

Can't invoke SC function: Error: gas required exceeds allowance or always failing transaction

I've deployed my smart contract to Rinkeby test net. The "addProject" function works fine. But when I try the "addProjectFile" function I got error. "Error: gas required exceeds allowance or ...
3
votes
1answer
679 views

Error Ganache: Run out of gas - Works in Remix/Not from dApp

I am working on an application that stores and retrieves personal data on/from the ethereum blockchain. Just working on this to improve my Solidity and SC expertise and get comfortable with the ...
0
votes
3answers
176 views

Infinite gas estimate for almost all the functions. Is it normal?

When I deploy contract test net, it shows an error that gas limit exceeds: 3000000 What's the solution? Github Link to the smart contract. And is it normal to have the infinite gas estimate of ...
1
vote
1answer
69 views

Ropsten “exceeds block gas limit”

I am on GETH, 1.9.23 and I have had a smart contract running for more than 3 months now. Suddenly, all transaction failed with "exceeds block gas limit". I checked the Ropsten Testnet and ...
0
votes
1answer
62 views

What are the parameters for the ideal gas limit?

I am new to writing smart contracts, in recent times I am having trouble in deploying the smart contracts couple of times so I need a solution for that. I am using the truffle most of the time so ...
0
votes
0answers
18 views

Test execution error: 'The contract code couldn't be stored, please check your gas limit.'

When I was coding the unitary tests for my smart contract on Remix, I encountered a problem of gas limit: contract deployment failed after trying twice: The contract code couldn't be stored, please ...
0
votes
2answers
228 views

Finding gas to be used by a transaction

Is there a way to find the total gas that will be used by the transaction before a tx actually takes place? Does the gas used depend on the amount of tx size in kb?
0
votes
1answer
188 views

change gasLimit parameter into the genesis.json file on azure priavte blockchain

I am trying to deploy a smart contract to an azure blockchain. The contract is deployed without errors but i can't submit transaction to the blockchain through this contract. I guess this is an issue ...
2
votes
1answer
264 views

Exceeds block gas limit error to call view functions

With solidity view function, you can specific the amount of gas to use. My understand is since it is not a state changing transaction, all the gas cost is not charged for, and the client should be ...
3
votes
1answer
173 views

Can someone verify this answer: gasLimit vs. minGasLimit

I would have thought that these are the upper and lower bounds of how much gas can be used in any one transaction. But the mainnet file has the same value for each of these. Can someone explain what ...
2
votes
0answers
16 views

Send raw transaction from geth when not synced (exceeds block gas limit)

I have a geth node which is not synced and I want to send eth. > TX={ from: FROM, to: TO, value: VALUE, nonce: NONCE, gas: GAS, gasPrice: GP } > personal.unlockAccount(...) > SIGNED_TX=eth....
0
votes
1answer
34 views

Send transaction with locked contract -> Error: insufficient funds for gas * price + value

I'm trying to send a transaction for a token with a locked contract. I'm doing this to find out when this contract will be open. So I'm expecting to get some kind of error like "ERC-20 Token Transfer ...
0
votes
1answer
155 views

Deploying Crowdsale in Ropsten Network givin Gas Limit issue

Below is the Code of My CrowdSale , which is giving The contract code couldn't be stored, please check your gas amount. pragma solidity ^0.4.18; import "./TorCoin.sol"; import "zeppelin-solidity/...
0
votes
1answer
230 views

Increase gas limit to allow larget contracts to be deployed

I'm working on a private blockchain and I found out that I cannot deploy a contract larger than 34Kb which is pretty limiting for me. For comparision, cryptokitties are 40-47Kb so I cannot even deploy ...
0
votes
1answer
51 views

How do I add more gas to the ganache-cli

I started the ganache-cli with 'ganache-cli -l 800000000' I deployed my contract with 'truffle --network development' which is defined in the truffle-config.js file as: networks: { // Useful for ...
2
votes
0answers
29 views

ETH same transaction different amount of gas used

The two transactions: a) https://etherscan.io/tx/0x9227f7b00bf2c98a7e16eb5ab90c04df5b49698297ee7f52c765d5218af395ad b) https://etherscan.io/tx/...
1
vote
1answer
205 views

Can't call function from contract using web3.js due to gas issue

I'm building a smart contract and dapp using ganache and web3.js. In my smart contract I have a function (named "add_pilot") which gets 4 parameters and add them to a mapping. It looks like this: ...
1
vote
1answer
22 views

How do Miners get the GAS Used so close the GAS Limit?

Are the Miners calculating the actual GAS USED for each Transaction (specifically for contract execution) before they stuff it into the Candidate Block to get so close to the Block GAS Limit? The ...
1
vote
2answers
91 views

Analize gas usage and contract design

Suppose that I've the following contract code: pragma solidity ^0.4.23; contract pensCollection{ struct Pen{ uint productCode; address ownerAddress; } address public ...
0
votes
1answer
19 views

Could someone explain Ethgasstation.info headers?

in TXN pool vision of https://ethgasstation.info/txPoolReport.php I am getting confused with the meaning of headers. What does the following headers mean? % of Last 200 Blocks Accepting % of total ...
0
votes
1answer
224 views

Fees are too Damn High to send $20 worth of USDC. How can one minimize these fees?

It's 2020 September 3. Fees to send 20 USDC to someone is about $10-15 worth of gas fees. How can I minimize the gas fees when using metamask? And is it true that if I set the gas fee too low, I would ...
0
votes
0answers
15 views

“exceeds block gas limit” on partially synced geth

I am trying to send eth when my geth node is not fully synced (it's very, very slow) { currentBlock: 10683052, highestBlock: 10780597, knownStates: 57935524, pulledStates: 57929853, ...
1
vote
1answer
27 views

A way to capture actual gas used per transaction

Two questions, related: Is the getGasUsed() on the TransactionReceipt truly the actual gas used, not the gasLimit or the gas estimate? Looks like it but... Is the actual gas used obtainable ("...
0
votes
1answer
810 views

ethers.js - estimating gas limit

Using the ethers.js library, how can I determine the gas limit when sending a transaction to a contract or deploying a new contract?
0
votes
0answers
72 views

Gas requirement is infinite for the function

pragma solidity ^0.5.9; contract kyc2{ bool public isallowed; // Structure of customer struct customer{ string custname; ...
0
votes
2answers
370 views

Minimum Gas limit and how can it be reduced?

Why does this minimum exist and what can we do to to reduce it further. This line of thought was spurred by this tweet from Vitalik: "And there are layer 2's without data availability tradeoffs or ...
0
votes
0answers
33 views

(closed) I deployed the contract with remix but truffle didn't deploy, why?

i want to deploy my contract to Rinkeby or Ropsten testnet with truffle. But I give an error like this: ran out of gas (using a value you set in your network config or deployment parameters.) * ...
0
votes
2answers
1k views

Recommended Gas Limit for Single Transaction

Current mainnet gas limit per block is 8M (7.99), that of Ropsten is 9M (which is actually rather surprising as it was 4.7M two months ago and I did complain about it...). Given the above, what's the ...
1
vote
1answer
485 views

What should gas prices be for sending out tokens?

I constantly get failed transactions when sending out tokens like USDT using metamask. I have my gwei set at 10 and the gas limit at 21000. I even tried gas limit set to 51000 and it still fails. ...
0
votes
1answer
141 views

remix - gas limit exceeded, but contract is running on blockchain

i studying remix and ethereum, and create my local blockchain. and create contract with remix.the contract just print simple word. pragma solidity ^0.4.8; contract HelloWorld{ string public ...
1
vote
1answer
39 views

Loop with upper bound of iterations / loop variant

Is it possible somehow to create a loop that solidity will recognize as having an upper bound of iterations for gas estimations? Something like a loop variant in Eiffel (https://www.eiffel.org/doc/...
0
votes
0answers
12 views

Gas Limit not accurate from Genesis

Gas Limit is not matching the genesis blocks determination, the "gasLimit": "0x895440" is getting me this "Error: Returned error: Transaction cost exceeds current gas limit. ...
0
votes
0answers
21 views

Parity Max Gas Limit dropping

When running my chain my gas limit drops drastically from the set limit of the genesis block "gasLimit": "0x3B9AC9FF" due to large gaps both in time and frequency between the ...
0
votes
0answers
17 views

How can I get the gas limit specified for a past transaction from web3?

I'd like to know the difference between gas limit specified and gas actually used by a confirmed transactions from previous blocks. For each transaction on Etherscan, you can see both the actual gas ...
0
votes
1answer
28 views

Why array.pop() doesn't work on my private network?

I have deployed a PoA network using Hyperledger Besu and I'm using Remix in order to code a very simple smart contract. Here is the smart contract code: // SPDX-License-Identifier: MIT pragma solidity ...

1
2 3 4 5 6