package tezos-protocol-012-Psithaca

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Like Make_data_set_storage, adding tracking of storage cost.

Parameters

module C : Raw_context.T
module I : INDEX

Signature

type t = C.t
type context = t
type elt = I.t

The type of elements.

val mem : context -> elt -> (Raw_context.t * bool, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) result Lwt.t

Tells whether an elt is a member of the set. Consumes Gas_repr.read_bytes_cost Z.zero

val init : context -> elt -> (Raw_context.t * int, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) result Lwt.t

Adds an elt as a member of the set. Consumes Gas_repr.write_bytes_cost <size of the new value>. Returns the the new size.

val remove : context -> elt -> (Raw_context.t * int * bool, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) result Lwt.t

Removes an elt from the set ; does nothing if not a member. Consumes Gas_repr.write_bytes_cost Z.zero. Returns the freed size, and a boolean indicating if a value was already associated to this key.

val fold_keys_unaccounted : context -> order:[ `Sorted | `Undefined ] -> init:'acc -> f:(elt -> 'acc -> 'acc Lwt.t) -> 'acc Lwt.t
OCaml

Innovation. Community. Security.