package tezos-protocol-004-Pt24m4xi
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
    
    
  sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
    
    
  doc/tezos-protocol-004-Pt24m4xi.raw/Tezos_raw_protocol_004_Pt24m4xi/Delegate_storage/index.html
Module Tezos_raw_protocol_004_Pt24m4xi.Delegate_storageSource
type balance = - | Contract of Contract_repr.t
- | Rewards of Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t * Cycle_repr.t
- | Fees of Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t * Cycle_repr.t
- | Deposits of Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t * Cycle_repr.t
Places where tezzies can be found in the ledger's state.
A credit or debit of tezzies to a balance.
A list of balance updates. Duplicates may happen.
val balance_updates_encoding : 
  balance_updates Tezos_protocol_environment_004_Pt24m4xi.Data_encoding.tRemove zero-valued balances from a list of updates.
val is_delegatable : 
  Raw_context.t ->
  Contract_repr.t ->
  bool Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tIs the contract eligible to delegation ?
val init : 
  Raw_context.t ->
  Contract_repr.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t ->
  Raw_context.t Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tAllow to register a delegate when creating an account.
val remove : 
  Raw_context.t ->
  Contract_repr.t ->
  Raw_context.t Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tCleanup delegation when deleting a contract.
val get : 
  Raw_context.t ->
  Contract_repr.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t option
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tReading the current delegate of a contract.
val set : 
  Raw_context.t ->
  Contract_repr.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t option ->
  Raw_context.t Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tUpdating the delegate of a contract.
When calling this function on an "implicit contract" this function fails, unless when the registered delegate is the contract manager. In the that case, the manager is now registered as a delegate. One cannot unregister a delegate for now. The associate contract is now 'undeletable'.
val set_from_script : 
  Raw_context.t ->
  Contract_repr.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t option ->
  Raw_context.t Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tSame as set ignoring the delegatable flag.
type Tezos_protocol_environment_004_Pt24m4xi.Error_monad.error += - | Non_delegatable_contract of Contract_repr.contract
- | No_deletion of Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t
- | Active_delegate
- | Current_delegate
- | Empty_delegate_account of Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t
- | Balance_too_low_for_deposit of {- delegate : Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t;
- deposit : Tez_repr.t;
- balance : Tez_repr.t;
 - }
val fold : 
  Raw_context.t ->
  init:'a ->
  f:
    (Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t ->
      'a ->
      'a Tezos_protocol_environment_004_Pt24m4xi.Lwt.t) ->
  'a Tezos_protocol_environment_004_Pt24m4xi.Lwt.tIterate on all registered delegates.
val list : 
  Raw_context.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t list
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tList all registered delegates.
val freeze_deposit : 
  Raw_context.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t ->
  Tez_repr.t ->
  Raw_context.t Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tVarious functions to 'freeze' tokens. A frozen 'deposit' keeps its associated rolls. When frozen, 'fees' may trigger new rolls allocation. Rewards won't trigger new rolls allocation until unfrozen.
val cycle_end : 
  Raw_context.t ->
  Cycle_repr.t ->
  Nonce_storage.unrevealed list ->
  (Raw_context.t
   * balance_updates
   * Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t list)
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tTrigger the context maintenance at the end of cycle 'n', i.e.: unfreeze deposit/fees/rewards from 'n - preserved_cycle' ; punish the provided unrevealed seeds (tipically seed from cycle 'n - 1'). Returns a list of account with the amount that was unfrozen for each and the list of deactivated delegates.
val punish : 
  Raw_context.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t ->
  Cycle_repr.t ->
  (Raw_context.t * frozen_balance)
    Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tBurn all then frozen deposit/fees/rewards for a delegate at a given cycle. Returns the burned amounts.
val has_frozen_balance : 
  Raw_context.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t ->
  Cycle_repr.t ->
  bool Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tHas the given key some frozen tokens in its implicit contract?
val frozen_balance : 
  Raw_context.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t ->
  Tez_repr.t Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tReturns the amount of frozen deposit, fees and rewards associated to a given delegate.
val frozen_balance_encoding : 
  frozen_balance Tezos_protocol_environment_004_Pt24m4xi.Data_encoding.tval frozen_balance_by_cycle_encoding : 
  frozen_balance Cycle_repr.Map.t
    Tezos_protocol_environment_004_Pt24m4xi.Data_encoding.tval frozen_balance_by_cycle : 
  Raw_context.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t ->
  frozen_balance Cycle_repr.Map.t Tezos_protocol_environment_004_Pt24m4xi.Lwt.tReturns the amount of frozen deposit, fees and rewards associated to a given delegate, indexed by the cycle by which at the end the balance will be unfrozen.
val full_balance : 
  Raw_context.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t ->
  Tez_repr.t Tezos_protocol_environment_004_Pt24m4xi.Error_monad.tzresult
    Tezos_protocol_environment_004_Pt24m4xi.Lwt.tReturns the full 'balance' of the implicit contract associated to a given key, i.e. the sum of the spendable balance and of the frozen balance.
val delegated_contracts : 
  Raw_context.t ->
  Tezos_protocol_environment_004_Pt24m4xi.Signature.Public_key_hash.t ->
  Contract_hash.t list Tezos_protocol_environment_004_Pt24m4xi.Lwt.tReturns the list of contract that delegated towards a given delegate