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/Tx_rollup_l2_qty/index.html

Module Tezos_raw_protocol_014_PtKathma.Tx_rollup_l2_qtySource

This module is an abstraction on top of int64 to build positive (or zero) quantities within the int64 bounds. It comes with a compact encoding to be used in the transaction rollup batches.

type t

Type of postive quantities. Quantities are bounded by Int64.max_int.

Sourceval zero : t

The zero quantity.

Sourceval one : t

One quantity.

Sourceval of_int64 : int64 -> t option

Build a quantity from an int64. Returns None if the argument is negative.

Sourceval of_int64_exn : int64 -> t

Build a quantity from an int64 and raise Invalid_argument on negative quantities.

Sourceval to_int64 : t -> int64

Convert a quantity to int64.

Convert a quantity to z.

Sourceval to_string : t -> string

Returns a string representation of a quantity.

Sourceval of_string : string -> t option

Parse a quantity from a string. Returns None if the string is not a valid quantity representation.

Pretty-printer for quantities.

Compact encoding for quantities

Sourceval sub : t -> t -> t option

Substract two quantities. Returns None on subtraction underflow.

Sourceval add : t -> t -> t option

Add two quantities. Returns None on addition overflow.

Sourceval succ : t -> t option

Return the t successor. Returns None on overflow.

Sourceval (-) : t -> t -> t option

Quantities substraction.

Sourceval (+) : t -> t -> t option

Quantities addition.

include Tezos_protocol_environment_014_PtKathma.Compare.S with type t := t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val (>=) : t -> t -> bool
val (>) : t -> t -> bool
val compare : t -> t -> int
val equal : t -> t -> bool
val max : t -> t -> t
val min : t -> t -> t
OCaml

Innovation. Community. Security.