Mavryk_raw_protocol_001_PtAtLas.Delegate_storage
This module groups everything related to delegate registration. For the invariants maintained, see the submodule Contract
.
It also groups "trivial" getters/setters related to delegates.
It is responsible for maintaining the following tables:
type Mavryk_protocol_environment_001_PtAtLas.Error_monad.error +=
| Unregistered_delegate of Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t
module Contract : sig ... end
This module ensures the following invariants:
val registered :
Raw_context.t ->
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
bool Mavryk_protocol_environment_001_PtAtLas.Lwt.t
Has a delegate been registered in the delegate table?
val fold :
Raw_context.t ->
order:[ `Sorted | `Undefined ] ->
init:'a ->
f:
(Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
'a ->
'a Mavryk_protocol_environment_001_PtAtLas.Lwt.t) ->
'a Mavryk_protocol_environment_001_PtAtLas.Lwt.t
Iterate on all registered delegates.
val list :
Raw_context.t ->
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t list
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
List all registered delegates.
val initial_frozen_deposits :
Raw_context.t ->
Mavryk_protocol_environment_001_PtAtLas.Signature.public_key_hash ->
Tez_repr.t Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
Returns a delegate's initial frozen deposits at the beginning of cycle.
val initial_frozen_deposits_of_previous_cycle :
Raw_context.t ->
Mavryk_protocol_environment_001_PtAtLas.Signature.public_key_hash ->
Tez_repr.t Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
Returns a delegate's initial frozen deposits at the beginning of the previous cycle.
Fails with No_previous_cycle
if there is no previous cycle.
val current_frozen_deposits :
Raw_context.t ->
Mavryk_protocol_environment_001_PtAtLas.Signature.public_key_hash ->
Tez_repr.t Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
Returns a delegate's current frozen deposits.
val set_frozen_deposits_limit :
Raw_context.t ->
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
Tez_repr.t option ->
Raw_context.t Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val drain :
Raw_context.t ->
delegate:Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
destination:
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
(Raw_context.t * bool * Tez_repr.t * Receipt_repr.balance_updates)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
module For_RPC : sig ... end
The functions in this module are considered too costly to be used in the protocol. They are meant to be used only to answer RPC calls.