Linked Questions

70
votes
3answers
23k views

Difference between require and assert and the difference between revert and throw

I was looking at the docs and Im looking for clarification on the difference between require and assert and throw and revert. assert(bool condition): abort execution and revert state changes if ...
31
votes
1answer
26k views

Transaction Status

A very elementary question, how do I get a transaction status after firing the transaction? I mean suppose I do a sendTransaction where I transfer some amount of ether from 1 account to other, how can ...
21
votes
4answers
9k views

How can the transaction status from a thrown error be detected when gas can be exactly the same as the gasUsed for a successful transaction?

This question arose from answering Transaction Status. In the following example, I am sending gas of 21,000 (the amount required for a regular transaction). In this situation gas == gasUsed, and so ...
19
votes
5answers
37k views

How to know if a transaction went through or not? (out of gas)

Apparently when sending transactions from an Account instead of a Wallet, the gas spent is small (21K), and not enough to send ether to a Contract Wallet (out of gas, so to speak). When this happens, ...
15
votes
5answers
4k views

How do I know when I've run out of gas programmatically?

This keeps coming up on the gitter forums so I thought I'd ask and answer this question: How do you know when you've run out of gas?
17
votes
1answer
4k views

What is the exact meaning of a transaction's new receipt 'status' field?

In this answer (https://ethereum.stackexchange.com/a/6010/1529) it seems to say that the status field will always be '1' unless the transaction failed, in which case it will be '0'. In the summary ...
4
votes
1answer
716 views

What improvements will the upcoming Byzantium fork bring to Smart Contract development?

The Ethereum Team announced recently that the Byzantium fork will happen on October 16. This will be the first phase of the Metropolis upgrade. What improvements will the Byzantium bring to Smart ...
4
votes
1answer
2k views

how to find transaction success or failure programatically?

I am using geth in linux and sending few transactions, and in out of 100 around 30 are getting errored. How to find out Whether transactions went though or not with in geth cli. How to find out what ...
9
votes
2answers
457 views

Why doesn't the Ethereum protocol have an indicator for a transaction that failed?

Why doesn't the Ethereum protocol have a clear indicator for a transaction that is reverted? There's a heuristic here as well as a workaround using Geth. But there are probably ways that the ...
0
votes
1answer
1k views

Check for error in transaction with web3js

If you look at this transaction in etherscan.io you can see that it notes that the transaction has an error Warning! Error encountered during contract execution [Bad instruction]. Same status can be ...
2
votes
2answers
453 views

Truffle test promise that expectedly throws error

I have contract with methods that check input parameters using require(bool) so if at least on of conditions does not matched it throws an error. During test procedure (using Truffle and Chaijs) it ...