Questions tagged [out-of-gas]

exception generated when computations consume all the gas available to a transaction

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

“in Process” Ran out of gas

Kyrptono Exchange Customer Support has refused to respond to my problem. The transaction failed, because it ran out of gas, I can still see a shadow of my DGX on Kyrptono account, but after 7 months ...
1
vote
1answer
24 views

What is the right way to calculate gas price and limit for contract deployment?

I have tried several times and reached up to a gasPrice of 65 Gwei and a gasLimit of 500,000 which is $7.6 and still the deployment fails with error "Out of gas". After spending tens of USD ...
1
vote
0answers
12 views

Is gas cost of external calls included in gas cost of the main call?

When I call external methods of other contracts from my contract, is the gas fee of these calls included in the gas fee displayed by MetaMask? My transaction reverts (execution reverted) for an ...
0
votes
0answers
13 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
1answer
25 views

Status is Successful but got internal transaction out of gas?

I call a function with the transaction like this https://ropsten.etherscan.io/tx/0x7d4dec3c0db2b700efae63ef3ffb5a33fc2335bd992fd37c48aa10560eb8156e this fuction is a call from other contract,I wrote ...
0
votes
0answers
24 views

Gas-efficient string concatenation

My use-case requires that I feed my contract with a long string (Base64 data), which requires to split it and send it over several transactions so as to not reach gas limit. Then the contract rebuilds ...
1
vote
0answers
89 views

Catch Internal Out of Gas Exception in Solidity Code

