package octez-protocol-020-PsParisC-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val join_errors : (unit, 'a list) result -> (unit, 'a list) result -> (unit, 'a list) result Lwt.t
module Tez : sig ... end

Tez manipulation module

module Partial_tez : sig ... end

Representation of Tez with non integer values

module Frozen_tez : sig ... end

Frozen_tez represents frozen stake and frozen unstaked funds. Properties:

module Unstaked_frozen : sig ... end

Representation of Unstaked frozen deposits

module Unstaked_finalizable : sig ... end

Representation of unstaked finalizable tez

type staking_parameters = {
  1. limit_of_staking_over_baking : Q.t;
  2. edge_of_baking_over_staking : Q.t;
}

Abstraction of the staking parameters for tests

module CycleMap : sig ... end
type account_state = {
  1. pkh : Tezos_base.TzPervasives.Signature.Public_key_hash.t;
  2. contract : Tezos_protocol_020_PsParisC.Protocol.Alpha_context.Contract.t;
  3. delegate : string option;
  4. parameters : staking_parameters;
  5. liquid : Tez.t;
  6. bonds : Tez.t;
  7. frozen_deposits : Frozen_tez.t;
  8. unstaked_frozen : Unstaked_frozen.t;
  9. unstaked_finalizable : Unstaked_finalizable.t;
  10. staking_delegator_numerator : Z.t;
  11. staking_delegate_denominator : Z.t;
  12. frozen_rights : Tez.t CycleMap.t;
  13. slashed_cycles : Cycle.t list;
}

Abstract information of accounts

val init_account : ?delegate:string -> pkh:Tezos_base.TzPervasives.Signature.Public_key_hash.t -> contract:Tezos_protocol_020_PsParisC.Protocol.Alpha_context.Contract.t -> parameters:staking_parameters -> ?liquid:Tez.t -> ?bonds:Tez.t -> ?frozen_deposits:Frozen_tez.t -> ?unstaked_frozen:Unstaked_frozen.t -> ?unstaked_finalizable:Unstaked_finalizable.t -> ?staking_delegator_numerator:Z.t -> ?staking_delegate_denominator:Z.t -> ?frozen_rights:Tez.t CycleMap.t -> ?slashed_cycles:Cycle.t list -> unit -> account_state
type balance = {
  1. liquid_b : Tez.t;
  2. bonds_b : Tez.t;
  3. staked_b : Partial_tez.t;
  4. unstaked_frozen_b : Tez.t;
  5. unstaked_finalizable_b : Tez.t;
  6. staking_delegator_numerator_b : Z.t;
  7. staking_delegate_denominator_b : Z.t;
}

Balance returned by RPCs. Partial tez are rounded down

val balance_zero : balance
val balance_pp : Format.formatter -> balance -> unit
val balance_update_pp : Format.formatter -> (balance * balance) -> unit
val assert_balance_equal : loc:string -> string -> balance -> balance -> (unit, Tezos_base.TzPervasives.tztrace) result Lwt.t
val apply_unslashable_f : Cycle.t -> account_state -> account_state
val balance_and_total_balance_of_account : Tezos_base.TzPervasives.String.Map.key -> account_map -> balance * Tez.t
val assert_balance_check : loc:string -> Tezos_020_PsParisC_test_helpers__Context.t -> Tezos_base.TzPervasives.String.Map.key -> account_state Tezos_base.TzPervasives.String.Map.t -> (unit, Tezos_base.TzPervasives.tztrace) result Lwt.t

AI operations

OCaml

Innovation. Community. Security.