package tezos-protocol-013-PtJakart

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.0.tar.gz
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b

doc/tezos-protocol-013-PtJakart.raw/Tezos_raw_protocol_013_PtJakart/Stake_storage/index.html

Module Tezos_raw_protocol_013_PtJakart.Stake_storageSource

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

fold ctxt ~f ~order init folds f on the list of active delegates with at least one roll. The folding process starts with init. Each element of the list is a pair pkh, stake, where pkh is the public key hash of the delegate and stake is the staking balance of the delegate.

fold_snapshot ctxt ~index ~f ~init folds f on the list of active delegates with at least one roll for the given snapshot index. The folding process starts with init. Each element of the list is a pair pkh, stake, where pkh is the public key hash of the delegate and stake is the staking balance of the delegate for the given snapshot index.

max_snapshot_index ctxt returns the index of the last snapshot taken of staking balances and active delegates.

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

Sourceval fold_on_active_delegates_with_rolls : Raw_context.t -> order:[ `Sorted | `Undefined ] -> init:'a -> f: (Tezos_protocol_environment_013_PtJakart.Signature.Public_key_hash.t -> unit -> 'a -> 'a Tezos_protocol_environment_013_PtJakart.Lwt.t) -> 'a Tezos_protocol_environment_013_PtJakart.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_stake ctxt contract amount calls Stake_storage.add_stake ctxt delegate amount if contract has a delegate. Otherwise this function does nothing.

remove_contract_stake ctxt contract amount calls Stake_storage.remove_stake ctxt delegate amount if contract has a delegate. Otherwise this function does nothing.

OCaml

Innovation. Community. Security.