Mavryk_alpha_test_helpers.State
type double_signing_state = {
culprit : Mavryk_base.TzPervasives.Signature.Public_key_hash.t;
evidence : Context.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.packed_operation;
denounced : bool;
misbehaviour : Mavryk_protocol_alpha.Protocol.Misbehaviour_repr.t;
}
type t = {
account_map : State_account.account_map;
total_supply : Mavryk_alpha_test_helpers.State_account.Tez.t;
constants : Mavryk_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t;
param_requests : (string * Adaptive_issuance_helpers.staking_parameters * int)
list;
force_ai_vote_yes : bool;
baking_policy : Block.baker_policy option;
last_level_rewards : Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.t;
snapshot_balances : (string * State_account.balance) list
Mavryk_base.TzPervasives.String.Map.t;
saved_rate : Q.t option;
burn_rewards : bool;
pending_operations : Mavryk_protocol_alpha.Protocol.Alpha_context.packed_operation
list;
pending_slashes : (Mavryk_base.TzPervasives.Signature.Public_key_hash.t
* Mavryk_protocol_alpha.Protocol.Denunciations_repr.item)
list;
double_signings : double_signing_state list;
ai_activation_cycle : Mavryk_protocol_alpha.Protocol.Alpha_context.Cycle.t
option;
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 find_account_from_pkh :
Mavryk_base.TzPervasives.Signature.public_key_hash ->
t ->
string * State_account.account_state
val liquid_delegated :
name:Mavryk_base.TzPervasives.String.t ->
t ->
(Mavryk_alpha_test_helpers.State_account.Tez.t,
Mavryk_base.TzPervasives.tztrace)
Stdlib.result
val is_self_delegate : string -> t -> bool
Returns true iff account is a delegate
val update_map :
?log_updates:Mavryk_base.TzPervasives.String.t list ->
f:(State_account.account_map -> State_account.account_map) ->
t ->
t
val update_map_es :
?log_updates:Mavryk_base.TzPervasives.String.t list ->
f:
(State_account.account_map ->
State_account.account_map Mavryk_base.TzPervasives.tzresult Lwt.t) ->
t ->
t Mavryk_base.TzPervasives.tzresult Lwt.t
val apply_burn :
Mavryk_alpha_test_helpers.State_account.Tez.t ->
Mavryk_base.TzPervasives.String.Map.key ->
t ->
t
val apply_transfer :
Mavryk_protocol_alpha.Protocol.Alpha_context.Tez.t ->
Mavryk_base.TzPervasives.String.Map.key ->
Mavryk_base.TzPervasives.String.Map.key ->
t ->
t
val apply_unstake :
Mavryk_protocol_alpha.Protocol.Alpha_context.Cycle.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Tez.t ->
Mavryk_base.TzPervasives.String.Map.key ->
t ->
t
val apply_finalize : Mavryk_base.TzPervasives.String.Map.key -> t -> t
val apply_unslashable :
Mavryk_alpha_test_helpers.State_account.Cycle.cycle ->
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 add_pending_operations :
Mavryk_protocol_alpha.Protocol.Alpha_context.packed_operation list ->
t ->
t
val pop_pending_operations :
t ->
t * Mavryk_protocol_alpha.Protocol.Alpha_context.packed_operation list