= 768" x-on:close-sidebar="sidebar=window.innerWidth >= 768 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Mapping between Tx_rollup_l2_address
.address and address_index
.
Addresses are supposed to be associated to a address_index
in order to reduce the batches' size submitted from the layer1 to the layer2. Therefore, the first time an address is used in a layer2 operation, we associate it to a address_index that should be use in future layer2 operations.
val get :
t ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_address.t ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.address_index option
m
get ctxt addr
returns the index associated to addr
, if any.
val get_or_associate_index :
t ->
Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_address.t ->
(t
* [ `Created | `Existed ]
* Tezos_raw_protocol_013_PtJakart.Tx_rollup_l2_context_sig.address_index)
m
get_or_associate_index ctxt addr
associates a fresh address_index
to addr
, and returns it. If the addr
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_addresses
iff there is no fresh index available.