package tezos-protocol-020-PsParisC
A carbonated storage for stakers (identified by their public key hashes) that are able to stake on commitments. If the storage is empty then the rollup is public (anyone can publish commitments for the rollup), otherwise it is private (only the members of the whitelist can publish commitments).
type context = Raw_context.t * Sc_rollup_repr.t
The type of elements.
val is_empty :
context ->
(Raw_context.t * bool)
Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
Returns true if and only if the set contains no elements. Consumes Gas_repr.read_bytes_cost Z.zero
.
val mem :
context ->
elt ->
(Raw_context.t * bool)
Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.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_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
Adds an elt as a member of the set. Consumes Gas_repr.write_bytes_cost <size of the new value>
. Returns the new size.
val add :
context ->
elt ->
(Raw_context.t * int * bool)
Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
Adds an elt as a member of the set. Consumes Gas_repr.write_bytes_cost <size of the new value>
. Returns the new size, and true if the value previously existed.
val remove :
context ->
elt ->
(Raw_context.t * int * bool)
Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.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 clear :
context ->
Raw_context.t Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
Removes all elt from the set. Consumes Gas_repr.write_bytes_cost Z.zero
.
This function does not returns the freed size. This is because it would need to fold over all keys or add a size accumulator and no usage exists so far.
val fold_keys_unaccounted :
context ->
order:[ `Sorted | `Undefined ] ->
init:'acc ->
f:(elt -> 'acc -> 'acc Tezos_protocol_environment_020_PsParisC.Lwt.t) ->
'acc Tezos_protocol_environment_020_PsParisC.Lwt.t