Tezos_raw_protocol_alpha.Clst_storageval get_storage :
Alpha_context.context ->
(Script_native_types.CLST_types.storage option * Alpha_context.context)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tget_storage ctxt returns the storage retrieved and parsed from the context. It doesn't fail if the storage didn't exist in the context, i.e. the CLST contract has not been originated.
val get_balance_from_storage :
Alpha_context.context ->
Script_native_types.CLST_types.storage ->
Script_typed_ir.address ->
(Script_native_types.CLST_types.nat * Alpha_context.context)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tget_balance_from_storage ctxt storage address returns the balance from the given address, extracted from the CLST contract's storage. Returns `zero_n` if no balance has been found, following FA2.1 specification.
val get_balance :
Alpha_context.context ->
Alpha_context.Contract.t ->
(Script_native_types.CLST_types.nat * Alpha_context.context)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tget_balance context contract retrieves the balance of a given contract on the CLST contract. This is a combination of `get_storage` and `get_balance_from_storage`.
val set_balance_from_storage :
Alpha_context.context ->
Script_native_types.CLST_types.storage ->
Script_typed_ir.address ->
Script_native_types.CLST_types.nat ->
(Script_native_types.CLST_types.storage * Alpha_context.context)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tset_balance_from_storage ctxt storage address amount updates the balance of the given address to amount.