package tezos-protocol-020-PsParisC

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Token : sig ... end
type 'token balance =
  1. | Contract : Contract_repr.t -> Tez_repr.t balance
  2. | Block_fees : Tez_repr.t balance
  3. | Deposits : Frozen_staker_repr.t -> Tez_repr.t balance
  4. | Unstaked_deposits : Unstaked_frozen_staker_repr.t * Cycle_repr.t -> Tez_repr.t balance
  5. | Nonce_revelation_rewards : Tez_repr.t balance
  6. | Attesting_rewards : Tez_repr.t balance
  7. | Baking_rewards : Tez_repr.t balance
  8. | Baking_bonuses : Tez_repr.t balance
  9. | Storage_fees : Tez_repr.t balance
  10. | Double_signing_punishments : Tez_repr.t balance
  11. | Lost_attesting_rewards : Tezos_protocol_environment_020_PsParisC.Signature.Public_key_hash.t * bool * bool -> Tez_repr.t balance
  12. | Liquidity_baking_subsidies : Tez_repr.t balance
  13. | Burned : Tez_repr.t balance
  14. | Commitments : Blinded_public_key_hash.t -> Tez_repr.t balance
  15. | Bootstrap : Tez_repr.t balance
  16. | Invoice : Tez_repr.t balance
  17. | Initial_commitments : Tez_repr.t balance
  18. | Minted : Tez_repr.t balance
  19. | Frozen_bonds : Contract_repr.t * Bond_id_repr.t -> Tez_repr.t balance
  20. | Sc_rollup_refutation_punishments : Tez_repr.t balance
  21. | Sc_rollup_refutation_rewards : Tez_repr.t balance
  22. | Staking_delegator_numerator : {
    1. delegator : Contract_repr.t;
    } -> Staking_pseudotoken_repr.t balance
  23. | Staking_delegate_denominator : {
    1. delegate : Tezos_protocol_environment_020_PsParisC.Signature.public_key_hash;
    } -> Staking_pseudotoken_repr.t balance

Places where tokens can be found in the ledger's state.

val token_of_balance : 'token balance -> 'token Token.t
val compare_balance : 'token1 balance -> 'token2 balance -> int

Compares two balances.

type 'token balance_update =
  1. | Debited of 'token
  2. | Credited of 'token

A credit or debit of token to a balance.

type update_origin =
  1. | Block_application
    (*

    Update from a block application

    *)
  2. | Protocol_migration
    (*

    Update from a protocol migration

    *)
  3. | Subsidy
    (*

    Update from an inflationary subsidy

    *)
  4. | Simulation
    (*

    Simulation of an operation *

    *)
  5. | Delayed_operation of {
    1. operation_hash : Tezos_protocol_environment_020_PsParisC.Operation_hash.t;
    }
    (*

    Delayed application of an operation, whose hash is given. E.g. for operations that take effect only at the end of the cycle.

    *)

An origin of a balance update

val compare_update_origin : update_origin -> update_origin -> int

Compares two origins.

type balance_update_item = private
  1. | Balance_update_item : 'token balance * 'token balance_update * update_origin -> balance_update_item

An item in a list of balance updates. An item of the form (Rewards (b,c), Credited am, ...) indicates that the balance of frozen rewards has been increased by am for baker b and cycle c.

val item : 'token balance -> 'token balance_update -> update_origin -> balance_update_item

Smart constructor for balance_update_item.

type balance_updates = balance_update_item list

A list of balance updates. Duplicates may happen.

The property Json.destruct (Json.construct balance_updates) = balance_updates does not always hold for balance_updates_encoding when balance_updates contains entries of the form (_, _ Tez_repr.zero, _). This is because the balance_update (_ Tez_repr.zero) always decodes into (Credited Tez_repr.zero).

val balance_updates_encoding_with_legacy_attestation_name : balance_updates Tezos_protocol_environment_020_PsParisC.Data_encoding.t

Balance updates encoding that uses legacy attestation name : `endorsing right` and `lost endorsing right` when encoding to JSON

https://gitlab.com/tezos/tezos/-/issues/5529

This encoding is temporary and should be removed when the endorsements kinds in JSON will not be accepted any more by the protocol.

Group updates by (balance x origin), and remove zero-valued balances.

OCaml

Innovation. Community. Security.