package tezos-protocol-011-PtHangz2

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('ta, 'tb) eq =
  1. | Eq : ('same, 'same) eq
type ex_comparable_ty =
  1. | Ex_comparable_ty : 'a Script_typed_ir.comparable_ty -> ex_comparable_ty
type ex_ty =
  1. | Ex_ty : 'a Script_typed_ir.ty -> ex_ty
type ex_stack_ty =
  1. | Ex_stack_ty : ('a, 's) Script_typed_ir.stack_ty -> ex_stack_ty
type ex_script =
  1. | Ex_script : ('a, 'b) Script_typed_ir.script -> ex_script
type ('arg, 'storage) code = {
  1. code : (('arg, 'storage) Script_typed_ir.pair, (Script_typed_ir.operation Script_typed_ir.boxed_list, 'storage) Script_typed_ir.pair) Script_typed_ir.lambda;
  2. arg_type : 'arg Script_typed_ir.ty;
  3. storage_type : 'storage Script_typed_ir.ty;
  4. views : Script_typed_ir.view Script_typed_ir.SMap.t;
  5. root_name : Script_typed_ir.field_annot option;
  6. code_size : Cache_memory_helpers.sint;
    (*

    This is an over-approximation of the value size in memory, in bytes, of the contract's static part, that is its source code. This includes the code of the contract as well as the code of the views. The storage size is not taken into account by this field as it has a dynamic size.

    *)
}
type ex_code =
  1. | Ex_code : ('a, 'c) code -> ex_code
type 'storage ex_view =
  1. | Ex_view : ('input * 'storage, 'output) Script_typed_ir.lambda -> 'storage ex_view
type ('a, 's, 'b, 'u) cinstr = {
  1. apply : 'r 'f. ('a, 's) Script_typed_ir.kinfo -> ('b, 'u, 'r, 'f) Script_typed_ir.kinstr -> ('a, 's, 'r, 'f) Script_typed_ir.kinstr;
}
type ('a, 's, 'b, 'u) descr = {
  1. loc : Alpha_context.Script.location;
  2. bef : ('a, 's) Script_typed_ir.stack_ty;
  3. aft : ('b, 'u) Script_typed_ir.stack_ty;
  4. instr : ('a, 's, 'b, 'u) cinstr;
}
type tc_context =
  1. | Lambda : tc_context
  2. | Dip : ('a, 's) Script_typed_ir.stack_ty * tc_context -> tc_context
  3. | Toplevel : {
    1. storage_type : 'sto Script_typed_ir.ty;
    2. param_type : 'param Script_typed_ir.ty;
    3. root_name : Script_typed_ir.field_annot option;
    4. legacy_create_contract_literal : bool;
    } -> tc_context
type ('a, 's) judgement =
  1. | Typed : ('a, 's, 'b, 'u) descr -> ('a, 's) judgement
  2. | Failed : {
    1. descr : 'b 'u. ('b, 'u) Script_typed_ir.stack_ty -> ('a, 's, 'b, 'u) descr;
    } -> ('a, 's) judgement
val close_descr : ('a, 'b, 'c, 'd) descr -> ('a, 'b, 'c, 'd) Script_typed_ir.kdescr
type unparsing_mode =
  1. | Optimized
  2. | Readable
  3. | Optimized_legacy
type merge_type_error_flag =
  1. | Default_merge_type_error
  2. | Fast_merge_type_error
module Gas_monad : sig ... end

Create an empty big_map

Update a big map, returning the old value of the given key and the new map.

This does not modify the underlying storage, only the diff table.

parse_ty specialized for the right-hand side part of a big map type, i.e. the `value` in `big_map key value`.

parse_ty allowing big_map values, operations, contract and tickets.

val parse_ty : Alpha_context.context -> legacy:bool -> allow_lazy_storage:bool -> allow_operation:bool -> allow_contract:bool -> allow_ticket:bool -> Alpha_context.Script.node -> (ex_ty * Alpha_context.context) Tezos_protocol_environment_011_PtHangz2.Error_monad.tzresult

We expose parse_ty for convenience to external tools. Please use specialized versions such as parse_packable_ty, parse_parameter_ty, parse_comparable_ty, or parse_big_map_value_ty if possible.

val ty_of_comparable_ty : 'a Script_typed_ir.comparable_ty -> 'a Script_typed_ir.ty

Combines parse_code and parse_storage

type lazy_storage_ids
val no_lazy_storage_id : lazy_storage_ids
val list_of_big_map_ids : lazy_storage_ids -> Alpha_context.Big_map.Id.t list

Produce a lazy storage diff, containing in-memory writes to lazy data structures such as big_maps yet to be committed.

The resulting diff can be committed to the underlying storage (context) using Lazy_storage_diff.apply.

  • parameter to_duplicate

    Lazy data structure reference produced via collect_lazy_storage that can not be reused. Typically collected via traversing the parameters to a smart contract.

  • parameter to_update

    Lazy data structure reference produced via collect_lazy_storage that can be reused. Typically collected via traversing the previous storage of a smart contract.

val script_size : ex_script -> int * Gas_limit_repr.cost

script_size script returns an overapproximation of the size of the in-memory representation of script as well as the cost associated to computing that overapproximation.

OCaml

Innovation. Community. Security.