package tezos-protocol-020-PsParisC

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This module provides basic operations (accessors and setters) on staking tokens.

It is responsible for maintaining the following tables:

fold ctxt ~f ~order init folds f on the list of active delegates having the minimal required stake. The folding process starts with init. Each element of the list is the public key hash of a delegate.

set_selected_distribution_for_cycle ctxt cycle distrib total_stake saves the selected distribution distrib of the total_stake for the given cycle.

val fold_on_active_delegates_with_minimal_stake_s : Raw_context.t -> order:[ `Sorted | `Undefined ] -> init:'a -> f: (Tezos_protocol_environment_020_PsParisC.Signature.Public_key_hash.t -> 'a -> 'a Tezos_protocol_environment_020_PsParisC.Lwt.t) -> 'a Tezos_protocol_environment_020_PsParisC.Lwt.t

Copy the stake distribution for the current cycle (from Storage.Stake.Selected_distribution_for_cycle) in the raw context.

get_total_active_stake ctxt cycle retrieves the amount in Tez of the active stake at cycle from ctxt.

add_contract_delegated_stake ctxt contract amount calls Stake_storage.add_delegated_stake ctxt delegate amount if contract has a delegate. Otherwise this function does nothing.

remove_contract_delegated_stake ctxt contract amount calls Stake_storage.remove_delegated_stake ctxt delegate amount if contract has a delegate. Otherwise this function does nothing.

val cleanup_values_for_protocol_p : Raw_context.t -> preserved_cycles:int -> consensus_rights_delay:int -> new_cycle:Cycle_repr.t -> Raw_context.t Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult Tezos_protocol_environment_020_PsParisC.Lwt.t
module For_RPC : sig ... end
module Internal_for_tests : sig ... end
OCaml

Innovation. Community. Security.