Couple of test transaction in the Rinkerby network failed due to insufficient gas during execution. I assumed that these transaction where failed since I was not able to find them on the pool or queue. When I use the eth.getTransaction() command it returns null.

  1. Is the blockchain keeping track of these failed transactions?
  2. Where can I find these failed transactions?
  3. If the getTransaction method returns null, can I assume that my transaction has failed?

1 Answer 1

  1. It is included in the blockchain. The user still has to pay for the gas used to process the transaction, even if the transaction reverted. The exception to this, of course, is if the account sending the transaction doesn't have enough ETH to cover the tx fee and the ETH sent. In this case, the transaction can't be included in the blockchain at all because it can't cover the fee.

  2. The transactions are included in the block, so you can check the transaction as you would any other. Use eth.getTransaction() with the transaction hash to check it. Alternatively you can use Etherscan to visually check it (see here for an example in a recent block. If you are using Rinkeby, you'll want to use https://rinkeby.etherscan.io/

  3. You should be getting a response whether it failed or not (unless, of course, you didn't have ETH to send the transaction in the first place). Your transaction may be waiting to be mined.

  • See this answer for other answers to a related question Aug 20, 2018 at 2:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.