package tezos-protocol-alpha
type ('arg, 'storage) code = {
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;
arg_type : 'arg Script_typed_ir.ty;
storage_type : 'storage Script_typed_ir.ty;
root_name : Script_typed_ir.field_annot option;
}
type tc_context =
| Lambda : tc_context
| Dip : 'a Script_typed_ir.stack_ty * tc_context -> tc_context
| Toplevel : {
storage_type : 'sto Script_typed_ir.ty;
param_type : 'param Script_typed_ir.ty;
root_name : Script_typed_ir.field_annot option;
legacy_create_contract_literal : bool;
} -> tc_context
type 'bef judgement =
| Typed : ('bef, 'aft) Script_typed_ir.descr -> 'bef judgement
| Failed : {
descr : 'aft. 'aft Script_typed_ir.stack_ty -> ('bef, 'aft) Script_typed_ir.descr;
} -> 'bef judgement
type type_logger =
int ->
(Alpha_context.Script.expr * Alpha_context.Script.annot) list ->
(Alpha_context.Script.expr * Alpha_context.Script.annot) list ->
unit
val list_empty : 'a Script_typed_ir.boxed_list
val list_cons :
'a ->
'a Script_typed_ir.boxed_list ->
'a Script_typed_ir.boxed_list
val empty_set : 'a Script_typed_ir.comparable_ty -> 'a Script_typed_ir.set
val set_fold :
('elt -> 'acc -> 'acc) ->
'elt Script_typed_ir.set ->
'acc ->
'acc
val set_update : 'a -> bool -> 'a Script_typed_ir.set -> 'a Script_typed_ir.set
val set_mem : 'elt -> 'elt Script_typed_ir.set -> bool
val set_size :
'elt Script_typed_ir.set ->
Alpha_context.Script_int.n Alpha_context.Script_int.num
val empty_map :
'a Script_typed_ir.comparable_ty ->
('a, 'b) Script_typed_ir.map
val map_fold :
('key -> 'value -> 'acc -> 'acc) ->
('key, 'value) Script_typed_ir.map ->
'acc ->
'acc
val map_update :
'a ->
'b option ->
('a, 'b) Script_typed_ir.map ->
('a, 'b) Script_typed_ir.map
val map_mem : 'key -> ('key, 'value) Script_typed_ir.map -> bool
val map_get : 'key -> ('key, 'value) Script_typed_ir.map -> 'value option
val map_key_ty :
('a, 'b) Script_typed_ir.map ->
'a Script_typed_ir.comparable_ty
val map_size :
('a, 'b) Script_typed_ir.map ->
Alpha_context.Script_int.n Alpha_context.Script_int.num
val empty_big_map :
'a Script_typed_ir.comparable_ty ->
'b Script_typed_ir.ty ->
('a, 'b) Script_typed_ir.big_map
val big_map_mem :
Alpha_context.context ->
'key ->
('key, 'value) Script_typed_ir.big_map ->
(bool * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val big_map_get :
Alpha_context.context ->
'key ->
('key, 'value) Script_typed_ir.big_map ->
('value option * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val big_map_update :
Alpha_context.context ->
'key ->
'value option ->
('key, 'value) Script_typed_ir.big_map ->
(('key, 'value) Script_typed_ir.big_map * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val big_map_get_and_update :
Alpha_context.context ->
'key ->
'value option ->
('key, 'value) Script_typed_ir.big_map ->
('value option
* ('key, 'value) Script_typed_ir.big_map
* Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val ty_eq :
Alpha_context.context ->
Alpha_context.Script.location ->
'ta Script_typed_ir.ty ->
'tb Script_typed_ir.ty ->
(('ta Script_typed_ir.ty, 'tb Script_typed_ir.ty) eq * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
val compare_address : Script_typed_ir.address -> Script_typed_ir.address -> int
val compare_comparable : 'a Script_typed_ir.comparable_ty -> 'a -> 'a -> int
val parse_comparable_data :
?type_logger:type_logger ->
Alpha_context.context ->
'a Script_typed_ir.comparable_ty ->
Alpha_context.Script.node ->
('a * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val parse_data :
?type_logger:type_logger ->
Alpha_context.context ->
legacy:bool ->
allow_forged:bool ->
'a Script_typed_ir.ty ->
Alpha_context.Script.node ->
('a * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val unparse_data :
Alpha_context.context ->
unparsing_mode ->
'a Script_typed_ir.ty ->
'a ->
(Alpha_context.Script.node * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val unparse_code :
Alpha_context.context ->
unparsing_mode ->
Alpha_context.Script.node ->
(Alpha_context.Script.node * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val parse_instr :
?type_logger:type_logger ->
tc_context ->
Alpha_context.context ->
legacy:bool ->
Alpha_context.Script.node ->
'bef Script_typed_ir.stack_ty ->
('bef judgement * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val parse_big_map_value_ty :
Alpha_context.context ->
legacy:bool ->
Alpha_context.Script.node ->
(ex_ty * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
parse_ty
specialized for the right-hand side part of a big map type, i.e. the `value` in `big_map key value`.
val parse_packable_ty :
Alpha_context.context ->
legacy:bool ->
Alpha_context.Script.node ->
(ex_ty * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
val parse_parameter_ty :
Alpha_context.context ->
legacy:bool ->
Alpha_context.Script.node ->
(ex_ty * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
val parse_comparable_ty :
Alpha_context.context ->
Alpha_context.Script.node ->
(ex_comparable_ty * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
val parse_any_ty :
Alpha_context.context ->
legacy:bool ->
Alpha_context.Script.node ->
(ex_ty * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
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_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
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 unparse_ty :
Alpha_context.context ->
'a Script_typed_ir.ty ->
(Alpha_context.Script.node * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
val parse_toplevel :
legacy:bool ->
Alpha_context.Script.expr ->
(Alpha_context.Script.node
* Alpha_context.Script.node
* Alpha_context.Script.node
* Script_typed_ir.field_annot option,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
val add_field_annot :
Script_typed_ir.field_annot option ->
Script_typed_ir.var_annot option ->
Alpha_context.Script.node ->
Alpha_context.Script.node
val typecheck_code :
legacy:bool ->
Alpha_context.context ->
Alpha_context.Script.expr ->
(Script_tc_errors.type_map * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val serialize_ty_for_error :
Alpha_context.context ->
'a Script_typed_ir.ty ->
(Alpha_context.Script.expr * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
val parse_code :
?type_logger:type_logger ->
Alpha_context.context ->
legacy:bool ->
code:Alpha_context.Script.lazy_expr ->
(ex_code * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val parse_storage :
?type_logger:type_logger ->
Alpha_context.context ->
legacy:bool ->
allow_forged:bool ->
'storage Script_typed_ir.ty ->
storage:Alpha_context.Script.lazy_expr ->
('storage * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val parse_script :
?type_logger:type_logger ->
Alpha_context.context ->
legacy:bool ->
allow_forged_in_storage:bool ->
Alpha_context.Script.t ->
(ex_script * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
Combines parse_code
and parse_storage
val unparse_script :
Alpha_context.context ->
unparsing_mode ->
('a, 'b) Script_typed_ir.script ->
(Alpha_context.Script.t * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val parse_contract :
legacy:bool ->
Alpha_context.context ->
Alpha_context.Script.location ->
'a Script_typed_ir.ty ->
Alpha_context.Contract.t ->
entrypoint:string ->
(Alpha_context.context * 'a Script_typed_ir.typed_contract,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val parse_contract_for_script :
Alpha_context.context ->
Alpha_context.Script.location ->
'a Script_typed_ir.ty ->
Alpha_context.Contract.t ->
entrypoint:string ->
(Alpha_context.context * 'a Script_typed_ir.typed_contract option,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val find_entrypoint :
't Script_typed_ir.ty ->
root_name:Script_typed_ir.field_annot option ->
string ->
((Alpha_context.Script.node -> Alpha_context.Script.node) * ex_ty,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
module Entrypoints_map : sig ... end
val list_entrypoints :
't Script_typed_ir.ty ->
Alpha_context.context ->
root_name:Script_typed_ir.field_annot option ->
(Michelson_v1_primitives.prim list list
* (Michelson_v1_primitives.prim list * Alpha_context.Script.node)
Entrypoints_map.t,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
val pack_data :
Alpha_context.context ->
'a Script_typed_ir.ty ->
'a ->
(bytes * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val hash_comparable_data :
Alpha_context.context ->
'a Script_typed_ir.comparable_ty ->
'a ->
(Script_expr_hash.t * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val hash_data :
Alpha_context.context ->
'a Script_typed_ir.ty ->
'a ->
(Script_expr_hash.t * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val no_lazy_storage_id : lazy_storage_ids
val collect_lazy_storage :
Alpha_context.context ->
'a Script_typed_ir.ty ->
'a ->
(lazy_storage_ids * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
val list_of_big_map_ids : lazy_storage_ids -> Alpha_context.Big_map.Id.t list
val extract_lazy_storage_diff :
Alpha_context.context ->
unparsing_mode ->
temporary:bool ->
to_duplicate:lazy_storage_ids ->
to_update:lazy_storage_ids ->
'a Script_typed_ir.ty ->
'a ->
('a * Alpha_context.Lazy_storage.diffs option * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
Lwt.t
val get_single_sapling_state :
Alpha_context.context ->
'a Script_typed_ir.ty ->
'a ->
(Alpha_context.Sapling.Id.t * Alpha_context.context,
Tezos_protocol_environment_alpha__Environment.Error_monad.error
Tezos_protocol_environment_alpha__Environment.Error_monad.trace)
Stdlib.result
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>