package tezos-protocol-015-PtLimaPt
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Alpha_context/Big_map/index.html
Module Alpha_context.Big_map
Source
Big maps are a data structure storing key-value associations, just like regular maps, but here the whole content of the structure is not loaded in memory when interacting with it. They are thus suitable for a Michelson contract, for instance, when there are a lot of bindings, but only a few items are accessed at each contract call.
val fresh :
temporary:bool ->
context ->
(context * Id.t) Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
Create a fresh big map in the context.
val mem :
context ->
Id.t ->
Script_expr_hash.t ->
(context * bool) Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
Carbonated membership of a key (from its hash) in a big map.
val get_opt :
context ->
Id.t ->
Script_expr_hash.t ->
(context * Script.expr option)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
Carbonated retrieval of the value associated to a key (from its hash) in a big map, if any.
val exists :
context ->
Id.t ->
(context * (Script.expr * Script.expr) option)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
Carbonated retrieval of the key and value types of the bindings in a big map referenced by its identifier, if this identifier is actually bound to a big map in the context.
val list_key_values :
?offset:int ->
?length:int ->
context ->
Id.t ->
(context * (Script_expr_hash.t * Script.expr) list)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
list_key_values ?offset ?length ctxt id
lists the key hash and value for each entry in big map id
. The first offset
values are ignored (if passed). Negative offsets are treated as 0
. There will be no more than length
values in the result list (if passed). Negative values are treated as 0
.
The returned context
takes into account gas consumption of traversing the keys and loading values.
type update = {
key : Script_repr.expr;
(*The key is ignored by an update but is shown in the receipt.
*)key_hash : Script_expr_hash.t;
value : Script_repr.expr option;
}
The type of big map updates. When value = None
, the potential binding associated to the key
will be removed.
The types of keys and values in a big map.