package tezos-protocol-005-PsBABY5H
Participation exponential moving average, in centile of percentage
type context = Raw_context.t
val mem : context -> bool Tezos_protocol_environment_005_PsBABY5H.Lwt.t
Tells if the data is already defined
val get :
context ->
value Tezos_protocol_environment_005_PsBABY5H.Error_monad.tzresult
Tezos_protocol_environment_005_PsBABY5H.Lwt.t
Retrieve the value from the storage bucket ; returns a Storage_error
if the key is not set or if the deserialisation fails
val get_option :
context ->
value option Tezos_protocol_environment_005_PsBABY5H.Error_monad.tzresult
Tezos_protocol_environment_005_PsBABY5H.Lwt.t
Retrieves the value from the storage bucket ; returns None
if the data is not initialized, or Storage_helpers.Storage_error
if the deserialisation fails
val init :
context ->
value ->
Raw_context.t Tezos_protocol_environment_005_PsBABY5H.Error_monad.tzresult
Tezos_protocol_environment_005_PsBABY5H.Lwt.t
Allocates the storage bucket and initializes it ; returns a Storage_errorExisting_key
if the bucket exists
val set :
context ->
value ->
Raw_context.t Tezos_protocol_environment_005_PsBABY5H.Error_monad.tzresult
Tezos_protocol_environment_005_PsBABY5H.Lwt.t
Updates the content of the bucket ; returns a Storage_Error
Missing_key
if the value does not exists
val init_set :
context ->
value ->
Raw_context.t Tezos_protocol_environment_005_PsBABY5H.Lwt.t
Allocates the data and initializes it with a value ; just updates it if the bucket exists
val set_option :
context ->
value option ->
Raw_context.t Tezos_protocol_environment_005_PsBABY5H.Lwt.t
When the value is Some v
, allocates the data and initializes it with v
; just updates it if the bucket exists. When the valus is None
, delete the storage bucket when the value ; does nothing if the bucket does not exists.
val delete :
context ->
Raw_context.t Tezos_protocol_environment_005_PsBABY5H.Error_monad.tzresult
Tezos_protocol_environment_005_PsBABY5H.Lwt.t
Delete the storage bucket ; returns a Storage_error
Missing_key
if the bucket does not exists
val remove :
context ->
Raw_context.t Tezos_protocol_environment_005_PsBABY5H.Lwt.t
Removes the storage bucket and its contents ; does nothing if the bucket does not exists