Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

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

Does using a very high gas limit somehow get your transactions executed slower?

I'm executing transactions on mainnet with a NodeJS script: async function send(web3, transaction, destAddr, gasPrice, privateKey) { const options = { data : transaction.encodeABI(), ...
0
votes
0answers
21 views

“Out of Gas” while transferring ethereum from account to contract

I am using ganache to create 10 ethereum accounts. I want to transfer ethereum from one account to a smart contract. I am doing this by writing two following smart contracts in solidity; pragma ...
1
vote
1answer
17 views

divide ethers to current token holders only

My task is to divide the dividend sent by owner to the contract to the current token holders.The token holders can come later and redeem their pending amounts, the important point here is that, when a ...
0
votes
2answers
24 views

Does a transaction that consumes the block gas limit take an entire block by itself?

Does a transaction that requires the entire block gas limit to be executed (currently ~8M) take the entire block by itself? And if that's true, will that transaction take longer to get confirmed than ...
0
votes
1answer
17 views

When calling a contract from an other contract, what happends if the value of callgas argument is above availaible gas?

In such case, the value is replaced with available gas right ? Or Does an out of gas exception is thrown ?
0
votes
1answer
14 views

Get gas limit beforehand with Web3

I know that web3 exposes a function to estimate gas limit, but is it accurate when sending to a contract? AFAIK the amount of gas I'm gonna need if sending to a contract depends on the contract code, ...
0
votes
0answers
11 views

Can web3js accurately estimate a transaction that includes an external call?

Can web3js accurately estimate a transaction that includes an external call? For example, will it be accurate in estimating: (bool _success, bytes memory _response) = _to.call.value(_value)(_data); ...
3
votes
0answers
38 views

Does 'estimateGas' behave the same on Ganache and on mainnet?

I noticed that estimateGas behavior in Ganache has changed: In version 6.4.1, it throws an exception if exceeding the gas-limit. In version 6.5.1, it returns the estimation even if exceeding the gas-...
0
votes
1answer
21 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
29 views

Is gas limit constant for regular transfers? [duplicate]

Afaik the minimum amount of gas, required for a regular ETH transfer is 21000. Is 21000 specific to the protocol itself, or does it depend on the particular network? Does it depend on custom data, ...
1
vote
2answers
36 views

Error: gas required exceeds allowance or always failing transaction in Remix using Ropsten network

