package tezos-protocol-016-PtMumbai
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-016-PtMumbai.raw/Tezos_raw_protocol_016_PtMumbai/Contract_delegate_storage/index.html
Module Tezos_raw_protocol_016_PtMumbai.Contract_delegate_storageSource
This module deals with the delegates of a contract. It is responsible for maintaining the tables Storage.Contract.Delegate and Storage.Contract.Delegated.
type Tezos_protocol_environment_016_PtMumbai.Error_monad.error += | Forbidden_tz4_delegate of Tezos_protocol_environment_016_PtMumbai.Bls.Public_key_hash.t(*Delegates cannot be tz4 accounts (i.e. BLS public key hashes). This error is returned when we try to register such a delegate.
*)
val check_not_tz4 :
Tezos_protocol_environment_016_PtMumbai.Signature.public_key_hash ->
unit Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresultcheck_not_tz4 pkh checks that pkh is not a BLS address.
val find :
Raw_context.t ->
Contract_repr.t ->
Tezos_protocol_environment_016_PtMumbai.Signature.Public_key_hash.t option
Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tfind ctxt contract returns the delegate associated to contract, or None if contract has no delegate.
val init :
Raw_context.t ->
Contract_repr.t ->
Tezos_protocol_environment_016_PtMumbai.Signature.Public_key_hash.t ->
Raw_context.t Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tinit ctxt contract delegate sets the delegate associated to contract.
This function assumes that contract does not have a delegate already.
val unlink :
Raw_context.t ->
Contract_repr.t ->
Raw_context.t Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tunlink 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 assumes that contract is allocated.
val delete :
Raw_context.t ->
Contract_repr.t ->
Raw_context.t Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tdelete 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 assumes that contract is allocated.
val set :
Raw_context.t ->
Contract_repr.t ->
Tezos_protocol_environment_016_PtMumbai.Signature.Public_key_hash.t ->
Raw_context.t Tezos_protocol_environment_016_PtMumbai.Error_monad.tzresult
Tezos_protocol_environment_016_PtMumbai.Lwt.tset ctxt contract delegate updates the delegate associated to contract.
This function assumes that contract is allocated and has a delegate.
val delegated_contracts :
Raw_context.t ->
Tezos_protocol_environment_016_PtMumbai.Signature.Public_key_hash.t ->
Contract_repr.t list Tezos_protocol_environment_016_PtMumbai.Lwt.tdelegated_contracts ctxt delegate returns the list of contracts (implicit or originated) that delegated to delegate.