package tezos-protocol-013-PtJakart

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

The ledger of the layer 2 where are registered the amount of a given ticket a L2 account has in its possession.

get ctxt tidx aidx returns the quantity of tickets (tidx) aidx owns.

Note: It is the responsibility of the caller to verify that aidx and tidx have been associated to an address and a ticket respectively. The function will return zero when the address has no such ticket.

credit ctxt tidx aidx qty updates the ledger to increase the number of tickets indexed by tidx the address aidx owns by qty units.

This function can fail with Balance_overflow if adding qty to the current balance of aidx causes an integer overflow.

This function can fail with Invalid_quantity if qty is not strictly positive.

Note: It is the responsibility of the caller to verify that aidx and tidx have been associated to an address and a ticket respectively.

spend ctxt tidx aidx qty updates the ledger to decrease the number of tickets indexed by tidx the address aidx owns by qty units.

This function can fail with Balance_too_low if aidx does not own at least qty ticket.

Note: It is the responsibility of the caller to verify that aidx and tidx have been associated to an address and a ticket respectively.

module Internal_for_tests : sig ... end