package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Simple abstraction from low-level storage to handle unstaked frozen deposits.

This module is responsible for maintaining the Storage.Contract.Unstaked_frozen_deposits table.

balance ctxt delegate cycle returns the amount of unstaked frozen deposits for delegate at cycle. If cycle is an unslashable cycle, the returned amount is the squashed amount of all the unslashable cycles.

credit_only_call_from_token ctxt staker cycle amount credits the unstaked frozen deposits for staker at cycle by amount. If cycle is an unslashable cycle, the credited cycle is the last unslashable cycle.

spend_only_call_from_token ctxt staker cycle amount spends amount from the unstaked frozen deposits for staker at cycle. If cycle is an unslashable cycle, the amount is spent from the last unslashable cycle. The function returns the error Subtraction_underflow if the balance is too low.

decrease_initial_amount_only_for_stake_from_unstake ctxt staker cycle amount decreases amount from the unstaked frozen deposits for staker at cycle. It is only called if the cycle hasn't been slashed, so the amount removed is the same as the amount spent in current_amount.

OCaml

Innovation. Community. Security.