package tezos-protocol-alpha

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

Defines a Michelson expression representation as a Micheline node with canonical (int) location and Michelson_v1_primitives.prim as content.

Types expr and node both define representation of Michelson expressions and are indeed the same type internally, although this is not visible outside Micheline due to interface abstraction.

type location = int

Locations are used by Micheline mostly for error-reporting and pretty- printing expressions. canonical_location is simply an int.

type annot = string list

Annotations attached to Michelson expressions.

Represents a Michelson expression as canonical Micheline.

type Tezos_protocol_environment_alpha__Environment.Error_monad.error +=
  1. | Lazy_script_decode
type lazy_expr = expr Data_encoding.lazy_t

A record containing either an underlying serialized representation of an expression or a deserialized one, or both. If either is absent, it will be computed on-demand.

Same as expr, but used in different contexts, as required by Micheline's abstract interface.

val location_encoding : location Data_encoding.t
val expr_encoding : expr Data_encoding.t
val lazy_expr_encoding : lazy_expr Data_encoding.t
val lazy_expr : expr -> lazy_expr
type t = {
  1. code : lazy_expr;
  2. storage : lazy_expr;
}

Type t joins the contract's code and storage in a single record.

val encoding : t Data_encoding.t
val deserialization_cost_estimated_from_bytes : int -> Gas_limit_repr.cost
val deserialized_cost : expr -> Gas_limit_repr.cost
val serialized_cost : bytes -> Gas_limit_repr.cost
val bytes_node_cost : bytes -> Gas_limit_repr.cost
val force_decode_cost : lazy_expr -> Gas_limit_repr.cost
val force_decode : lazy_expr -> (expr, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result
val force_bytes_cost : lazy_expr -> Gas_limit_repr.cost
val force_bytes : lazy_expr -> (bytes, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) result
val unit_parameter : lazy_expr
val is_unit_parameter : lazy_expr -> bool
val strip_annotations : node -> node
val strip_locations_cost : node -> Gas_limit_repr.cost