Module Mavryk_001_PtAtLas_test_helpers.Adaptive_issuance_helpers

val join_errors : (unit, 'a list) Stdlib.result -> (unit, 'a list) Stdlib.result -> (unit, 'a list) Stdlib.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 mav

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 : Mavryk_base.TzPervasives.Signature.Public_key_hash.t;
  2. contract : Mavryk_protocol_001_PtAtLas.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:Mavryk_base.TzPervasives.Signature.Public_key_hash.t -> contract:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t -> parameters:staking_parameters -> ?liquid:Tez.mav -> ?bonds:Tez.mav -> ?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 : Partial_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 mav are rounded down

val balance_zero : balance
val balance_pp : Stdlib.Format.formatter -> balance -> unit
val balance_update_pp : Stdlib.Format.formatter -> (balance * balance) -> unit
val assert_balance_equal : loc:string -> string -> balance -> balance -> (unit, Mavryk_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val apply_unslashable_f : Cycle.t -> account_state -> account_state
val balance_and_total_balance_of_account : Mavryk_base.TzPervasives.String.Map.key -> account_map -> balance * Tez.t
val get_balance_from_context : Mavryk_001_PtAtLas_test_helpers__Context.t -> Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t -> (balance * Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t, Mavryk_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val assert_balance_check : loc:string -> Mavryk_001_PtAtLas_test_helpers__Context.t -> Mavryk_base.TzPervasives.String.Map.key -> account_state Mavryk_base.TzPervasives.String.Map.t -> (unit, Mavryk_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val get_launch_cycle : loc:string -> Block.t -> (Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Cycle.t, Mavryk_base.TzPervasives.tztrace) Stdlib.result Lwt.t

AI operations

val portion_of_rewards_to_liquid_for_cycle : ?policy:Block.baker_policy -> Mavryk_001_PtAtLas_test_helpers__Context.t -> Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Cycle.t -> Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key_hash -> Tez.mav -> (Tez.t, Mavryk_base.TzPervasives.tztrace) Stdlib.result Lwt.t