We want to get the list of all the failed tx on our contract so we can take necessary actions to improve the UX for the end users. Is there any way of doing so?
Thanks!
We want to get the list of all the failed tx on our contract so we can take necessary actions to improve the UX for the end users. Is there any way of doing so?
Thanks!
Incorrect transactions on Starknet can be either
"Rejected" transactions are the one that are not accepted by the sequencer. They are the same as transactions rejected from Ethereum because of an invalid signature or an invalid nonce. On Starknet, this can be a transaction with an invalid nonce, for example. From the point of view of the blockchain, they don't exist. They are not indexed by the sequencer, and there is no way to list them.
It's important to note that from the POV of users, they don't really exist; they have no impact on their account.
"Failed" transactions on the other hand can be included in a block; but their execution leads to an error in the program they try to execute. The sender is charged for their execution. And they are indexable by the sequencer.
Now, the important footnotes. Right now (20/03/2023) there are only rejected transactions on Starknet. Failed transactions don't exist. So transactions who trigger a smart contract error are also considered rejected; not included in a block; and not indexable.
In an upcoming version of Starknet later this year, failed transactions will become possible. These will be indexable.