Try it Live
Run TransactionStatus examples in the interactive playground
Overview
TransactionStatus is a discriminated union type representing the execution status of a transaction: pending, success, or failed.Type Definition
Creating Status Values
pending
Transaction not yet mined.success
Transaction executed successfully.failed
Transaction reverted or failed.Type Guards
isPending
Check if status is pending.isSuccess
Check if status is success (narrows type).isFailed
Check if status is failed (narrows type).Usage in Receipts
TransactionStatus appears in receipts to indicate execution outcome:Handling Different States
See Also
- Receipt - Transaction receipts
- TransactionHash - Transaction identifier
- Uint - Gas amounts

