package tezos-protocol-015-PtLimaPt
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Script_big_map/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Script_big_map
Source
val empty :
'a Script_typed_ir.comparable_ty ->
('b, _) Script_typed_ir.ty ->
('a, 'b) Script_typed_ir.big_map
empty
is the big map with no bindings.
val mem :
Alpha_context.context ->
'key ->
('key, 'value) Script_typed_ir.big_map ->
(bool * Alpha_context.context)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
mem ctxt key big_map
returns true
iff key
is bound in the given big_map
. Consumes the cost of hashing the given key. Consumes as Storage.Big_map.Contents.mem
if the key is not bound yet in the current overlay.
val get :
Alpha_context.context ->
'key ->
('key, 'value) Script_typed_ir.big_map ->
('value option * Alpha_context.context)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
get ctxt key big_map
returns the value bound by key
in the given big_map
. If the key
is not bound, None
is returned instead. Consumes cost of hashing the given key. Consumes cost as Storage.Big_map.Contents.find
in case of the given key is absent in the current overlay. Consumes cost of parsing data if the value is readed from storage.
val update :
Alpha_context.context ->
'key ->
'value option ->
('key, 'value) Script_typed_ir.big_map ->
(('key, 'value) Script_typed_ir.big_map * Alpha_context.context)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
update ctxt key new_value big_map
updates the value bound by key
with v
if the new_value
is Some v
. When the new_value
is None
, delete the entire entry bound by key
in the big_map
. Consumes cost for hashing the given key. See get_and_update
for details.
val get_and_update :
Alpha_context.context ->
'key ->
'value option ->
('key, 'value) Script_typed_ir.big_map ->
(('value option * ('key, 'value) Script_typed_ir.big_map)
* Alpha_context.context)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
get_and_update ctxt key new_value big_map
works just like update ctxt key new_value big_map
except it also returns the old value bound by key
. Consumes cost for hashing the given key. This does not modify the underlying storage, only the diff table.