I am facing this error , My Contract is quite simple pragma solidity ^0.5.0; contract sendEther { address payable sender; function showReceiver() public view returns (address payable) { ...
2
votes
1answer
92 views

Kaleido private network transaction exited with an error (status 0) after consuming all gas

I've created a private PoA network with two geth nodes using Kaleido (release 1.0.13) and am trying to deploy some smart contracts to it using the drizzle-kaleido-box boilerplate from truffle. The ...
0
votes
1answer
60 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
22 views

Different between gas and gasLimit keys when executing transactions

Below is the code that I'm running. When I entered "gas" and "gasLimit" as the keys, both worked. Why is that? What does "gas" represent? And what is the optimum amount of gasLimit should I use (...
0
votes
0answers
10 views

Is there works to get rid of the GAS fee system for Ethereum 2.0?

Making transactions and constantly getting it failed due to gas limit settings is a hindrance to ETH adoption especially for newbies coming to the platform. Has there been any dev talks about getting ...
0
votes
0answers
87 views

Why is my metamask transaction failing even if I set a high gas limit?

Below is a failed transaction. i set the gas limit to double of what it normally is, but it still failed. How can one figure out the correct gas limit, if the auto settings don't even work. Why does ...
1
vote
1answer
21 views

Where can one get token fee calculations instead of it keep eating up my ETH for gas for guessing the gas limit?

This is kind of ridiculous, every time I try to send out tokens to another address from metamask, it fails. I doubled my GAS limit from 20K to 70K and it still fails. Where can one even find the ...
1
vote
2answers
69 views

Gas usage for same contract is constantly growing

Here is the smart contract. The gas usage for this contract is constantly growing. All state variables are initialized at deployment and never changed. Signers array is about 2-3 in size no more. And ...
1
vote
1answer
22 views

Block Gas Limit Doubt

Suppose i have a loop. Here user is a struct of which player is an address. address[] memory addrs = new address[](n); for(uint i=0;i<n;i++){ addrs[i] = user.player; } return addrs; This is a ...
0
votes
1answer
60 views

Is there a drawback of setting a too high gas limit for a transaction?

Say, I want to send a transaction that consumes around ~40,000 gas. Could I just set the gas limit of the transaction to 1 million or is there some disadvantage and I should set a more realistic gas ...
0
votes
1answer
55 views

What is the meaning of “Gas Used” on ethgasstation.info?

It's rather confusing cos when I googled "gas used" I don't get any exact result, NOT even from ethgasstation.info and most people are talking about transaction price, gas limit, etc. So, does "gas ...
1
vote
1answer
126 views

How to charge percentage of transaction cost?

Example: uint public createPostCost = 0.0003 ether; function createPost(bytes32 _post) public payable { require(msg.value >= createPostCost); Post memory newPost; ...
1
vote
1answer
371 views

Error set address/adding data, error: “gas required exceeds allowance or always failing transaction and the function doesn't work”

I'm trying to do a data access control system with smart contract. I have 3 entity: Client: who can get data and set address of Oracle Oracle: who can add data and have getData() function RBAC: Role ...
0
votes
1answer
20 views

Understand the potential issue of miner controlled gaslimit

I am aware that smart contracts running on top of EVM can access certain system properties such as timestamp, block number, and gas limit. I am also aware that such properties can be controlled by ...
0
votes
0answers
90 views

Test requires block gas limit much higher than deployment cost

Im testing a really big smart contract using Truffle and Ganache-cli for my test blockchain. The Ganache-cli configuration im using is this: ganache-cli --allowUnlimitedContractSize -l 471238800 -d ...
0
votes
0answers
36 views

JSON RPC get this error “Request have return error: gas required exceeds allowance or always failing transaction”

i'm trying to do a simple transaction for a token but i keep getting following error for estimate gas limit : "Request have return error: gas required exceeds allowance or always failing transaction" ...
0
votes
0answers
106 views

About gas limit and gas

I'm developing Dapp, In that app one function consuming a gas but I am providing sufficient ether at the time of initiating transaction by web3 for the Dapp Users,Then also it is showing out of gas ...
1
vote
1answer
101 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: ...
0
votes
1answer
42 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 ...
5
votes
2answers
627 views

How is it possible to pay 2,100 Ether ($309,267) for a transaction fee?

Here is the transaction details that has transaction fee for 2,100 Ether ($309,267.00) only for sending 0.1 Ether. There is no fairness for users, hence accidentally adding a zero might cause them ...
2
votes
0answers
92 views

Maximum amount of TX per block

Yesterday we did a test. We launched around 1500 transactions simultaneously to our test private blockchain. They all went through perfectly, all at almost the same time (with correct and consecutive ...
0
votes
1answer
261 views

Truffle and Ganache - do I need to set the same gas-price and gas-limit in both of them?

Or can I set different values? If I can set different values, then how will they be used in the system (i.e., what gas-price and gas-limit will apply in every transaction that I execute)? Here is my ...
0
votes
1answer
42 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 ...
2
votes
0answers
27 views

What Web3JS method do I call to know what value to use for the gas price with sendSignedTransaction?

I am using Web3JS 1.0+ to send transactions to my smart contract. I've been using the following constant for the gas price in my code that I got a long time ago from a tutorial. What is the "...
1
vote
2answers
242 views

How to set maximum block gas in ganache-cli

I'm running ganache-cli which seems to have a block gas maximum of around 6.5 million. All the research I've done about this question seems to provide answers of the user themselves setting the user ...
0
votes
1answer
47 views

Deploying contract via Remix costs less gas than deploying via javascript

When I launch my contract via remix, it launches with no issues. When I try to launch the contract via my javascript web3, using the same gas price and gas limit, it fails b/c it ran out of gas. This ...
1
vote
1answer
84 views

What should be optimal gas limit and gas price for 80 addresses airdrop?

This is my airdrop function: mapping (address => bool) public airdrops; function airdropTokens(address[] _recipient, uint256[] _tokens) public onlyOwner{ uint airdropped; for(uint256 i = 0; i< ...
0
votes
1answer
196 views

Transaction Limit per block

I am developing a transaction analysis in a certain scenario on the Ethereum platform. Reading about, I understood that there is not a limit of transactions per block, but a limit of gas. Would anyone ...
1
vote
1answer
380 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 ...
1
vote
1answer
134 views

Gas limit per block

Gas limit per block is a dynamic value. This value is increasing every year. Is it theoretically possible that such a value can somehow decrease?
0
votes
2answers
179 views

How to solve insufficient funds (Ropsten)?

I have tried adjusting the Gas Limit and GWEI and I get this error. I am using infura and Ropsten. Has anyone any ideas about this? Code - var rawTransaction = {"from":myAddress, "...
1
vote
0answers
144 views

Error in mist : exceed block gas limit

I am trying to deploy a smart contract in private network using mist, but when I deploy my contract and provide transaction fee as 0.04 ether it throws error as exceeding block gas limit. Here is the ...
3
votes
0answers
134 views

Difference between execution costs on remix an Ganache?

I created a contract on remix and then deployed it. when I call any function there is an execution cost in gas. I also deployed the same contract on Ganache for testing. I find the execution cost in ...
2
votes
1answer
22 views

Do I need to delete mappings that I don't need anymore?

I have a struct like this: struct Game { string gameID; string[2] teams; string winningTeam; string losingTeam; mapping(string => uint) totalWeiBet; ...
0
votes
2answers
50 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; ...
1
vote
2answers
458 views

Explanation of Geth's Command Line option: targetgaslimit?

I have been trying to figure out what the targetgaslimit parameter does exactly for Geth, in the context of Private Blockchains. I have seen the following explanation but it never helped me: "Target ...
0
votes
1answer
67 views

Smart contract's function work on testnet but don't work on private network

I have been created a smart contract (ERC20 implantation). The contract run great om testrpc, ropsten and rinkeby but i want to use it in a private network. When the contract deployed in the private ...
1
vote
1answer
1k views

Truffle contract deployment either exceeds block gas limit or out of gas

I've been having the same issue when I was trying to deploy a contract using truffle develop console. The contract is not extremely big but does initiate two other contracts when called a certain ...
1
vote
1answer
26 views

Why aren't costs “advertised” or at least knowable so funds aren't lost?

I'm admittedly new to all of this, but as I learn about the transaction model, it seems to be a confusing business model at the very least. I can understand that the price of gas fluctuates or can be ...
0
votes
2answers
319 views

Gas for view functions

I read in many places that view functions do not cost gas however that's not true because they cost gas for blockchain operations even if those do not change the state. Correct me if I am wrong For ...