package octez-protocol-alpha-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Frozen_tez represents frozen stake and frozen unstaked funds. Properties:

  • sum of all current partial tez is an integer
  • Can only add integer amounts
  • Can always subtract integer amount (if lower than frozen amount)
  • If subtracting partial amount, must be the whole frozen amount (for given contract). The remainder is then distributed equally amongst remaining accounts, to keep property 1.
  • All entries of current are positive, non zero.
type t = {
  1. delegate : string;
  2. initial : Tez.t;
  3. self_current : Tez.t;
  4. co_current : Partial_tez.t Tezos_base.TzPervasives.String.Map.t;
}
val pp : Format.formatter -> t -> unit
val zero : t
val union : t -> t -> t
val total_co_current : t -> Tez.t
val total_current : t -> Tez.t
val total_current_with_limits : limit_of_staking_over_baking:Q.t -> t -> Tez.t
val add_tez_to_all_current : edge:Q.t -> Tez.t -> t -> t
val sub_tez_from_all_current : Tez.t -> t -> t
val add_current : Tez.t -> Tezos_base.TzPervasives.String.Map.key -> t -> t
val add_self_current : Tez.t -> t -> t
val sub_current_q : Q.t -> Tezos_base.TzPervasives.String.Map.key -> t -> t
OCaml

Innovation. Community. Security.