package tezos-protocol-014-PtKathma

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

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

type 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.