package tezos-protocol-014-PtKathma

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.1.tar.gz
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f

doc/tezos-protocol-014-PtKathma.raw/Tezos_raw_protocol_014_PtKathma/Ticket_operations_diff/index.html

Module Tezos_raw_protocol_014_PtKathma.Ticket_operations_diffSource

A module that provides functionality for extracting ticket-token differences from a list of operations.

Sourcetype ticket_token_diff = private {
  1. ticket_token : Ticket_token.ex_token;
  2. total_amount : Script_int.n Script_int.num;
  3. destinations : (Alpha_context.Destination.t * Script_int.n Script_int.num) list;
}

A type representing ticket-token balance differences. Each value consists of:

  • ticket_token - the type of the ticket.
  • total_amount - the total amount of transferred ticket-tokens.
  • destinations - a list of amount and contract pairs. Invariant: total_amount is the sum of the amounts in destinations.

ticket_diffs_of_operations ctxt ~allow_zero_amount_tickets ops returns a list of ticket-tokens diffs given a context, ctxt, and list of packed operations, ops. The diffs result from either a Transaction operation with parameters containing tickets, or an Origination operation with the initial storage containing tickets.

The flag allow_zero_amount_tickets decides whether or not tickets with amount zero are allowed. If the flag is set to false and a zero-amount ticket is encountered, an Ticket_scanner.Forbidden_zero_ticket_quantity error is returned.

OCaml

Innovation. Community. Security.