Mavryk_raw_protocol_alpha.Receipt_repr
module Token : sig ... end
type 'token balance =
| Contract : Contract_repr.t -> Tez_repr.t balance
| Block_fees : Tez_repr.t balance
| Deposits : Frozen_staker_repr.t -> Tez_repr.t balance
| Unstaked_deposits : Unstaked_frozen_staker_repr.t
* Cycle_repr.t -> Tez_repr.t balance
| Nonce_revelation_rewards : Tez_repr.t balance
| Attesting_rewards : Tez_repr.t balance
| Baking_rewards : Tez_repr.t balance
| Baking_bonuses : Tez_repr.t balance
| Storage_fees : Tez_repr.t balance
| Double_signing_punishments : Tez_repr.t balance
| Lost_attesting_rewards : Mavryk_protocol_environment_alpha.Signature.Public_key_hash.t
* bool
* bool -> Tez_repr.t balance
| Liquidity_baking_subsidies : Tez_repr.t balance
| Burned : Tez_repr.t balance
| Commitments : Blinded_public_key_hash.t -> Tez_repr.t balance
| Bootstrap : Tez_repr.t balance
| Invoice : Tez_repr.t balance
| Initial_commitments : Tez_repr.t balance
| Minted : Tez_repr.t balance
| Frozen_bonds : Contract_repr.t * Bond_id_repr.t -> Tez_repr.t balance
| Sc_rollup_refutation_punishments : Tez_repr.t balance
| Sc_rollup_refutation_rewards : Tez_repr.t balance
| Staking_delegator_numerator : {
delegator : Contract_repr.t;
} -> Staking_pseudotoken_repr.t balance
| Staking_delegate_denominator : {
} -> Staking_pseudotoken_repr.t balance
Places where tokens can be found in the ledger's state.
A credit or debit of token to a balance.
type update_origin =
| Block_application
Update from a block application
*)| Protocol_migration
Update from a protocol migration
*)| Subsidy
Update from an inflationary subsidy
*)| Simulation
Simulation of an operation *
*)| Delayed_operation of {
operation_hash : Mavryk_protocol_environment_alpha.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
| 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.
val balance_updates_encoding :
balance_updates Mavryk_protocol_environment_alpha.Data_encoding.t
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 Mavryk_protocol_environment_alpha.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.
val group_balance_updates :
balance_updates ->
balance_updates Mavryk_protocol_environment_alpha.Error_monad.tzresult
Group updates by (balance x origin), and remove zero-valued balances.