package tezos-protocol-012-Psithaca
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-012-Psithaca.raw/Tezos_raw_protocol_012_Psithaca/Roll_storage_legacy/index.html
Module Tezos_raw_protocol_012_Psithaca.Roll_storage_legacySource
Basic roll manipulation.
The storage related to roll (i.e. `Storage.Roll`) is not used outside of this module. And, this interface enforces the invariant that a roll is always either in the limbo list or owned by a delegate.
type Tezos_protocol_environment_012_Psithaca.Error_monad.error += | Consume_roll_change| No_roll_for_delegate| No_stake_snapshot_for_cycle of Cycle_repr.t| Unregistered_delegate of Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t
val fold :
Raw_context.t ->
f:
(Roll_repr_legacy.roll ->
Tezos_protocol_environment_012_Psithaca.Signature.Public_key.t ->
'a ->
'a Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.t) ->
'a ->
'a Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tfold ctxt f init folds f on the list of all rolls from Roll_repr.first to Storage.Next.Roll of the context ctxt. Only rolls which have owners are considered, rolls without owners are skipped. The first parameter of f is a roll r, the second parameter of f is the owner of r, and the last parameter is the initial value of the accumulator.
val delegate_pubkey :
Raw_context.t ->
Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t ->
Tezos_protocol_environment_012_Psithaca.Signature.Public_key.t
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tdelegate_pubkey ctxt delegate returns the public key of delegate found in context ctxt if there exists a registered contract.
val get_change :
Raw_context.t ->
Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t ->
Tez_repr.t Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tget_change ctxt delegate returns the amount of change held by delegate in context ctxt. The change is the part of the staking balance of a delegate that is not part of a roll, i.e., the amount of staking balance (smaller than the value of a roll) not being taken into account for baking rights computation.
val get_contract_delegate :
Raw_context.t ->
Contract_repr.t ->
Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t option
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.tget_contract_delegate ctxt contract returns the public key hash of the delegate whose contract is contract in context ctxt.