5

How to know if a transaction (tx) succeed or fail after awaitTxConfirmed? Is there any function to get a tx on-chain by TxId?

1 Answer 1

4

awaitTxConfirmed is actually part of the off-chain code, so your computer is checking the chain to see if the transaction has become part of the ledger.

Sadly, right now awaitTxConfirmed does not know that a transaction has failed and if it did fail, your smart contact would be blocked, unless you introduce a logic to time out if your transaction is not included in the ledger for some amount of blocks for example.

However, I know the plutus team is working to solve this and we might have this functionality soon in Plutus.

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.