package tezos-protocol-015-PtLimaPt

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Tx_rollup_l2_qty/index.html

Module Tezos_raw_protocol_015_PtLimaPt.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_015_PtLimaPt.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.