package octez-protocol-alpha-libs
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Octez protocol alpha libraries
Install
dune-project
Dependency
Authors
Maintainers
Sources
octez-19.1.tar.gz
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
doc/octez-protocol-alpha-libs.test-helpers/Tezos_alpha_test_helpers/Adaptive_issuance_helpers/index.html
Module Tezos_alpha_test_helpers.Adaptive_issuance_helpersSource
Representation of Tez with non integer values
Frozen_tez represents frozen stake and frozen unstaked funds. Properties:
Representation of Unstaked frozen deposits
Representation of unstaked finalizable tez
Abstraction of the staking parameters for tests
Source
type account_state = {pkh : Tezos_base.TzPervasives.Signature.Public_key_hash.t;contract : Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t;delegate : string option;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;
}Abstract information of accounts
Source
val init_account :
?delegate:string ->
pkh:Tezos_base.TzPervasives.Signature.Public_key_hash.t ->
contract:Tezos_protocol_alpha.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_stateSource
type balance = {liquid_b : Tez.t;bonds_b : Tez.t;staked_b : Partial_tez.t;unstaked_frozen_b : Tez.t;unstaked_finalizable_b : Tez.t;staking_delegator_numerator_b : Z.t;staking_delegate_denominator_b : Z.t;
}Balance returned by RPCs. Partial tez are rounded down
Source
val assert_balance_equal :
loc:string ->
string ->
balance ->
balance ->
(unit, Tezos_base.TzPervasives.tztrace) result Lwt.tSource
val update_account :
f:('a -> 'a) ->
Tezos_base.TzPervasives.String.Map.key ->
'a Tezos_base.TzPervasives.String.Map.t ->
'a Tezos_base.TzPervasives.String.Map.tSource
val add_liquid_rewards :
Tez.t ->
Tezos_base.TzPervasives.String.Map.key ->
account_state Tezos_base.TzPervasives.String.Map.t ->
account_state Tezos_base.TzPervasives.String.Map.tSource
val add_frozen_rewards :
Tez.t ->
Tezos_base.TzPervasives.String.Map.key ->
account_state Tezos_base.TzPervasives.String.Map.t ->
account_state Tezos_base.TzPervasives.String.Map.tSource
val stake_from_unstake :
Tez.t ->
Cycle.cycle ->
int ->
Tezos_base.TzPervasives.String.Map.key ->
account_state Tezos_base.TzPervasives.String.Map.t ->
account_state Tezos_base.TzPervasives.String.Map.t * Tez.tSource
val apply_stake :
Tez.t ->
Cycle.cycle ->
int ->
Tezos_base.TzPervasives.String.Map.key ->
account_state Tezos_base.TzPervasives.String.Map.t ->
account_state Tezos_base.TzPervasives.String.Map.tSource
val apply_unstake :
Cycle.t ->
Tez.t ->
Tezos_base.TzPervasives.String.Map.key ->
account_state Tezos_base.TzPervasives.String.Map.t ->
account_state Tezos_base.TzPervasives.String.Map.tSource
val apply_unslashable :
Cycle.t ->
Tezos_base.TzPervasives.String.Map.key ->
account_state Tezos_base.TzPervasives.String.Map.t ->
account_state Tezos_base.TzPervasives.String.Map.tSource
val apply_unslashable_for_all :
Cycle.t ->
account_state Tezos_base.TzPervasives.String.Map.t ->
account_state Tezos_base.TzPervasives.String.Map.tSource
val balance_and_total_balance_of_account :
Tezos_base.TzPervasives.String.Map.key ->
account_map ->
balance * Tez.tSource
val apply_slashing :
(Tezos_base.TzPervasives.Signature.Public_key_hash.t
* Tezos_protocol_alpha.Protocol.Denunciations_repr.item) ->
Cycle.cycle ->
Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t ->
account_state Tezos_base.TzPervasives.String.Map.t ->
account_state Tezos_base.TzPervasives.String.Map.t * Tez.tSource
val update_frozen_rights_cycle :
CycleMap.key ->
account_state Tezos_base.TzPervasives.String.Map.t ->
account_state Tezos_base.TzPervasives.String.Map.tSource
val get_balance_from_context :
Tezos_alpha_test_helpers__Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
(balance * Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t,
Tezos_base.TzPervasives.tztrace)
result
Lwt.tSource
val assert_balance_check :
loc:string ->
Tezos_alpha_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.tSource
val get_launch_cycle :
loc:string ->
Block.t ->
(Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.t,
Tezos_base.TzPervasives.tztrace)
result
Lwt.tAI operations
Source
val stake :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tSource
val set_delegate_parameters :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
parameters:staking_parameters ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tSource
val unstake :
Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tSource
val finalize_unstake :
Context.t ->
?amount:Tez.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed
Tezos_base.TzPervasives.tzresult
Lwt.tSource
val portion_of_rewards_to_liquid_for_cycle :
?policy:Block.baker_policy ->
Tezos_alpha_test_helpers__Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
Tez.t ->
(Tez.t, Tezos_base.TzPervasives.tztrace) result Lwt.t sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>