package tezos-protocol-015-PtLimaPt

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

This module defines Tick.t, an execution step counter for smart-contract rollups.

type t

A tick is a counter for the execution step of a smart-contract rollup.

val initial : t

The initial tick.

val next : t -> t

next tick returns the counter successor of tick.

jump tick k moves tick by k (possibly negative) steps. The move stops at initial when going back in time.

distance t1 t2 is the absolute value of the difference between t1 and t2.

val of_int : int -> t option

of_int x returns Some tick for the rollup x-th execution step if x is non-negative. Returns None otherwise.

val to_int : t -> int option

to_int tick converts the tick into an integer.

val of_number_of_ticks : Sc_rollup_repr.Number_of_ticks.t -> t

of_number_of_ticks converts from the bounded int type defined in the Sc_rollup_repr module. Number_of_ticks is used inside of commitments to limit the maximum possible storage requirement. It is bounded between one and max_int meaning that this can never return a negative number so an option isn't required.

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.