package tezos-protocol-011-PtHangz2

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

Variant of Data_set_storage with gas accounting.

type t
type context = t
type elt

The type of elements.

val mem : context -> elt -> (Raw_context.t * bool, Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) Stdlib.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_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) Stdlib.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_011_PtHangz2__Environment.Error_monad.error Tezos_protocol_environment_011_PtHangz2__Environment.Error_monad.trace) Stdlib.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 -> init:'acc -> f:(elt -> 'acc -> 'acc Lwt.t) -> 'acc Lwt.t
OCaml

Innovation. Community. Security.