Tickets: Prepare MR for storage part
Introduces a storage module used for the ticket-balance table.
The new table is for tracking ticket ownership. It's a mapping from ticketer (the creator of the ticket), content and owner (the contract currently holding parts of the ticket type). For instance:
| Ticketer x Content x Owner | Amount |
|---|---|
(KT789, "T1", KT789) |
1 |
(KT789, "T1", KT123) |
5 |
(KT700, Unit, KT800) |
7 |
| ... | ... |
The top-level API for modifying the table is exposed through a module Alpha_context.Ticket_balance.
It defines a type token which represents a ticket type (a pair of ticket creator and content).
It provides a function adjust_balance for updating the ticket-balance table:
val adjust_balance :
t ->
token:token ->
owner:Contract.t ->
delta:Z.t ->
(t, error trace) result Lwt.t
Edited by Joel Bjornson