Library
Module
Module type
Parameter
Class
Class type
The ledger of the layer 2 where are registered the amount of a given ticket a L2 account
has in its possession.
val get :
t ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.ticket_index ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.address_index ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_qty.t m
get ctxt tidx aidx
returns the quantity of tickets (tidx
) aidx
owns.
Note: It is the responsibility of the caller to verify that aidx
and tidx
have been associated to an address and a ticket respectively. The function will return zero when the address has no such ticket.
val credit :
t ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.ticket_index ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.address_index ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_qty.t ->
t m
credit ctxt tidx aidx qty
updates the ledger to increase the number of tickets indexed by tidx
the address aidx
owns by qty
units.
This function can fail with Balance_overflow
if adding qty
to the current balance of aidx
causes an integer overflow.
This function can fail with Invalid_quantity
if qty
is not strictly positive.
Note: It is the responsibility of the caller to verify that aidx
and tidx
have been associated to an address and a ticket respectively.
val spend :
t ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.ticket_index ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.address_index ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_qty.t ->
t m
spend ctxt tidx aidx qty
updates the ledger to decrease the number of tickets indexed by tidx
the address aidx
owns by qty
units.
This function can fail with Balance_too_low
if aidx
does not own at least qty
ticket.
Note: It is the responsibility of the caller to verify that aidx
and tidx
have been associated to an address and a ticket respectively.
module Internal_for_tests : sig ... end