Module Store_v2.Lcc

Storage containing the last cemented commitment.

type lcc = {
  1. commitment : Mavkit_smart_rollup.Commitment.Hash.t;
  2. level : int32;
}
include Mavryk_layer2_store.Indexed_store.SINGLETON_STORE with type value := lcc
type +'a t

The type of the singleton store.

Load (or initializes) a singleton store in the file path.

val read : [> `Read ] t -> lcc option Mavryk_base.TzPervasives.tzresult Lwt.t

Reads the current value from the disk. Returns None if the file does not exist.

val write : [> `Write ] t -> lcc -> unit Mavryk_base.TzPervasives.tzresult Lwt.t

Write the value to disk.

val delete : [> `Write ] t -> unit Mavryk_base.TzPervasives.tzresult Lwt.t

Deletes the value from the disk.

val readonly : [> `Read ] t -> [ `Read ] t

readonly t returns a read only version of the store t.