= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Mapping between Ticket_hash
.t and ticket_index
.
Ticket hashes are supposed to be associated to a ticket_index
in order to reduce the batches' size submitted from the layer1 to the layer2. Therefore, the first time a ticket hash is used in a layer2 operation, we associate it to a ticket_index that should be use in future layer2 operations.
val get :
t ->
Tezos_raw_protocol_013_PtJakart.Alpha_context.Ticket_hash.t ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.ticket_index option
m
get ctxt ticket
returns the index associated to ticket
, if any.
val get_or_associate_index :
t ->
Tezos_raw_protocol_013_PtJakart.Alpha_context.Ticket_hash.t ->
(t
* [ `Created | `Existed ]
* Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.ticket_index)
m
get_or_associate_index ctxt ticket
associates a fresh ticket_index
to ticket
, and returns it. If the ticket
has already been associated to an index, it returns it. It also returns the information on whether the index was created or already existed.
This function can fail with Too_many_l2_tickets
iff there is no fresh index available.