Tezos_raw_protocol_alpha.Script_typed_ir
type step_constants = {
sender : Alpha_context.Destination.t;
The address calling this contract, as returned by SENDER.
*)payer : Tezos_protocol_environment_alpha.Signature.public_key_hash;
The address of the implicit account that initiated the chain of contract calls, as returned by SOURCE.
*)self : Contract_hash.t;
The address of the contract being executed, as returned by SELF and SELF_ADDRESS. Also used:
amount : Alpha_context.Tez.t;
The amount of the current transaction, as returned by AMOUNT.
*)balance : Alpha_context.Tez.t;
The balance of the contract as returned by BALANCE.
*)chain_id : Tezos_protocol_environment_alpha.Chain_id.t;
The chain id of the chain, as returned by CHAIN_ID.
*)now : Script_timestamp.t;
The earliest time at which the current block could have been timestamped, as returned by NOW.
*)level : Script_int.n Script_int.num;
The level of the current block, as returned by LEVEL.
*)}
module Script_signature : sig ... end
type signature = Script_signature.t
module Script_chain_id : sig ... end
module Script_bls : sig ... end
module Script_timelock : sig ... end
type ticket_amount = Ticket_amount.t
type end_of_stack = empty_cell * empty_cell
module Type_size : sig ... end
module type Boxed_set_OPS = sig ... end
module type Boxed_set = sig ... end
set
is made algebraic in order to distinguish it from the other type parameters of ty
.
module type Boxed_map_OPS = sig ... end
module type Boxed_map = sig ... end
map
is made algebraic in order to distinguish it from the other type parameters of ty
.
module Big_map_overlay :
Tezos_protocol_environment_alpha.Map.S with type key = Script_expr_hash.t
type view = {
input_ty : Alpha_context.Script.node;
output_ty : Alpha_context.Script.node;
view_code : Alpha_context.Script.node;
}
type view_map = (Script_string.t, view) map
type entrypoint_info = {
name : Alpha_context.Entrypoint.t;
original_type_expr : Alpha_context.Script.node;
}
'arg entrypoints
represents the tree of entrypoints of a parameter type 'arg
. at_node
are entrypoint details at that node if it is not None
. nested
are the entrypoints below the node in the tree. It is always Entrypoints_None
for non-or nodes. But it is also ok to have Entrypoints_None
for an or node, it just means that there are no entrypoints below that node in the tree.
and 'arg nested_entrypoints =
| Entrypoints_Or : {
left : 'l entrypoints_node;
right : 'r entrypoints_node;
} -> ('l, 'r) or_ nested_entrypoints
| Entrypoints_None : _ nested_entrypoints
val no_entrypoints : _ entrypoints_node
no_entrypoints
is {at_node = None; nested = Entrypoints_None}
type 'arg entrypoints = {
root : 'arg entrypoints_node;
original_type_expr : Alpha_context.Script.node;
}
and ('before_top, 'before, 'result_top, 'result) kinstr =
| IDrop : Alpha_context.Script.location
* ('b, 'S, 'r, 'F) kinstr -> ('a, 'b * 'S, 'r, 'F) kinstr
| IDup : Alpha_context.Script.location
* ('a, 'a * ('b * 'S), 'r, 'F) kinstr -> ('a, 'b * 'S, 'r, 'F) kinstr
| ISwap : Alpha_context.Script.location
* ('b, 'a * ('c * 'S), 'r, 'F) kinstr -> ('a, 'b * ('c * 'S), 'r, 'F) kinstr
| IPush : Alpha_context.Script.location
* ('ty, _) ty
* 'ty
* ('ty, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IUnit : Alpha_context.Script.location
* (unit, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| ICons_pair : Alpha_context.Script.location
* (('a, 'b) pair, 'c * 'S, 'r, 'F) kinstr -> ('a, 'b * ('c * 'S), 'r, 'F)
kinstr
| ICar : Alpha_context.Script.location
* ('a, 'S, 'r, 'F) kinstr -> (('a, 'b) pair, 'S, 'r, 'F) kinstr
| ICdr : Alpha_context.Script.location
* ('b, 'S, 'r, 'F) kinstr -> (('a, 'b) pair, 'S, 'r, 'F) kinstr
| IUnpair : Alpha_context.Script.location
* ('a, 'b * 'S, 'r, 'F) kinstr -> (('a, 'b) pair, 'S, 'r, 'F) kinstr
| ICons_some : Alpha_context.Script.location
* ('v option, 'a * 'S, 'r, 'F) kinstr -> ('v, 'a * 'S, 'r, 'F) kinstr
| ICons_none : Alpha_context.Script.location
* ('b, _) ty
* ('b option, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IIf_none : {
loc : Alpha_context.Script.location;
branch_if_none : ('b, 'S, 'c, 'T) kinstr;
branch_if_some : ('a, 'b * 'S, 'c, 'T) kinstr;
k : ('c, 'T, 'r, 'F) kinstr;
} -> ('a option, 'b * 'S, 'r, 'F) kinstr
| IOpt_map : {
loc : Alpha_context.Script.location;
body : ('a, 'S, 'b, 'S) kinstr;
k : ('b option, 'S, 'c, 'F) kinstr;
} -> ('a option, 'S, 'c, 'F) kinstr
| ICons_left : Alpha_context.Script.location
* ('b, _) ty
* (('a, 'b) or_, 'c * 'S, 'r, 'F) kinstr -> ('a, 'c * 'S, 'r, 'F) kinstr
| ICons_right : Alpha_context.Script.location
* ('a, _) ty
* (('a, 'b) or_, 'c * 'S, 'r, 'F) kinstr -> ('b, 'c * 'S, 'r, 'F) kinstr
| IIf_left : {
loc : Alpha_context.Script.location;
branch_if_left : ('a, 'S, 'c, 'T) kinstr;
branch_if_right : ('b, 'S, 'c, 'T) kinstr;
k : ('c, 'T, 'r, 'F) kinstr;
} -> (('a, 'b) or_, 'S, 'r, 'F) kinstr
| ICons_list : Alpha_context.Script.location
* ('a Script_list.t, 'S, 'r, 'F) kinstr -> ('a,
'a Script_list.t * 'S,
'r,
'F)
kinstr
| INil : Alpha_context.Script.location
* ('b, _) ty
* ('b Script_list.t, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IIf_cons : {
loc : Alpha_context.Script.location;
branch_if_cons : ('a, 'a Script_list.t * ('b * 'S), 'c, 'T) kinstr;
branch_if_nil : ('b, 'S, 'c, 'T) kinstr;
k : ('c, 'T, 'r, 'F) kinstr;
} -> ('a Script_list.t, 'b * 'S, 'r, 'F) kinstr
| IList_map : Alpha_context.Script.location
* ('a, 'c * 'S, 'b, 'c * 'S) kinstr
* ('b Script_list.t, _) ty option
* ('b Script_list.t, 'c * 'S, 'r, 'F) kinstr -> ('a Script_list.t,
'c * 'S,
'r,
'F)
kinstr
| IList_iter : Alpha_context.Script.location
* ('a, _) ty option
* ('a, 'b * 'S, 'b, 'S) kinstr
* ('b, 'S, 'r, 'F) kinstr -> ('a Script_list.t, 'b * 'S, 'r, 'F) kinstr
| IList_size : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> ('a Script_list.t,
'S,
'r,
'F)
kinstr
| IEmpty_set : Alpha_context.Script.location
* 'b comparable_ty
* ('b set, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| ISet_iter : Alpha_context.Script.location
* 'a comparable_ty option
* ('a, 'b * 'S, 'b, 'S) kinstr
* ('b, 'S, 'r, 'F) kinstr -> ('a set, 'b * 'S, 'r, 'F) kinstr
| ISet_mem : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> ('a, 'a set * 'S, 'r, 'F) kinstr
| ISet_update : Alpha_context.Script.location
* ('a set, 'S, 'r, 'F) kinstr -> ('a, bool * ('a set * 'S), 'r, 'F) kinstr
| ISet_size : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> ('a set, 'S, 'r, 'F)
kinstr
| IEmpty_map : Alpha_context.Script.location
* 'b comparable_ty
* ('c, _) ty option
* (('b, 'c) map, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IMap_map : Alpha_context.Script.location
* (('a, 'c) map, _) ty option
* (('a, 'b) pair, 'd * 'S, 'c, 'd * 'S) kinstr
* (('a, 'c) map, 'd * 'S, 'r, 'F) kinstr -> (('a, 'b) map, 'd * 'S, 'r, 'F)
kinstr
| IMap_iter : Alpha_context.Script.location
* (('a, 'b) pair, _) ty option
* (('a, 'b) pair, 'c * 'S, 'c, 'S) kinstr
* ('c, 'S, 'r, 'F) kinstr -> (('a, 'b) map, 'c * 'S, 'r, 'F) kinstr
| IMap_mem : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> ('a, ('a, 'b) map * 'S, 'r, 'F) kinstr
| IMap_get : Alpha_context.Script.location
* ('b option, 'S, 'r, 'F) kinstr -> ('a, ('a, 'b) map * 'S, 'r, 'F) kinstr
| IMap_update : Alpha_context.Script.location
* (('a, 'b) map, 'S, 'r, 'F) kinstr -> ('a,
'b option * (('a, 'b) map * 'S),
'r,
'F)
kinstr
| IMap_get_and_update : Alpha_context.Script.location
* ('b option, ('a, 'b) map * 'S, 'r, 'F) kinstr -> ('a,
'b option
* (('a, 'b) map * 'S),
'r,
'F)
kinstr
| IMap_size : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (('a, 'b) map,
'S,
'r,
'F)
kinstr
| IEmpty_big_map : Alpha_context.Script.location
* 'b comparable_ty
* ('c, _) ty
* (('b, 'c) big_map, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IBig_map_mem : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> ('a, ('a, 'b) big_map * 'S, 'r, 'F) kinstr
| IBig_map_get : Alpha_context.Script.location
* ('b option, 'S, 'r, 'F) kinstr -> ('a, ('a, 'b) big_map * 'S, 'r, 'F)
kinstr
| IBig_map_update : Alpha_context.Script.location
* (('a, 'b) big_map, 'S, 'r, 'F) kinstr -> ('a,
'b option
* (('a, 'b) big_map * 'S),
'r,
'F)
kinstr
| IBig_map_get_and_update : Alpha_context.Script.location
* ('b option, ('a, 'b) big_map * 'S, 'r, 'F) kinstr -> ('a,
'b option
* (('a, 'b) big_map
* 'S),
'r,
'F)
kinstr
| IConcat_string : Alpha_context.Script.location
* (Script_string.t, 'S, 'r, 'F) kinstr -> (Script_string.t Script_list.t,
'S,
'r,
'F)
kinstr
| IConcat_string_pair : Alpha_context.Script.location
* (Script_string.t, 'S, 'r, 'F) kinstr -> (Script_string.t,
Script_string.t * 'S,
'r,
'F)
kinstr
| ISlice_string : Alpha_context.Script.location
* (Script_string.t option, 'S, 'r, 'F) kinstr -> (Script_int.n Script_int.num,
Script_int.n
Script_int.num
* (Script_string.t * 'S),
'r,
'F)
kinstr
| IString_size : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Script_string.t,
'S,
'r,
'F)
kinstr
| IConcat_bytes : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes Script_list.t, 'S, 'r, 'F) kinstr
| IConcat_bytes_pair : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, bytes * 'S, 'r, 'F) kinstr
| ISlice_bytes : Alpha_context.Script.location
* (bytes option, 'S, 'r, 'F) kinstr -> (Script_int.n Script_int.num,
Script_int.n Script_int.num
* (bytes * 'S),
'r,
'F)
kinstr
| IBytes_size : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F)
kinstr
| ILsl_bytes : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes,
Script_int.n Script_int.num * 'S,
'r,
'F)
kinstr
| ILsr_bytes : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes,
Script_int.n Script_int.num * 'S,
'r,
'F)
kinstr
| IOr_bytes : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, bytes * 'S, 'r, 'F) kinstr
| IAnd_bytes : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, bytes * 'S, 'r, 'F) kinstr
| IXor_bytes : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, bytes * 'S, 'r, 'F) kinstr
| INot_bytes : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F) kinstr
| INat_bytes : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F)
kinstr
| IBytes_nat : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (Script_int.n Script_int.num, 'S, 'r, 'F)
kinstr
| IInt_bytes : Alpha_context.Script.location
* (Script_int.z Script_int.num, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F)
kinstr
| IBytes_int : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (Script_int.z Script_int.num, 'S, 'r, 'F)
kinstr
| IAdd_seconds_to_timestamp : Alpha_context.Script.location
* (Script_timestamp.t, 'S, 'r, 'F) kinstr -> (Script_int.z Script_int.num,
Script_timestamp.t * 'S,
'r,
'F)
kinstr
| IAdd_timestamp_to_seconds : Alpha_context.Script.location
* (Script_timestamp.t, 'S, 'r, 'F) kinstr -> (Script_timestamp.t,
Script_int.z Script_int.num
* 'S,
'r,
'F)
kinstr
| ISub_timestamp_seconds : Alpha_context.Script.location
* (Script_timestamp.t, 'S, 'r, 'F) kinstr -> (Script_timestamp.t,
Script_int.z Script_int.num
* 'S,
'r,
'F)
kinstr
| IDiff_timestamps : Alpha_context.Script.location
* (Script_int.z Script_int.num, 'S, 'r, 'F) kinstr -> (Script_timestamp.t,
Script_timestamp.t
* 'S,
'r,
'F)
kinstr
| IAdd_tez : Alpha_context.Script.location
* (Alpha_context.Tez.t, 'S, 'r, 'F) kinstr -> (Alpha_context.Tez.t,
Alpha_context.Tez.t * 'S,
'r,
'F)
kinstr
| ISub_tez : Alpha_context.Script.location
* (Alpha_context.Tez.t option, 'S, 'r, 'F) kinstr -> (Alpha_context.Tez.t,
Alpha_context.Tez.t
* 'S,
'r,
'F)
kinstr
| ISub_tez_legacy : Alpha_context.Script.location
* (Alpha_context.Tez.t, 'S, 'r, 'F) kinstr -> (Alpha_context.Tez.t,
Alpha_context.Tez.t * 'S,
'r,
'F)
kinstr
| IMul_teznat : Alpha_context.Script.location
* (Alpha_context.Tez.t, 'S, 'r, 'F) kinstr -> (Alpha_context.Tez.t,
Script_int.n Script_int.num
* 'S,
'r,
'F)
kinstr
| IMul_nattez : Alpha_context.Script.location
* (Alpha_context.Tez.t, 'S, 'r, 'F) kinstr -> (Script_int.n Script_int.num,
Alpha_context.Tez.t * 'S,
'r,
'F)
kinstr
| IEdiv_teznat : Alpha_context.Script.location
* ((Alpha_context.Tez.t, Alpha_context.Tez.t) pair option, 'S, 'r, 'F) kinstr ->
(Alpha_context.Tez.t, Script_int.n Script_int.num * 'S, 'r, 'F)
kinstr
| IEdiv_tez : Alpha_context.Script.location
* ((Script_int.n Script_int.num, Alpha_context.Tez.t) pair option,
'S,
'r,
'F)
kinstr -> (Alpha_context.Tez.t, Alpha_context.Tez.t * 'S, 'r, 'F) kinstr
| IOr : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (bool, bool * 'S, 'r, 'F) kinstr
| IAnd : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (bool, bool * 'S, 'r, 'F) kinstr
| IXor : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (bool, bool * 'S, 'r, 'F) kinstr
| INot : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (bool, 'S, 'r, 'F) kinstr
| IIs_nat : Alpha_context.Script.location
* (Script_int.n Script_int.num option, 'S, 'r, 'F) kinstr -> (Script_int.z
Script_int.num,
'S,
'r,
'F)
kinstr
| INeg : Alpha_context.Script.location
* (Script_int.z Script_int.num, 'S, 'r, 'F) kinstr -> ('a Script_int.num,
'S,
'r,
'F)
kinstr
| IAbs_int : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.z
Script_int.num,
'S,
'r,
'F)
kinstr
| IInt_nat : Alpha_context.Script.location
* (Script_int.z Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.n
Script_int.num,
'S,
'r,
'F)
kinstr
| IAdd_int : Alpha_context.Script.location
* (Script_int.z Script_int.num, 'S, 'r, 'F) kinstr -> ('a Script_int.num,
'b Script_int.num
* 'S,
'r,
'F)
kinstr
| IAdd_nat : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.n
Script_int.num,
Script_int.n
Script_int.num
* 'S,
'r,
'F)
kinstr
| ISub_int : Alpha_context.Script.location
* (Script_int.z Script_int.num, 'S, 'r, 'F) kinstr -> ('a Script_int.num,
'b Script_int.num
* 'S,
'r,
'F)
kinstr
| IMul_int : Alpha_context.Script.location
* (Script_int.z Script_int.num, 'S, 'r, 'F) kinstr -> ('a Script_int.num,
'b Script_int.num
* 'S,
'r,
'F)
kinstr
| IMul_nat : Alpha_context.Script.location
* ('a Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.n Script_int.num,
'a Script_int.num * 'S,
'r,
'F)
kinstr
| IEdiv_int : Alpha_context.Script.location
* ((Script_int.z Script_int.num, Script_int.n Script_int.num) pair option,
'S,
'r,
'F)
kinstr -> ('a Script_int.num, 'b Script_int.num * 'S, 'r, 'F) kinstr
| IEdiv_nat : Alpha_context.Script.location
* (('a Script_int.num, Script_int.n Script_int.num) pair option, 'S, 'r, 'F)
kinstr -> (Script_int.n Script_int.num, 'a Script_int.num * 'S, 'r, 'F)
kinstr
| ILsl_nat : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.n
Script_int.num,
Script_int.n
Script_int.num
* 'S,
'r,
'F)
kinstr
| ILsr_nat : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.n
Script_int.num,
Script_int.n
Script_int.num
* 'S,
'r,
'F)
kinstr
| IOr_nat : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.n
Script_int.num,
Script_int.n
Script_int.num
* 'S,
'r,
'F)
kinstr
| IAnd_nat : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.n
Script_int.num,
Script_int.n
Script_int.num
* 'S,
'r,
'F)
kinstr
| IAnd_int_nat : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.z
Script_int.num,
Script_int.n
Script_int.num
* 'S,
'r,
'F)
kinstr
| IXor_nat : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Script_int.n
Script_int.num,
Script_int.n
Script_int.num
* 'S,
'r,
'F)
kinstr
| INot_int : Alpha_context.Script.location
* (Script_int.z Script_int.num, 'S, 'r, 'F) kinstr -> ('a Script_int.num,
'S,
'r,
'F)
kinstr
| IIf : {
loc : Alpha_context.Script.location;
branch_if_true : ('a, 'S, 'b, 'T) kinstr;
branch_if_false : ('a, 'S, 'b, 'T) kinstr;
k : ('b, 'T, 'r, 'F) kinstr;
} -> (bool, 'a * 'S, 'r, 'F) kinstr
| ILoop : Alpha_context.Script.location
* ('a, 'S, bool, 'a * 'S) kinstr
* ('a, 'S, 'r, 'F) kinstr -> (bool, 'a * 'S, 'r, 'F) kinstr
| ILoop_left : Alpha_context.Script.location
* ('a, 'S, ('a, 'b) or_, 'S) kinstr
* ('b, 'S, 'r, 'F) kinstr -> (('a, 'b) or_, 'S, 'r, 'F) kinstr
| IDip : Alpha_context.Script.location
* ('b, 'S, 'c, 'T) kinstr
* ('a, _) ty option
* ('a, 'c * 'T, 'r, 'F) kinstr -> ('a, 'b * 'S, 'r, 'F) kinstr
| IExec : Alpha_context.Script.location
* ('b, 'S) stack_ty option
* ('b, 'S, 'r, 'F) kinstr -> ('a, ('a, 'b) lambda * 'S, 'r, 'F) kinstr
| IApply : Alpha_context.Script.location
* ('a, _) ty
* (('b, 'c) lambda, 'S, 'r, 'F) kinstr -> ('a,
(('a, 'b) pair, 'c) lambda * 'S,
'r,
'F)
kinstr
| ILambda : Alpha_context.Script.location
* ('b, 'c) lambda
* (('b, 'c) lambda, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IFailwith : Alpha_context.Script.location
* ('a, _) ty -> ('a, 'S, 'r, 'F) kinstr
| ICompare : Alpha_context.Script.location
* 'a comparable_ty
* (Script_int.z Script_int.num, 'b * 'S, 'r, 'F) kinstr -> ('a,
'a * ('b * 'S),
'r,
'F)
kinstr
| IEq : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (Script_int.z Script_int.num, 'S, 'r, 'F)
kinstr
| INeq : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (Script_int.z Script_int.num, 'S, 'r, 'F)
kinstr
| ILt : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (Script_int.z Script_int.num, 'S, 'r, 'F)
kinstr
| IGt : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (Script_int.z Script_int.num, 'S, 'r, 'F)
kinstr
| ILe : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (Script_int.z Script_int.num, 'S, 'r, 'F)
kinstr
| IGe : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (Script_int.z Script_int.num, 'S, 'r, 'F)
kinstr
| IAddress : Alpha_context.Script.location
* (address, 'S, 'r, 'F) kinstr -> ('a typed_contract, 'S, 'r, 'F) kinstr
| IContract : Alpha_context.Script.location
* ('a, _) ty
* Alpha_context.Entrypoint.t
* ('a typed_contract option, 'S, 'r, 'F) kinstr -> (address, 'S, 'r, 'F)
kinstr
| IView : Alpha_context.Script.location
* ('a, 'b) view_signature
* ('c, 'S) stack_ty option
* ('b option, 'c * 'S, 'r, 'F) kinstr -> ('a, address * ('c * 'S), 'r, 'F)
kinstr
| ITransfer_tokens : Alpha_context.Script.location
* (operation, 'S, 'r, 'F) kinstr -> ('a,
Alpha_context.Tez.t
* ('a typed_contract * 'S),
'r,
'F)
kinstr
| IImplicit_account : Alpha_context.Script.location
* (unit typed_contract, 'S, 'r, 'F) kinstr -> (Alpha_context.public_key_hash,
'S,
'r,
'F)
kinstr
| ICreate_contract : {
loc : Alpha_context.Script.location;
storage_type : ('a, _) ty;
code : Alpha_context.Script.expr;
k : (operation, address * ('c * 'S), 'r, 'F) kinstr;
} -> (Alpha_context.public_key_hash option,
Alpha_context.Tez.t * ('a * ('c * 'S)),
'r,
'F)
kinstr
| ISet_delegate : Alpha_context.Script.location
* (operation, 'S, 'r, 'F) kinstr -> (Alpha_context.public_key_hash option,
'S,
'r,
'F)
kinstr
| INow : Alpha_context.Script.location
* (Script_timestamp.t, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IMin_block_time : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F)
kinstr
| IBalance : Alpha_context.Script.location
* (Alpha_context.Tez.t, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| ILevel : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F)
kinstr
| ICheck_signature : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> (Alpha_context.public_key,
signature * (bytes * 'S),
'r,
'F)
kinstr
| IHash_key : Alpha_context.Script.location
* (Alpha_context.public_key_hash, 'S, 'r, 'F) kinstr -> (Alpha_context.public_key,
'S,
'r,
'F)
kinstr
| IPack : Alpha_context.Script.location
* ('a, _) ty
* (bytes, 'b * 'S, 'r, 'F) kinstr -> ('a, 'b * 'S, 'r, 'F) kinstr
| IUnpack : Alpha_context.Script.location
* ('a, _) ty
* ('a option, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F) kinstr
| IBlake2b : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F) kinstr
| ISha256 : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F) kinstr
| ISha512 : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F) kinstr
| ISource : Alpha_context.Script.location
* (address, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| ISender : Alpha_context.Script.location
* (address, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| ISelf : Alpha_context.Script.location
* ('b, _) ty
* Alpha_context.Entrypoint.t
* ('b typed_contract, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| ISelf_address : Alpha_context.Script.location
* (address, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IAmount : Alpha_context.Script.location
* (Alpha_context.Tez.t, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| ISapling_empty_state : Alpha_context.Script.location
* Alpha_context.Sapling.Memo_size.t
* (Alpha_context.Sapling.state, 'a * 'S, 'b, 'F) kinstr -> ('a, 'S, 'b, 'F)
kinstr
| ISapling_verify_update : Alpha_context.Script.location
* ((bytes, (Script_int.z Script_int.num, Alpha_context.Sapling.state) pair)
pair
option,
'S,
'r,
'F)
kinstr -> (Alpha_context.Sapling.transaction,
Alpha_context.Sapling.state * 'S,
'r,
'F)
kinstr
| ISapling_verify_update_deprecated : Alpha_context.Script.location
* ((Script_int.z Script_int.num, Alpha_context.Sapling.state) pair option,
'S,
'r,
'F)
kinstr -> (Alpha_context.Sapling.Legacy.transaction,
Alpha_context.Sapling.state * 'S,
'r,
'F)
kinstr
| IDig : Alpha_context.Script.location
* int
* ('b, 'c * 'T, 'c, 'T, 'a, 'S, 'd, 'U) stack_prefix_preservation_witness
* ('b, 'd * 'U, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IDug : Alpha_context.Script.location
* int
* ('c, 'T, 'a, 'c * 'T, 'b, 'S, 'd, 'U) stack_prefix_preservation_witness
* ('d, 'U, 'r, 'F) kinstr -> ('a, 'b * 'S, 'r, 'F) kinstr
| IDipn : Alpha_context.Script.location
* int
* ('c, 'T, 'd, 'V, 'a, 'S, 'b, 'U) stack_prefix_preservation_witness
* ('c, 'T, 'd, 'V) kinstr
* ('b, 'U, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IDropn : Alpha_context.Script.location
* int
* ('b, 'U, 'b, 'U, 'a, 'S, 'a, 'S) stack_prefix_preservation_witness
* ('b, 'U, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| IChainId : Alpha_context.Script.location
* (Script_chain_id.t, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
| INever : Alpha_context.Script.location -> (never, 'S, 'r, 'F) kinstr
| IVoting_power : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'S, 'r, 'F) kinstr -> (Alpha_context.public_key_hash,
'S,
'r,
'F)
kinstr
| ITotal_voting_power : Alpha_context.Script.location
* (Script_int.n Script_int.num, 'a * 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F)
kinstr
| IKeccak : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F) kinstr
| ISha3 : Alpha_context.Script.location
* (bytes, 'S, 'r, 'F) kinstr -> (bytes, 'S, 'r, 'F) kinstr
| IAdd_bls12_381_g1 : Alpha_context.Script.location
* (Script_bls.G1.t, 'S, 'r, 'F) kinstr -> (Script_bls.G1.t,
Script_bls.G1.t * 'S,
'r,
'F)
kinstr
| IAdd_bls12_381_g2 : Alpha_context.Script.location
* (Script_bls.G2.t, 'S, 'r, 'F) kinstr -> (Script_bls.G2.t,
Script_bls.G2.t * 'S,
'r,
'F)
kinstr
| IAdd_bls12_381_fr : Alpha_context.Script.location
* (Script_bls.Fr.t, 'S, 'r, 'F) kinstr -> (Script_bls.Fr.t,
Script_bls.Fr.t * 'S,
'r,
'F)
kinstr
| IMul_bls12_381_g1 : Alpha_context.Script.location
* (Script_bls.G1.t, 'S, 'r, 'F) kinstr -> (Script_bls.G1.t,
Script_bls.Fr.t * 'S,
'r,
'F)
kinstr
| IMul_bls12_381_g2 : Alpha_context.Script.location
* (Script_bls.G2.t, 'S, 'r, 'F) kinstr -> (Script_bls.G2.t,
Script_bls.Fr.t * 'S,
'r,
'F)
kinstr
| IMul_bls12_381_fr : Alpha_context.Script.location
* (Script_bls.Fr.t, 'S, 'r, 'F) kinstr -> (Script_bls.Fr.t,
Script_bls.Fr.t * 'S,
'r,
'F)
kinstr
| IMul_bls12_381_z_fr : Alpha_context.Script.location
* (Script_bls.Fr.t, 'S, 'r, 'F) kinstr -> (Script_bls.Fr.t,
'a Script_int.num * 'S,
'r,
'F)
kinstr
| IMul_bls12_381_fr_z : Alpha_context.Script.location
* (Script_bls.Fr.t, 'S, 'r, 'F) kinstr -> ('a Script_int.num,
Script_bls.Fr.t * 'S,
'r,
'F)
kinstr
| IInt_bls12_381_fr : Alpha_context.Script.location
* (Script_int.z Script_int.num, 'S, 'r, 'F) kinstr -> (Script_bls.Fr.t,
'S,
'r,
'F)
kinstr
| INeg_bls12_381_g1 : Alpha_context.Script.location
* (Script_bls.G1.t, 'S, 'r, 'F) kinstr -> (Script_bls.G1.t, 'S, 'r, 'F)
kinstr
| INeg_bls12_381_g2 : Alpha_context.Script.location
* (Script_bls.G2.t, 'S, 'r, 'F) kinstr -> (Script_bls.G2.t, 'S, 'r, 'F)
kinstr
| INeg_bls12_381_fr : Alpha_context.Script.location
* (Script_bls.Fr.t, 'S, 'r, 'F) kinstr -> (Script_bls.Fr.t, 'S, 'r, 'F)
kinstr
| IPairing_check_bls12_381 : Alpha_context.Script.location
* (bool, 'S, 'r, 'F) kinstr -> ((Script_bls.G1.t, Script_bls.G2.t) pair
Script_list.t,
'S,
'r,
'F)
kinstr
| IComb : Alpha_context.Script.location
* int
* ('a, 'b, 'S, 'c, 'd, 'T) comb_gadt_witness
* ('c, 'd * 'T, 'r, 'F) kinstr -> ('a, 'b * 'S, 'r, 'F) kinstr
| IUncomb : Alpha_context.Script.location
* int
* ('a, 'b, 'S, 'c, 'd, 'T) uncomb_gadt_witness
* ('c, 'd * 'T, 'r, 'F) kinstr -> ('a, 'b * 'S, 'r, 'F) kinstr
| IComb_get : Alpha_context.Script.location
* int
* ('t, 'v) comb_get_gadt_witness
* ('v, 'a * 'S, 'r, 'F) kinstr -> ('t, 'a * 'S, 'r, 'F) kinstr
| IComb_set : Alpha_context.Script.location
* int
* ('a, 'b, 'c) comb_set_gadt_witness
* ('c, 'd * 'S, 'r, 'F) kinstr -> ('a, 'b * ('d * 'S), 'r, 'F) kinstr
| IDup_n : Alpha_context.Script.location
* int
* ('a, 'b, 'S, 't) dup_n_gadt_witness
* ('t, 'a * ('b * 'S), 'r, 'F) kinstr -> ('a, 'b * 'S, 'r, 'F) kinstr
| ITicket : Alpha_context.Script.location
* 'a comparable_ty option
* ('a ticket option, 'S, 'r, 'F) kinstr -> ('a,
Script_int.n Script_int.num * 'S,
'r,
'F)
kinstr
| ITicket_deprecated : Alpha_context.Script.location
* 'a comparable_ty option
* ('a ticket, 'S, 'r, 'F) kinstr -> ('a,
Script_int.n Script_int.num * 'S,
'r,
'F)
kinstr
| IRead_ticket : Alpha_context.Script.location
* 'a comparable_ty option
* ((address, ('a, Script_int.n Script_int.num) pair) pair,
'a ticket * 'S,
'r,
'F)
kinstr -> ('a ticket, 'S, 'r, 'F) kinstr
| ISplit_ticket : Alpha_context.Script.location
* (('a ticket, 'a ticket) pair option, 'S, 'r, 'F) kinstr -> ('a ticket,
(Script_int.n
Script_int.num,
Script_int.n
Script_int.num)
pair
* 'S,
'r,
'F)
kinstr
| IJoin_tickets : Alpha_context.Script.location
* 'a comparable_ty
* ('a ticket option, 'S, 'r, 'F) kinstr -> (('a ticket, 'a ticket) pair,
'S,
'r,
'F)
kinstr
| IOpen_chest : Alpha_context.Script.location
* (bytes option, 'S, 'r, 'F) kinstr -> (Script_timelock.chest_key,
Script_timelock.chest
* (Script_int.n Script_int.num * 'S),
'r,
'F)
kinstr
| IEmit : {
loc : Alpha_context.Script.location;
tag : Alpha_context.Entrypoint.t;
ty : ('a, _) ty;
unparsed_ty : Alpha_context.Script.expr;
k : (operation, 'S, 'r, 'F) kinstr;
} -> ('a, 'S, 'r, 'F) kinstr
| IHalt : Alpha_context.Script.location -> ('a, 'S, 'a, 'S) kinstr
| ILog : Alpha_context.Script.location
* ('a, 'S) stack_ty
* logging_event
* logger
* ('a, 'S, 'r, 'F) kinstr -> ('a, 'S, 'r, 'F) kinstr
and ('arg, 'ret) lambda =
| Lam : ('arg, end_of_stack, 'ret, end_of_stack) kdescr
* Alpha_context.Script.node -> ('arg, 'ret) lambda
| LamRec : ('arg, ('arg, 'ret) lambda * end_of_stack, 'ret, end_of_stack) kdescr
* Alpha_context.Script.node -> ('arg, 'ret) lambda
and 'arg typed_contract =
| Typed_implicit : Alpha_context.public_key_hash -> unit typed_contract
| Typed_implicit_with_ticket : {
ticket_ty : ('arg ticket, _) ty;
destination : Alpha_context.public_key_hash;
} -> 'arg ticket typed_contract
| Typed_originated : {
arg_ty : ('arg, _) ty;
contract_hash : Contract_hash.t;
entrypoint : Alpha_context.Entrypoint.t;
} -> 'arg typed_contract
| Typed_sc_rollup : {
arg_ty : ('arg, _) ty;
sc_rollup : Alpha_context.Sc_rollup.t;
entrypoint : Alpha_context.Entrypoint.t;
} -> 'arg typed_contract
| Typed_zk_rollup : {
arg_ty : (('a ticket, bytes) pair, _) ty;
zk_rollup : Alpha_context.Zk_rollup.t;
} -> ('a ticket, bytes) pair typed_contract
and (_, _, _, _) continuation =
| KNil : ('r, 'F, 'r, 'F) continuation
| KCons : ('a, 'S, 'b, 'T) kinstr
* ('b, 'T, 'r, 'F) continuation -> ('a, 'S, 'r, 'F) continuation
| KReturn : 'S
* ('a, 'S) stack_ty option
* ('a, 'S, 'r, 'F) continuation -> ('a, end_of_stack, 'r, 'F) continuation
| KMap_head : ('a ->
'b)
* ('b, 'S, 'r, 'F) continuation -> ('a, 'S, 'r, 'F) continuation
| KUndip : 'b
* ('b, _) ty option
* ('b, 'a * 'S, 'r, 'F) continuation -> ('a, 'S, 'r, 'F) continuation
| KLoop_in : ('a, 'S, bool, 'a * 'S) kinstr
* ('a, 'S, 'r, 'F) continuation -> (bool, 'a * 'S, 'r, 'F) continuation
| KLoop_in_left : ('a, 'S, ('a, 'b) or_, 'S) kinstr
* ('b, 'S, 'r, 'F) continuation -> (('a, 'b) or_, 'S, 'r, 'F) continuation
| KIter : ('a, 'b * 'S, 'b, 'S) kinstr
* ('a, _) ty option
* 'a list
* ('b, 'S, 'r, 'F) continuation -> ('b, 'S, 'r, 'F) continuation
| KList_enter_body : ('a, 'c * 'S, 'b, 'c * 'S) kinstr
* 'a list
* 'b Script_list.t
* ('b Script_list.t, _) ty option
* int
* ('b Script_list.t, 'c * 'S, 'r, 'F) continuation -> ('c, 'S, 'r, 'F)
continuation
| KList_exit_body : ('a, 'c * 'S, 'b, 'c * 'S) kinstr
* 'a list
* 'b Script_list.t
* ('b Script_list.t, _) ty option
* int
* ('b Script_list.t, 'c * 'S, 'r, 'F) continuation -> ('b, 'c * 'S, 'r, 'F)
continuation
| KMap_enter_body : (('a, 'b) pair, 'd * 'S, 'c, 'd * 'S) kinstr
* ('a * 'b) list
* ('a, 'c) map
* (('a, 'c) map, _) ty option
* (('a, 'c) map, 'd * 'S, 'r, 'F) continuation -> ('d, 'S, 'r, 'F)
continuation
| KMap_exit_body : (('a, 'b) pair, 'd * 'S, 'c, 'd * 'S) kinstr
* ('a * 'b) list
* ('a, 'c) map
* 'a
* (('a, 'c) map, _) ty option
* (('a, 'c) map, 'd * 'S, 'r, 'F) continuation -> ('c, 'd * 'S, 'r, 'F)
continuation
| KView_exit : step_constants
* ('a, 'S, 'r, 'F) continuation -> ('a, 'S, 'r, 'F) continuation
| KLog : ('a, 'S, 'r, 'F) continuation
* ('a, 'S) stack_ty
* logger -> ('a, 'S, 'r, 'F) continuation
and ('a, 'S, 'b, 'F, 'c, 'U) logging_function =
('a, 'S, 'b, 'F) kinstr ->
Alpha_context.context ->
Alpha_context.Script.location ->
('c, 'U) stack_ty ->
('c * 'U) ->
unit
and execution_trace =
(Alpha_context.Script.location
* Alpha_context.Gas.Arith.fp
* Alpha_context.Script.expr list)
list
and logger = {
log_interp : 'a 'S 'b 'F 'c 'U. ('a, 'S, 'b, 'F, 'c, 'U) logging_function;
log_interp
is called at each call of the internal function interp
. interp
is called when starting the interpretation of a script and subsequently at each Exec
instruction.
get_log : unit ->
execution_trace option Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.t;
get_log
allows to obtain an execution trace, if any was produced.
klog : 'a 'S 'r 'F. ('a, 'S, 'r, 'F) klog;
klog
is called on KLog
inserted when instrumenting continuations.
ilog : 'a 'S 'b 'T 'r 'F. ('a, 'S, 'b, 'T, 'r, 'F) ilog;
ilog
is called on ILog
inserted when instrumenting instructions.
log_kinstr : 'a 'b 'c 'd. ('a, 'b, 'c, 'd) log_kinstr;
log_kinstr
instruments an instruction with ILog
.
}
and ('a, 'S, 'r, 'F) klog =
logger ->
(Local_gas_counter.outdated_context * step_constants) ->
Local_gas_counter.local_gas_counter ->
('a, 'S) stack_ty ->
('a, 'S, 'r, 'F) continuation ->
('a, 'S, 'r, 'F) continuation ->
'a ->
'S ->
('r
* 'F
* Local_gas_counter.outdated_context
* Local_gas_counter.local_gas_counter)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.t
and ('a, 'S, 'b, 'T, 'r, 'F) ilog =
logger ->
logging_event ->
('a, 'S) stack_ty ->
('a, 'S, 'b, 'T, 'r, 'F) step_type
and ('a, 'S, 'b, 'T, 'r, 'F) step_type =
(Local_gas_counter.outdated_context * step_constants) ->
Local_gas_counter.local_gas_counter ->
('a, 'S, 'b, 'T) kinstr ->
('b, 'T, 'r, 'F) continuation ->
'a ->
'S ->
('r
* 'F
* Local_gas_counter.outdated_context
* Local_gas_counter.local_gas_counter)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.t
and ('ty, 'comparable) ty =
| Unit_t : (unit, Dependent_bool.yes) ty
| Int_t : (Script_int.z Script_int.num, Dependent_bool.yes) ty
| Nat_t : (Script_int.n Script_int.num, Dependent_bool.yes) ty
| Signature_t : (signature, Dependent_bool.yes) ty
| String_t : (Script_string.t, Dependent_bool.yes) ty
| Bytes_t : (bytes, Dependent_bool.yes) ty
| Mutez_t : (Alpha_context.Tez.t, Dependent_bool.yes) ty
| Key_hash_t : (Alpha_context.public_key_hash, Dependent_bool.yes) ty
| Key_t : (Alpha_context.public_key, Dependent_bool.yes) ty
| Timestamp_t : (Script_timestamp.t, Dependent_bool.yes) ty
| Address_t : (address, Dependent_bool.yes) ty
| Bool_t : (bool, Dependent_bool.yes) ty
| Pair_t : ('a, 'ac) ty
* ('b, 'bc) ty
* ('a, 'b) pair ty_metadata
* ('ac, 'bc, 'rc) Dependent_bool.dand -> (('a, 'b) pair, 'rc) ty
| Or_t : ('a, 'ac) ty
* ('b, 'bc) ty
* ('a, 'b) or_ ty_metadata
* ('ac, 'bc, 'rc) Dependent_bool.dand -> (('a, 'b) or_, 'rc) ty
| Lambda_t : ('arg, _) ty
* ('ret, _) ty
* ('arg, 'ret) lambda ty_metadata -> (('arg, 'ret) lambda, Dependent_bool.no)
ty
| Option_t : ('v, 'c) ty
* 'v option ty_metadata
* 'c Dependent_bool.dbool -> ('v option, 'c) ty
| List_t : ('v, _) ty
* 'v Script_list.t ty_metadata -> ('v Script_list.t, Dependent_bool.no) ty
| Set_t : 'v comparable_ty * 'v set ty_metadata -> ('v set, Dependent_bool.no) ty
| Map_t : 'k comparable_ty
* ('v, _) ty
* ('k, 'v) map ty_metadata -> (('k, 'v) map, Dependent_bool.no) ty
| Big_map_t : 'k comparable_ty
* ('v, _) ty
* ('k, 'v) big_map ty_metadata -> (('k, 'v) big_map, Dependent_bool.no) ty
| Contract_t : ('arg, _) ty
* 'arg typed_contract ty_metadata -> ('arg typed_contract, Dependent_bool.no)
ty
| Sapling_transaction_t : Alpha_context.Sapling.Memo_size.t -> (Alpha_context.Sapling.transaction,
Dependent_bool.no)
ty
| Sapling_transaction_deprecated_t : Alpha_context.Sapling.Memo_size.t ->
(Alpha_context.Sapling.Legacy.transaction, Dependent_bool.no)
ty
| Sapling_state_t : Alpha_context.Sapling.Memo_size.t -> (Alpha_context.Sapling.state,
Dependent_bool.no)
ty
| Operation_t : (operation, Dependent_bool.no) ty
| Chain_id_t : (Script_chain_id.t, Dependent_bool.yes) ty
| Never_t : (never, Dependent_bool.yes) ty
| Bls12_381_g1_t : (Script_bls.G1.t, Dependent_bool.no) ty
| Bls12_381_g2_t : (Script_bls.G2.t, Dependent_bool.no) ty
| Bls12_381_fr_t : (Script_bls.Fr.t, Dependent_bool.no) ty
| Ticket_t : 'a comparable_ty
* 'a ticket ty_metadata -> ('a ticket, Dependent_bool.no) ty
| Chest_key_t : (Script_timelock.chest_key, Dependent_bool.no) ty
| Chest_t : (Script_timelock.chest, Dependent_bool.no) ty
and 'ty comparable_ty = ('ty, Dependent_bool.yes) ty
and ('top_ty, 'resty) stack_ty =
| Item_t : ('ty, _) ty * ('ty2, 'rest) stack_ty -> ('ty, 'ty2 * 'rest) stack_ty
| Bot_t : (empty_cell, empty_cell) stack_ty
and ('key, 'value) big_map =
| Big_map : {
id : Alpha_context.Big_map.Id.t option;
diff : ('key, 'value) big_map_overlay;
key_type : 'key comparable_ty;
value_type : ('value, _) ty;
} -> ('key, 'value) big_map
and ('a, 'S, 'r, 'F) kdescr = {
kloc : Alpha_context.Script.location;
kbef : ('a, 'S) stack_ty;
kaft : ('r, 'F) stack_ty;
kinstr : ('a, 'S, 'r, 'F) kinstr;
}
and (_, _, _, _, _, _, _, _) stack_prefix_preservation_witness =
| KPrefix : Alpha_context.Script.location
* ('a, _) ty
* ('c, 'V, 'd, 'W, 'x, 'S, 'y, 'U) stack_prefix_preservation_witness ->
('c, 'V, 'd, 'W, 'a, 'x * 'S, 'a, 'y * 'U)
stack_prefix_preservation_witness
| KRest : ('a, 'S, 'b, 'U, 'a, 'S, 'b, 'U) stack_prefix_preservation_witness
and (_, _, _, _, _, _) comb_gadt_witness =
| Comb_one : ('a, 'x, 'before, 'a, 'x, 'before) comb_gadt_witness
| Comb_succ : ('b, 'c, 'S, 'd, 'e, 'T) comb_gadt_witness -> ('a,
'b,
'c * 'S,
'a * 'd,
'e,
'T)
comb_gadt_witness
and (_, _, _, _, _, _) uncomb_gadt_witness =
| Uncomb_one : ('a, 'x, 'before, 'a, 'x, 'before) uncomb_gadt_witness
| Uncomb_succ : ('b, 'c, 'S, 'd, 'e, 'T) uncomb_gadt_witness -> (('a, 'b) pair,
'c,
'S,
'a,
'd,
'e * 'T)
uncomb_gadt_witness
and ('before, 'after) comb_get_gadt_witness =
| Comb_get_zero : ('b, 'b) comb_get_gadt_witness
| Comb_get_one : (('a, 'b) pair, 'a) comb_get_gadt_witness
| Comb_get_plus_two : ('before, 'after) comb_get_gadt_witness -> (('a, 'before)
pair,
'after)
comb_get_gadt_witness
and ('value, 'before, 'after) comb_set_gadt_witness =
| Comb_set_zero : ('value, _, 'value) comb_set_gadt_witness
| Comb_set_one : ('value, ('hd, 'tl) pair, ('value, 'tl) pair)
comb_set_gadt_witness
| Comb_set_plus_two : ('value, 'before, 'after) comb_set_gadt_witness ->
('value, ('a, 'before) pair, ('a, 'after) pair)
comb_set_gadt_witness
and (_, _, _, _) dup_n_gadt_witness =
| Dup_n_zero : ('a, _, _, 'a) dup_n_gadt_witness
| Dup_n_succ : ('b, 'c, 'stack, 'd) dup_n_gadt_witness -> ('a,
'b,
'c * 'stack,
'd)
dup_n_gadt_witness
and ('input, 'output) view_signature =
| View_signature : {
name : Script_string.t;
input_ty : ('input, _) ty;
output_ty : ('output, _) ty;
} -> ('input, 'output) view_signature
and 'kind internal_operation_contents =
| Transaction_to_implicit : {
destination : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t;
amount : Alpha_context.Tez.t;
} -> Alpha_context.Kind.transaction internal_operation_contents
| Transaction_to_implicit_with_ticket : {
destination : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t;
ticket_ty : ('content ticket, _) ty;
ticket : 'content ticket;
unparsed_ticket : Alpha_context.Script.lazy_expr;
amount : Alpha_context.Tez.t;
} -> Alpha_context.Kind.transaction internal_operation_contents
| Transaction_to_smart_contract : {
destination : Contract_hash.t;
amount : Alpha_context.Tez.t;
entrypoint : Alpha_context.Entrypoint.t;
location : Alpha_context.Script.location;
parameters_ty : ('a, _) ty;
parameters : 'a;
unparsed_parameters : Alpha_context.Script.expr;
} -> Alpha_context.Kind.transaction internal_operation_contents
| Transaction_to_sc_rollup : {
destination : Alpha_context.Sc_rollup.t;
entrypoint : Alpha_context.Entrypoint.t;
parameters_ty : ('a, _) ty;
parameters : 'a;
unparsed_parameters : Alpha_context.Script.expr;
} -> Alpha_context.Kind.transaction internal_operation_contents
| Event : {
ty : Alpha_context.Script.expr;
tag : Alpha_context.Entrypoint.t;
unparsed_data : Alpha_context.Script.expr;
} -> Alpha_context.Kind.event internal_operation_contents
| Transaction_to_zk_rollup : {
destination : Alpha_context.Zk_rollup.t;
parameters_ty : (('a ticket, bytes) pair, _) ty;
parameters : ('a ticket, bytes) pair;
unparsed_parameters : Alpha_context.Script.expr;
} -> Alpha_context.Kind.transaction internal_operation_contents
| Origination : {
delegate : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t option;
code : Alpha_context.Script.expr;
unparsed_storage : Alpha_context.Script.expr;
credit : Alpha_context.Tez.t;
preorigination : Contract_hash.t;
storage_type : ('storage, _) ty;
storage : 'storage;
} -> Alpha_context.Kind.origination internal_operation_contents
| Delegation : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t
option -> Alpha_context.Kind.delegation
internal_operation_contents
and 'kind internal_operation = {
sender : Alpha_context.Destination.t;
operation : 'kind internal_operation_contents;
nonce : int;
}
and packed_internal_operation =
| Internal_operation : 'kind internal_operation -> packed_internal_operation
and operation = {
piop : packed_internal_operation;
lazy_storage_diff : Alpha_context.Lazy_storage.diffs option;
}
type ('arg, 'storage) script =
| Script : {
code : (('arg, 'storage) pair, (operation Script_list.t, 'storage) pair) lambda;
arg_type : ('arg, _) ty;
storage : 'storage;
storage_type : ('storage, _) ty;
views : view_map;
entrypoints : 'arg entrypoints;
code_size : Cache_memory_helpers.sint;
} -> ('arg, 'storage) script
val manager_kind :
'kind internal_operation_contents ->
'kind Alpha_context.Kind.manager
val kinstr_location : (_, _, _, _) kinstr -> Alpha_context.Script.location
val ty_size : ('a, _) ty -> 'a Type_size.t
val is_comparable : ('v, 'c) ty -> 'c Dependent_bool.dbool
val unit_t : unit comparable_ty
val int_t : Script_int.z Script_int.num comparable_ty
val nat_t : Script_int.n Script_int.num comparable_ty
val signature_t : signature comparable_ty
val string_t : Script_string.t comparable_ty
val bytes_t : Tezos_protocol_environment_alpha.Bytes.t comparable_ty
val mutez_t : Alpha_context.Tez.t comparable_ty
val key_hash_t : Alpha_context.public_key_hash comparable_ty
val key_t : Alpha_context.public_key comparable_ty
val timestamp_t : Script_timestamp.t comparable_ty
val address_t : address comparable_ty
val bool_t : bool comparable_ty
val pair_t :
Alpha_context.Script.location ->
('a, _) ty ->
('b, _) ty ->
('a, 'b) pair ty_ex_c Tezos_protocol_environment_alpha.Error_monad.tzresult
val pair_3_t :
Alpha_context.Script.location ->
('a, _) ty ->
('b, _) ty ->
('c, _) ty ->
('a, ('b, 'c) pair) pair ty_ex_c
Tezos_protocol_environment_alpha.Error_monad.tzresult
val comparable_pair_t :
Alpha_context.Script.location ->
'a comparable_ty ->
'b comparable_ty ->
('a, 'b) pair comparable_ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val comparable_pair_3_t :
Alpha_context.Script.location ->
'a comparable_ty ->
'b comparable_ty ->
'c comparable_ty ->
('a, ('b, 'c) pair) pair comparable_ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val pair_int_int_unit_t :
(Script_int.z Script_int.num, (Script_int.z Script_int.num, unit) pair) pair
comparable_ty
val or_t :
Alpha_context.Script.location ->
('a, _) ty ->
('b, _) ty ->
('a, 'b) or_ ty_ex_c Tezos_protocol_environment_alpha.Error_monad.tzresult
val comparable_or_t :
Alpha_context.Script.location ->
'a comparable_ty ->
'b comparable_ty ->
('a, 'b) or_ comparable_ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val or_bytes_bool_t :
(Tezos_protocol_environment_alpha.Bytes.t, bool) or_ comparable_ty
val lambda_t :
Alpha_context.Script.location ->
('arg, _) ty ->
('ret, _) ty ->
(('arg, 'ret) lambda, Dependent_bool.no) ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val option_t :
Alpha_context.Script.location ->
('v, 'c) ty ->
('v option, 'c) ty Tezos_protocol_environment_alpha.Error_monad.tzresult
val option_mutez_t : Alpha_context.Tez.t option comparable_ty
val option_string_t : Script_string.t option comparable_ty
val option_bytes_t :
Tezos_protocol_environment_alpha.Bytes.t option comparable_ty
val option_nat_t : Script_int.n Script_int.num option comparable_ty
val option_pair_nat_nat_t :
(Script_int.n Script_int.num, Script_int.n Script_int.num) pair option
comparable_ty
val option_pair_nat_mutez_t :
(Script_int.n Script_int.num, Alpha_context.Tez.t) pair option comparable_ty
val option_pair_mutez_mutez_t :
(Alpha_context.Tez.t, Alpha_context.Tez.t) pair option comparable_ty
val option_pair_int_nat_t :
(Script_int.z Script_int.num, Script_int.n Script_int.num) pair option
comparable_ty
val list_t :
Alpha_context.Script.location ->
('v, _) ty ->
('v Script_list.t, Dependent_bool.no) ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val list_operation_t : (operation Script_list.t, Dependent_bool.no) ty
val set_t :
Alpha_context.Script.location ->
'v comparable_ty ->
('v set, Dependent_bool.no) ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val map_t :
Alpha_context.Script.location ->
'k comparable_ty ->
('v, _) ty ->
(('k, 'v) map, Dependent_bool.no) ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val big_map_t :
Alpha_context.Script.location ->
'k comparable_ty ->
('v, _) ty ->
(('k, 'v) big_map, Dependent_bool.no) ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val contract_t :
Alpha_context.Script.location ->
('arg, _) ty ->
('arg typed_contract, Dependent_bool.no) ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val contract_unit_t : (unit typed_contract, Dependent_bool.no) ty
val sapling_transaction_t :
memo_size:Alpha_context.Sapling.Memo_size.t ->
(Alpha_context.Sapling.transaction, Dependent_bool.no) ty
val sapling_transaction_deprecated_t :
memo_size:Alpha_context.Sapling.Memo_size.t ->
(Alpha_context.Sapling.Legacy.transaction, Dependent_bool.no) ty
val sapling_state_t :
memo_size:Alpha_context.Sapling.Memo_size.t ->
(Alpha_context.Sapling.state, Dependent_bool.no) ty
val operation_t : (operation, Dependent_bool.no) ty
val chain_id_t : Script_chain_id.t comparable_ty
val never_t : never comparable_ty
val bls12_381_g1_t : (Script_bls.G1.t, Dependent_bool.no) ty
val bls12_381_g2_t : (Script_bls.G2.t, Dependent_bool.no) ty
val bls12_381_fr_t : (Script_bls.Fr.t, Dependent_bool.no) ty
val ticket_t :
Alpha_context.Script.location ->
'a comparable_ty ->
('a ticket, Dependent_bool.no) ty
Tezos_protocol_environment_alpha.Error_monad.tzresult
val chest_key_t : (Script_timelock.chest_key, Dependent_bool.no) ty
val chest_t : (Script_timelock.chest, Dependent_bool.no) ty
The following functions named `X_traverse` for X in { kinstr, ty, stack_ty, value }
provide tail recursive top down traversals over the values of these types.
The traversal goes through a value and rewrites an accumulator along the way starting from some init
ial value for the accumulator.
All these traversals follow the same recursion scheme: the user-provided function is first called on the toplevel value, then the traversal recurses on the direct subvalues of the same type.
Hence, the user-provided function must only compute the contribution of the value on the accumulator minus the contribution of its subvalues of the same type.
val kinstr_traverse :
('a, 'S, 'c, 'F) kinstr ->
'ret ->
'ret kinstr_traverse ->
'ret
val ty_traverse : ('a, _) ty -> 'r -> 'r ty_traverse -> 'r
val stack_ty_traverse : ('a, 'S) stack_ty -> 'r -> 'r stack_ty_traverse -> 'r
val value_traverse : ('t, _) ty -> 't -> 'r -> 'r value_traverse -> 'r
module Typed_contract : sig ... end