package tezos-protocol-014-PtKathma
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
doc/tezos-protocol-014-PtKathma.raw/Tezos_raw_protocol_014_PtKathma/Contract_delegate_storage/index.html
Module Tezos_raw_protocol_014_PtKathma.Contract_delegate_storage
Source
val find :
Raw_context.t ->
Contract_repr.t ->
Tezos_protocol_environment_014_PtKathma.Signature.Public_key_hash.t option
Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
find ctxt contract
returns the delegate associated to contract
, or None
if contract
has no delegate.
val registered :
Raw_context.t ->
Tezos_protocol_environment_014_PtKathma.Signature.Public_key_hash.t ->
bool Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
registered ctxt delegate
returns true iff delegate is an implicit contract that delegates to itself.
val init :
Raw_context.t ->
Contract_repr.t ->
Tezos_protocol_environment_014_PtKathma.Signature.Public_key_hash.t ->
Raw_context.t Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
init ctxt contract delegate
sets the delegate
associated to contract
.
This function is undefined if contract
is not allocated, or if contract
has already a delegate.
val unlink :
Raw_context.t ->
Contract_repr.t ->
Raw_context.t Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
unlink ctxt contract
removes contract
from the list of contracts that delegated to find ctxt contract
, i.e. the output of delegated_contracts
. This function does not affect the value of the expression find ctxt contract
.
This function is undefined if contract
is not allocated.
val delete :
Raw_context.t ->
Contract_repr.t ->
Raw_context.t Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
delete ctxt contract
behaves as unlink ctxt contract
, but in addition removes the association of the contract
to its current delegate, leaving the former without delegate.
This function is undefined if contract
is not allocated.
val set :
Raw_context.t ->
Contract_repr.t ->
Tezos_protocol_environment_014_PtKathma.Signature.Public_key_hash.t ->
Raw_context.t Tezos_protocol_environment_014_PtKathma.Error_monad.tzresult
Tezos_protocol_environment_014_PtKathma.Lwt.t
set ctxt contract delegate
updates the delegate
associated to contract
.
This function is undefined if contract
is not allocated, or if contract
does not have a delegate.
val delegated_contracts :
Raw_context.t ->
Tezos_protocol_environment_014_PtKathma.Signature.Public_key_hash.t ->
Contract_repr.t list Tezos_protocol_environment_014_PtKathma.Lwt.t
delegated_contracts ctxt delegate
returns the list of contracts (implicit or originated) that delegated to delegate
.