Module Storage.Contract

Storage from this submodule must only be accessed through the module `Contract`.

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

type 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.

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:

The manager of a contract

The active consensus key of a delegate

The delegate of a contract, if any.

All contracts (implicit and originated) that are delegated, if any

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.

The contract's unstake requests that haven't been finalized yet.

The sum of all pseudotokens owned by stakers corresponding to shares of the staked_frozen in Staking_balance.

Share of the contract's delegate frozen deposits the contract owns.

If there is a value, the frozen balance for the contract won't exceed it (starting in preserved_cycles + 1).

The last cycle where the delegate is considered active; that is, at the next cycle it will be considered inactive.

Current storage space in bytes. Includes code, global storage and big map elements.

Maximal space available without needing to burn new fees.

History of slashed deposits: an associative list of cycles to slashed percentages.

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

Associates a contract with the total of all its frozen bonds.

Stores the amount of tokens currently present on chain