Storage.Contract
Storage from this submodule must only be accessed through the module `Contract`.
module Global_counter :
Simple_single_data_storage with type value = Manager_counter_repr.t
val fold :
Raw_context.t ->
order:[ `Sorted | `Undefined ] ->
init:'a ->
f:(Contract_repr.t -> 'a -> 'a Mavryk_protocol_environment_001_PtAtLas.Lwt.t) ->
'a Mavryk_protocol_environment_001_PtAtLas.Lwt.t
The domain of alive contracts
val list :
Raw_context.t ->
Contract_repr.t list Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val with_local_context :
Raw_context.t ->
Contract_repr.t ->
(local_context ->
(local_context * 'a)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t) ->
(Raw_context.t * 'a)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
module Spendable_balance :
Storage_sigs.Indexed_data_storage_with_local_context
with type key = Contract_repr.t
and type value = Tez_repr.t
and type t := Raw_context.t
and type local_context := local_context
The mav possessed by a contract and that can be used. A contract may also possess mav in frozen deposits. Empty balances (of zero mav) are only allowed for originated contracts, not for implicit ones.
module Missed_attestations :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = missed_attestations_info
and type t := Raw_context.t
If the value is not set, the delegate didn't miss any attesting opportunity. If it is set, this value is a record of type missed_attestations_info
, where:
module Manager :
Storage_sigs.Indexed_data_storage_with_local_context
with type key = Contract_repr.t
and type value = Manager_repr.t
and type t := Raw_context.t
and type local_context := local_context
The manager of a contract
module Consensus_key :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value =
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key.t
and type t := Raw_context.t
The active consensus key of a delegate
module Delegate :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value =
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t
and type t := Raw_context.t
The delegate of a contract, if any.
module Staking_parameters :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Staking_parameters_repr.t
and type t := Raw_context.t
module Delegated :
Storage_sigs.Data_set_storage
with type elt = Contract_repr.t
and type t = Raw_context.t * Contract_repr.t
All contracts (implicit and originated) that are delegated, if any
module Unstaked_frozen_deposits :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Unstaked_frozen_deposits_repr.t
and type t := Raw_context.t
Tez that were part of frozen deposits (either own_frozen
or staked_frozen
in Staking_balance
) but have been requested to be unstaked by a staker. They won't be part of the stake for future distributions. For cycles current_cycle - preserved_cycles - max_slashing_period + 1
to current_cycle
they are still slashable. For cycle current_cycle - preserved_cycles - max_slashing_period
they are not slashable anymore and hence any other older cycles must be squashed into this one at cycle end.
module Unstake_requests :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Unstake_request.t
and type t := Raw_context.t
The contract's unstake requests that haven't been finalized yet.
module Frozen_deposits_pseudotokens :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Staking_pseudotoken_repr.t
and type t := Raw_context.t
The sum of all pseudotokens owned by stakers corresponding to shares of the staked_frozen
in Staking_balance
.
module Staking_pseudotokens :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Staking_pseudotoken_repr.t
and type t := Raw_context.t
Share of the contract's delegate frozen deposits the contract owns.
module Frozen_deposits_limit :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Tez_repr.t
and type t := Raw_context.t
If there is a value, the frozen balance for the contract won't exceed it (starting in preserved_cycles + 1).
module Inactive_delegate :
Storage_sigs.Data_set_storage
with type elt = Contract_repr.t
and type t = Raw_context.t
module Delegate_last_cycle_before_deactivation :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Cycle_repr.t
and type t := Raw_context.t
The last cycle where the delegate is considered active; that is, at the next cycle it will be considered inactive.
module Counter :
Storage_sigs.Indexed_data_storage_with_local_context
with type key = Contract_repr.t
and type value = Manager_counter_repr.t
and type t := Raw_context.t
and type local_context := local_context
module Code :
Storage_sigs.Non_iterable_indexed_carbonated_data_storage
with type key = Contract_repr.t
and type value = Script_repr.lazy_expr
and type t := Raw_context.t
module Storage :
Storage_sigs.Non_iterable_indexed_carbonated_data_storage
with type key = Contract_repr.t
and type value = Script_repr.lazy_expr
and type t := Raw_context.t
module Used_storage_space :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Mavryk_protocol_environment_001_PtAtLas.Z.t
and type t := Raw_context.t
Current storage space in bytes. Includes code, global storage and big map elements.
module Paid_storage_space :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Mavryk_protocol_environment_001_PtAtLas.Z.t
and type t := Raw_context.t
Maximal space available without needing to burn new fees.
module Slashed_deposits :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Slashed_deposits_history.t
and type t := Raw_context.t
History of slashed deposits: an associative list of cycles to slashed percentages.
module Frozen_bonds :
Storage_sigs.Non_iterable_indexed_carbonated_data_storage
with type key = Bond_id_repr.t
and type value = Tez_repr.t
and type t := Raw_context.t * Contract_repr.t
Associates a contract and a bond_id with a bond, i.e. an amount of mav that is frozen.
val fold_bond_ids :
(Raw_context.t * Contract_repr.t) ->
order:[ `Sorted | `Undefined ] ->
init:'a ->
f:(Bond_id_repr.t -> 'a -> 'a Mavryk_protocol_environment_001_PtAtLas.Lwt.t) ->
'a Mavryk_protocol_environment_001_PtAtLas.Lwt.t
module Total_frozen_bonds :
Storage_sigs.Indexed_data_storage
with type key = Contract_repr.t
and type value = Tez_repr.t
and type t := Raw_context.t
Associates a contract with the total of all its frozen bonds.
module Total_supply :
Storage_sigs.Single_data_storage
with type value = Tez_repr.t
and type t := Raw_context.t
Stores the amount of tokens currently present on chain