Module Mavryk_alpha_test_helpers.State

type t = {
  1. account_map : State_account.account_map;
  2. total_supply : Mavryk_alpha_test_helpers.State_account.Tez.t;
  3. constants : Mavryk_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t;
  4. param_requests : (string * Adaptive_issuance_helpers.staking_parameters * int) list;
  5. force_ai_vote_yes : bool;
  6. baking_policy : Block.baker_policy option;
  7. last_level_rewards : Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.t;
  8. snapshot_balances : (string * State_account.balance) list Mavryk_base.TzPervasives.String.Map.t;
  9. saved_rate : Q.t option;
  10. burn_rewards : bool;
  11. pending_operations : Mavryk_protocol_alpha.Protocol.Alpha_context.packed_operation list;
  12. pending_slashes : (Mavryk_base.TzPervasives.Signature.Public_key_hash.t * Mavryk_protocol_alpha.Protocol.Denunciations_repr.item) list;
  13. double_signings : double_signing_state list;
  14. ai_activation_cycle : Mavryk_protocol_alpha.Protocol.Alpha_context.Cycle.t option;
  15. force_attest_all : bool;
}

Type of the state

val param_wait : t -> int

Expected number of cycles before staking parameters get applied

val unstake_wait : t -> int

Expected number of cycles before staking unstaked funds get unfrozen

val find_account : string -> t -> State_account.account_state

From a name, returns the corresponding account

val is_self_delegate : string -> t -> bool

Returns true iff account is a delegate

val apply_finalize : Mavryk_base.TzPervasives.String.Map.key -> t -> t
val apply_unslashable_for_all : Mavryk_alpha_test_helpers.State_account.Cycle.cycle -> t -> t
val apply_rewards : baker:string -> Block.t -> t -> t Mavryk_base.TzPervasives.tzresult Lwt.t
val update_account : string -> State_account.account_state -> t -> t

Given an account name and new account state, updates state accordingly Preferably use other specific update functions

val update_delegate : string -> string option -> t -> t
val add_pending_operations : Mavryk_protocol_alpha.Protocol.Alpha_context.packed_operation list -> t -> t