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 init_counter : t -> t m

init_counter ctxt writes the default counter (i.e. 0L) in the context.

get ctxt addr returns the index associated to addr, if any.

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.

val count : t -> int32 m

count ctxt returns the number of addresses that have been involved in the transaction rollup.