package tezos-protocol-alpha

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Delegate_storage/Contract/index.html

Module Delegate_storage.ContractSource

This module ensures the following invariants:

  • registered delegates (i.e. those that appear in Storage.Delegates) are self-delegated, that is a delegate's implicit account delegates to itself (i.e. Contract_delegate_storage.find delegate returns delegate),
  • registered delegates have their public keys revealed,
  • registered delegates cannot change their delegation,
  • stake is properly moved when changing delegation.

init ctxt contract delegate registers a delegate when creating a contract.

This functions assumes that contract is allocated.

This function returns the Unregistered_delegate error if contract already has a delegate or if delegate is not a registered delegate.

set ctxt contract delegate_opt allows to set the delegate of a contract to delegate when delegate_opt = Some delegate or to unset the delegate when delegate_opt = None. When delegate_opt = Some contract (aka self-delegation), the function also registers the contract as a delegate and sets the delegate as active.

It returns the Unregistered_delegate error when self-delegating and when the public key is not yet revealed. It returns the Empty_delegate_account error when self-delegating and the implicit account is not allocated. It returns the Active_delegate error when self-delegating and the delegate is already active. It returns the Unregistered_delegate error when trying to set the delegate to an unregistered delegate. It returns the Current_delegate error when contract is already delegated to the same delegate. It returns the No_deletion error when trying to unset or change the delegate of a registered delegate.

OCaml

Innovation. Community. Security.