I ran this transaction which executed correctly, but one of the internal calls gave me back an out of gas error. I had a try/catch mechanism to let my code terminate silently (to set some really ...
1
vote
1answer
30 views

Do other blockchain have gas concepts? [closed]

I understand that Ethereum have gas mechanism to avoid infinite loop and network abuse, but I was wondering whether other blockchain platforms also have gas concepts? Say Cardano, Hyperledger,...
0
votes
2answers
58 views

gas exceeds allowance

I'm testing my smart contract on ropsten and I have written an async function that lets me send TRANSACTION transactions from TRANSACTION different accounts. For some reason when TRANSACTION > 20 i ...
1
vote
3answers
73 views

simulate transaction without sending to blockchain

Is there any way to simulate a transaction without sending it to the blockchain and find the exact error (or line of code), in case it fails if its mined?
2
votes
2answers
40 views

Gas cost for Ether transfer to Smart Contract from EOA

It is pretty clear that Ether transfer between accounts is 21,000 gas. Does the same apply for transferring Ether to Smart contract address, or does transfer from EOA to Smartcontract cost more gas? I ...
0
votes
0answers
26 views

TransactionException: Transaction has failed with status: 0x0. Gas used: 50434. (not-enough gas?)

I’m new to ethereum and have small experiance with write contracts (in solidity). I think I have a very simple question but is very hard for me. I wrote a contract to manage erc20 tokens. Most ...
0
votes
1answer
39 views

find the exact error in solidity transaction programmatically

I know we can detect that the transaction is going to be failed with the "Out of gas" warning beforehand but is it possible to find the exact error before sending it to the blockchain. How can we ...
1
vote
1answer
125 views

Ganache: out-of-gas during deployment

I have a bunch of contracts which deploy just fine. Deployment of one of the contracts, XBRNetwork takes exactly 5418911 gas - no problems with that. However, once I add another trivial (public) ...
-1
votes
1answer
84 views

Unable to test a smart contract on ropsten test network

I launch and verify an ERC20 based smart contract on a ropsten test network which allows user to interact with the contract (send eth to it and the contract automatically send token in returns as in ...
0
votes
1answer
54 views

Why do I always get “Returned values are not valid, did it run Out of Gas”?

I'm new on Ethereum blockchain and I'm working on deploy and using smart contract using truffle on my private blockchain. I have followed exactly this guide https://www.trufflesuite.com/docs/...
2
votes
1answer
56 views

How to avoid an error caused by wrong determining of gas consumption

I have a function that is being called by multiple users (say 3). That value is set by owner earlier as a constant. Inside this function there's a check whether it's the last user (3) or not. If yes ...
2
votes
1answer
58 views

How to divide and allocate the amount to token holders without loops?

I have a smart contract that keeps record of the people holding the tokens in form of array of addresses. An owner of the smart contract, whenever, sends some ethers to the contract these ethers shall ...
0
votes
1answer
21 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 ?
1
vote
2answers
339 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) { ...
1
vote
1answer
99 views

I've given Gwei less than 0.1 for a transaction, and it's been an hour, and it is not showing up in etherscan!

I know I pretty much messed up with Gwei, I've given it < 0.1. My doubt is if the transaction gets failed will the funds get back to my wallet or lost forever and how much time will it take for the ...
1
vote
1answer
84 views

TX fails in private blockchain when trying to access an ERC20 contract from another contract

I have an ERC20 contract and I am trying to access it from another contract, which is a Faucet. In the Faucet I have a function to query an account's balance, and another one to transfer some tokens ...
0
votes
2answers
51 views

Out of Gas Exception on Tobalaba

I deployed the same contract to Rinkeby, Ropsten and Tobalaba networks. Rinkeby and Ropsten work fine, but the contract execution on Tobalaba fails because of an out-of-gas exception: https://tobalaba....
0
votes
0answers
111 views

Transaction to Smart Contract runs out of gas on Ropsten but not on Rinkeby

the following execution of my smart contract function runs out of Gas on the Ropsten network, but works fine on Rinkeby, do you have an idea why this happens? struct vehicleData{ string ...
2
votes
1answer
969 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 ...
3
votes
1answer
2k views

Metamask Failed transaction when sending out BAT tokens

I've been trying to send some BAT tokens out of my metamask wallet for quite awhile and it keeps eating up all my eth gas fees. I even increased the gwei fee to 100 and paid .50 USD as the fee. And it ...
1
vote
0answers
22 views

Why is one of my transactions using more gas when both carry out the same function of sending ether?

Below are two functions that I have in a simple lease smart contract. I am running a TestRPC node with Remix on version 0.5.1. When I call the terminate function, it executes and terminates the ...
0
votes
1answer
60 views

Possible replay attack when paying to smart contract

I am afraid of a possible replay attack when paying to a smart contract. Given these 3 assumptions An action gas cost may change according to the state of the blockchain (even if its the same action)....
1
vote
1answer
70 views

why use up all the gasLimit when use assembly and revert together?

try to call erc20 token's transferFrom() using assembly(to save some gas), code like this: pragma solidity ^0.4.24; contract TestAssemblyAndRevert { function test(address from, address to, ...
1
vote
1answer
56 views

What is the advantage and disadvantage of deploying Erays on Ethereum?

I have read this paper, Erays: Reverse Engineering Ethereum's Opaque Smart Contracts. They proposed this reverse engineering tool for Ethereum smart contracts. it will take as input a compiled EVM ...
0
votes
1answer
25 views

Can transaction fail after being sent?

I wonder what would happen in following hyphotwtical scenario. Transaction is being sent with blockchain state A. In this state transaction consume 100_000 gas and sender has enough funds to pay for ...
0
votes
1answer
84 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 ...
1
vote
2answers
1k views

Out of gas error for a view function

having a problem with calling a method of my deployed contract in the main Ethereum network. I have a 'view' function which returns user's refund balance, everything worked fine in my local ...
2
votes
1answer
1k views

Running out of gas during a deploy due to a large number of require() statements?

I have a smart contract that has a fair number of functions, but a large number of require() statements because I carefully check every incoming parameter and some intermediate calculation results too....
1
vote
2answers
337 views

transaction fails due to out of gas in mainnet

Transaction fails due to out of gas though gas used by transaction is 22.32 % . What might be the reason ? I have give enough gas : 203000 wei. Here is the link of the transaction
1
vote
1answer
124 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< ...
1
vote
1answer
2k 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
33 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 ...
5
votes
2answers
2k views

ERC20 :: Transferring tokens without sender gas

Let's assume we have 50 ERC20 tokens that we would like to support (deposits) on our website. People are depositing tokens to the ETH adresses we've generated for them. In the end of the day, we want ...
3
votes
1answer
36 views

Contract design by contract -> correctness and maximum gas consumption

This question is a general design question that regards contract correctness and the functions I list here are just examples. As I develop on Ethereum, it becomes aparent to me that it might be ...
1
vote
2answers
76 views

Supply gas from contract to execution of function

let's say I have something like this function usuallyCheapFunction() external { ... do something cheap... if(rareCondition == true) { expensiveCleanupFunction(); } } function ...
1
vote
1answer
37 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/...
3
votes
2answers
241 views

If Metamask Gas calculations are nearly perfect why do we still get out of Gas error?

Pardon me if this question seems a bit naive. I have written a smart contract (for proof of existence) and simulating it in Ganache. Inside it I have logic to store data in a mapping created between ...
0
votes
1answer
65 views

Contract deployment out of gas, but was created anyway?

I have deployed a contract with Parity on Kovan, which did not show up in the contracts menu after contract deployment was done. I had to watch it manually to be able to see it in the contracts menu. ...
0
votes
1answer
109 views

The contract code couldn't be stored when deploying to rinkeby

I was finally able to get some ether funded and geth/mist working and now i am getting the following error when attempting to deploy my contracts to the rinkeby test network. My project is based on ...
1
vote
0answers
107 views

Gas requirement of contract deployment

I've recently been running into issues with contract deployment (receiving "Error: VM Exception while processing transaction: out of gas" during migration). It's been my understanding that the ...
1
vote
2answers
134 views

Returning dynamic arrays: out of gas

I'm trying to return a dynamic array of structures from a Solidity function to a client. Since I need to build the result, I'm declaring a storage variable and add elements to it: function ...
2
votes
1answer
125 views

Unable to deploy contract that uses Oraclize. Out of gas

I'm trying to deploy a smart contract that uses Oraclize on the Ropsten TestNet using truffle. It seems that deploy the Oraclize api contract (imported by my contract) it's too costly and causes the ...
0
votes
2answers
1k views

“The transaction execution will likely fail. Do you want to force sending? VM Exception while processing transaction: out of gas”

When I want to deploy a contract using testRPC and remix, I receive the following error message: Gas estimation errored with the following message (see below). The transaction execution will ...
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 ...

1
2 3 4 5