Expand description
This module contains the TicketRedeemActions trait defining actions regarding ticket redemption.
An implementation of this trait is added to ChainActions which realizes the redemption operations via ActionQueue.
There are 4 functions that can be used to redeem tickets in the TicketRedeemActions trait:
Each method first checks if the tickets are redeemable. (= they are not marked as BeingRedeemed or BeingAggregated in the DB), If they are redeemable, their state is changed to BeingRedeemed (while having acquired the exclusive DB write lock). Subsequently, the ticket in such a state is transmitted into the ActionQueue so the redemption is soon executed on-chain. The functions return immediately but provide futures that can be awaited in case the callers wish to await the on-chain confirmation of each ticket redemption.
See the details in ActionQueue on how the confirmation is realized by awaiting the respective SignificantChainEvent. by the Indexer.
Traitsยง
- Ticket
Redeem Actions - Gathers all the ticket redemption-related on-chain calls.