diff --git a/docs/protocols/alpha.rst b/docs/protocols/alpha.rst index 12c998567c98d630d966afd8cc58139e597c5627..a779f53ec694eaeb816eda1033f8cbd4a84fcded 100644 --- a/docs/protocols/alpha.rst +++ b/docs/protocols/alpha.rst @@ -85,6 +85,9 @@ Michelson - Type annotations are ignored and not propagated. (MR :gl:`!4141`) +- Field annotations are ignored and not propagated on comparable types and on + regular pairs (MR :gl:`!4175`) + Internal -------- diff --git a/src/proto_alpha/lib_benchmark/michelson_samplers.ml b/src/proto_alpha/lib_benchmark/michelson_samplers.ml index a00f7ec100885e00f350d8b129f5b039dd959a4a..7aa1c9f5a368842f11c5290e0dc36cbe56818194 100644 --- a/src/proto_alpha/lib_benchmark/michelson_samplers.ml +++ b/src/proto_alpha/lib_benchmark/michelson_samplers.ml @@ -368,7 +368,7 @@ end) let* (lsize, rsize) = pick_split (size - 1) in let* (Ex_ty left) = m_type ~size:lsize in let* (Ex_ty right) = m_type ~size:rsize in - match pair_t (-1) (left, None) (right, None) with + match pair_t (-1) left right with | Error _ -> assert false | Ok res_ty -> return @@ Ex_ty res_ty) | `TLambda -> ( @@ -448,7 +448,7 @@ end) let size_right = size - size_left in let* (Ex_comparable_ty l) = m_comparable_type ~size:size_left in let* (Ex_comparable_ty r) = m_comparable_type ~size:size_right in - match pair_key (-1) (l, None) (r, None) with + match pair_key (-1) l r with | Error _ -> assert false | Ok res_ty -> return @@ Ex_comparable_ty res_ty in @@ -460,7 +460,7 @@ end) let size_right = size - size_left in let* (Ex_comparable_ty l) = m_comparable_type ~size:size_left in let* (Ex_comparable_ty r) = m_comparable_type ~size:size_right in - match union_key (-1) (l, None) (r, None) with + match union_key (-1) l r with | Error _ -> assert false | Ok res_ty -> return @@ Ex_comparable_ty res_ty in @@ -532,7 +532,7 @@ end) | Timestamp_t _ -> Michelson_base.timestamp | Bool_t _ -> Base_samplers.uniform_bool | Address_t _ -> address - | Pair_t ((left_t, _), (right_t, _), _) -> + | Pair_t (left_t, right_t, _) -> M.( let* left_v = value left_t in let* right_v = value right_t in diff --git a/src/proto_alpha/lib_benchmark/test/test_distribution.ml b/src/proto_alpha/lib_benchmark/test/test_distribution.ml index acc8084c6d10205654d93d40b04f497f69206bfa..2591f85de4c67fa22bd789af561b48438adfe681 100644 --- a/src/proto_alpha/lib_benchmark/test/test_distribution.ml +++ b/src/proto_alpha/lib_benchmark/test/test_distribution.ml @@ -68,7 +68,7 @@ let rec tnames_of_type : | Script_typed_ir.Timestamp_t _ -> `TTimestamp :: acc | Script_typed_ir.Address_t _ -> `TAddress :: acc | Script_typed_ir.Bool_t _ -> `TBool :: acc - | Script_typed_ir.Pair_t ((lty, _), (rty, _), _) -> + | Script_typed_ir.Pair_t (lty, rty, _) -> tnames_of_type lty (tnames_of_type rty (`TPair :: acc)) | Script_typed_ir.Union_t ((lty, _), (rty, _), _) -> tnames_of_type lty (tnames_of_type rty (`TUnion :: acc)) @@ -114,11 +114,11 @@ and tnames_of_comparable_type : | Script_typed_ir.Timestamp_key _ -> `TTimestamp :: acc | Script_typed_ir.Chain_id_key _ -> `TChain_id :: acc | Script_typed_ir.Address_key _ -> `TAddress :: acc - | Script_typed_ir.Pair_key ((lty, _), (rty, _), _) -> + | Script_typed_ir.Pair_key (lty, rty, _) -> tnames_of_comparable_type lty (tnames_of_comparable_type rty (`TPair :: acc)) - | Script_typed_ir.Union_key ((lty, _), (rty, _), _) -> + | Script_typed_ir.Union_key (lty, rty, _) -> tnames_of_comparable_type lty (tnames_of_comparable_type rty (`TUnion :: acc)) diff --git a/src/proto_alpha/lib_benchmarks_proto/interpreter_workload.ml b/src/proto_alpha/lib_benchmarks_proto/interpreter_workload.ml index ecfc28d8fcb16b14b3796543c1695d4a96a765cf..6b9beec6ed073390a264569d15294dd0d2768045 100644 --- a/src/proto_alpha/lib_benchmarks_proto/interpreter_workload.ml +++ b/src/proto_alpha/lib_benchmarks_proto/interpreter_workload.ml @@ -1140,7 +1140,7 @@ let rec size_of_comparable_value : type a. a comparable_ty -> a -> Size.t = | Key_hash_key _ -> Size.key_hash v | Timestamp_key _ -> Size.timestamp v | Address_key _ -> Size.address v - | Pair_key ((leaf, _), (node, _), _) -> + | Pair_key (leaf, node, _) -> let (lv, rv) = v in let size = Size.add @@ -1148,7 +1148,7 @@ let rec size_of_comparable_value : type a. a comparable_ty -> a -> Size.t = (size_of_comparable_value node rv) in Size.add size Size.one - | Union_key ((left, _), (right, _), _) -> + | Union_key (left, right, _) -> let size = match v with | L v -> size_of_comparable_value left v diff --git a/src/proto_alpha/lib_benchmarks_proto/michelson_types.ml b/src/proto_alpha/lib_benchmarks_proto/michelson_types.ml index 9befe563374556c7d1f4e41f04ee3e708433da94..826529558b370368fbe5876fac49634e26c23cb1 100644 --- a/src/proto_alpha/lib_benchmarks_proto/michelson_types.ml +++ b/src/proto_alpha/lib_benchmarks_proto/michelson_types.ml @@ -94,9 +94,7 @@ let set k = match set_t (-1) k with Error _ -> assert false | Ok t -> t (* pair type constructor*) let pair k1 k2 = - match pair_t (-1) (k1, None) (k2, None) with - | Error _ -> assert false - | Ok t -> t + match pair_t (-1) k1 k2 with Error _ -> assert false | Ok t -> t (* union type constructor*) let union k1 k2 = diff --git a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml index 82eec3c31975879fa83000062cba030df8d3dab8..00284f1af8203e5a7a2543d665dd16ea3b852697 100644 --- a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml @@ -624,10 +624,7 @@ let rec dummy_type_generator size = match dummy_type_generator (size - 2) with | Ex_ty r -> let l = unit_t in - Ex_ty - (match pair_t (-1) (l, None) (r, None) with - | Error _ -> assert false - | Ok t -> t) + Ex_ty (match pair_t (-1) l r with Error _ -> assert false | Ok t -> t) (* A dummy comparable type generator, sampling linear terms of a given size. *) let rec dummy_comparable_type_generator size = @@ -639,9 +636,7 @@ let rec dummy_comparable_type_generator size = | Ex_comparable_ty r -> let l = unit_key in Ex_comparable_ty - (match pair_key (-1) (l, None) (r, None) with - | Error _ -> assert false - | Ok t -> t) + (match pair_key (-1) l r with Error _ -> assert false | Ok t -> t) module Parse_type_shared = struct type config = {max_size : int} diff --git a/src/proto_alpha/lib_client/michelson_v1_error_reporter.ml b/src/proto_alpha/lib_client/michelson_v1_error_reporter.ml index fac74b20f77780e782e92769ea4029347c64fb4b..8eb1e753855f4f14d6ef536936569f6190b6d19d 100644 --- a/src/proto_alpha/lib_client/michelson_v1_error_reporter.ml +++ b/src/proto_alpha/lib_client/michelson_v1_error_reporter.ml @@ -626,14 +626,6 @@ let report_errors ~details ~show_source ?parsed ppf errs = - @[%s@]@]" annot1 annot2 - | Inconsistent_field_annotations (annot1, annot2) -> - Format.fprintf - ppf - "@[The field access annotation does not match:@,\ - - @[%s@]@,\ - - @[%s@]@]" - annot1 - annot2 | Inconsistent_type_annotations (loc, ty1, ty2) -> Format.fprintf ppf diff --git a/src/proto_alpha/lib_plugin/plugin.ml b/src/proto_alpha/lib_plugin/plugin.ml index 050a5abfcb137a52f5bf93cd0ec19ea7b2f8b9d7..0f4622d34937d3abd1a7bad14958ad2b50a39bfb 100644 --- a/src/proto_alpha/lib_plugin/plugin.ml +++ b/src/proto_alpha/lib_plugin/plugin.ml @@ -1934,13 +1934,13 @@ module RPC = struct | Timestamp_key _meta -> Prim (loc, T_timestamp, [], []) | Address_key _meta -> Prim (loc, T_address, [], []) | Chain_id_key _meta -> Prim (loc, T_chain_id, [], []) - | Pair_key ((l, al), (r, ar), _meta) -> - let tl = add_field_annot al (unparse_comparable_ty ~loc l) in - let tr = add_field_annot ar (unparse_comparable_ty ~loc r) in + | Pair_key (l, r, _meta) -> + let tl = unparse_comparable_ty ~loc l in + let tr = unparse_comparable_ty ~loc r in Prim (loc, T_pair, [tl; tr], []) - | Union_key ((l, al), (r, ar), _meta) -> - let tl = add_field_annot al (unparse_comparable_ty ~loc l) in - let tr = add_field_annot ar (unparse_comparable_ty ~loc r) in + | Union_key (l, r, _meta) -> + let tl = unparse_comparable_ty ~loc l in + let tr = unparse_comparable_ty ~loc r in Prim (loc, T_or, [tl; tr], []) | Option_key (t, _meta) -> Prim (loc, T_option, [unparse_comparable_ty ~loc t], []) @@ -1975,12 +1975,10 @@ module RPC = struct | Contract_t (ut, _meta) -> let t = unparse_ty ~loc ut in return (T_contract, [t], []) - | Pair_t ((utl, l_field), (utr, r_field), _meta) -> + | Pair_t (utl, utr, _meta) -> let annot = [] in - let utl = unparse_ty ~loc utl in - let tl = add_field_annot l_field utl in - let utr = unparse_ty ~loc utr in - let tr = add_field_annot r_field utr in + let tl = unparse_ty ~loc utl in + let tr = unparse_ty ~loc utr in return (T_pair, [tl; tr], annot) | Union_t ((utl, l_field), (utr, r_field), _meta) -> let annot = [] in diff --git a/src/proto_alpha/lib_protocol/michelson_v1_gas.ml b/src/proto_alpha/lib_protocol/michelson_v1_gas.ml index dec735d47a3b283a3db560ab09bd6a7a47b39987..fec8bcee756298a4289590ac93058cc8c43496d9 100644 --- a/src/proto_alpha/lib_protocol/michelson_v1_gas.ml +++ b/src/proto_alpha/lib_protocol/michelson_v1_gas.ml @@ -1388,7 +1388,7 @@ module Cost_of = struct (apply [@tailcall]) Gas.(acc +@ compare_timestamp x y) k | Address_key _ -> (apply [@tailcall]) Gas.(acc +@ compare_address) k | Chain_id_key _ -> (apply [@tailcall]) Gas.(acc +@ compare_chain_id) k - | Pair_key ((tl, _), (tr, _), _) -> + | Pair_key (tl, tr, _) -> (* Reasonable over-approximation of the cost of lexicographic comparison. *) let (xl, xr) = x in let (yl, yr) = y in @@ -1398,7 +1398,7 @@ module Cost_of = struct yl Gas.(acc +@ compare_pair_tag) (Compare (tr, xr, yr, k)) - | Union_key ((tl, _), (tr, _), _) -> ( + | Union_key (tl, tr, _) -> ( match (x, y) with | (L x, L y) -> (compare [@tailcall]) tl x y Gas.(acc +@ compare_union_tag) k diff --git a/src/proto_alpha/lib_protocol/script_comparable.ml b/src/proto_alpha/lib_protocol/script_comparable.ml index b921eaae61e52ba290740386c60cc1ea7bef4553..4ad8ec9cc0e39deabb763b1d8250381f5c4d4dd5 100644 --- a/src/proto_alpha/lib_protocol/script_comparable.ml +++ b/src/proto_alpha/lib_protocol/script_comparable.ml @@ -64,17 +64,17 @@ let compare_comparable : type a. a comparable_ty -> a -> a -> int = | (Bytes_key _, x, y) -> (apply [@tailcall]) (Compare.Bytes.compare x y) k | (Chain_id_key _, x, y) -> (apply [@tailcall]) (Script_chain_id.compare x y) k - | (Pair_key ((tl, _), (tr, _), _), (lx, rx), (ly, ry)) -> + | (Pair_key (tl, tr, _), (lx, rx), (ly, ry)) -> (compare_comparable [@tailcall]) tl (Compare_comparable (tr, rx, ry, k)) lx ly - | (Union_key ((tl, _), _, _), L x, L y) -> + | (Union_key (tl, _, _), L x, L y) -> (compare_comparable [@tailcall]) tl k x y | (Union_key _, L _, R _) -> -1 | (Union_key _, R _, L _) -> 1 - | (Union_key (_, (tr, _), _), R x, R y) -> + | (Union_key (_, tr, _), R x, R y) -> (compare_comparable [@tailcall]) tr k x y | (Option_key _, None, None) -> (apply [@tailcall]) 0 k | (Option_key _, None, Some _) -> -1 diff --git a/src/proto_alpha/lib_protocol/script_interpreter.ml b/src/proto_alpha/lib_protocol/script_interpreter.ml index f15f7165c4467bbf53d2f739355fae5490611fca..df29e0c0de50330cc8923693923afb59f32ba52f 100644 --- a/src/proto_alpha/lib_protocol/script_interpreter.ml +++ b/src/proto_alpha/lib_protocol/script_interpreter.ml @@ -1071,8 +1071,7 @@ and step : type a s b t r f. (a, s, b, t, r, f) step_type = kinstr; }, _script_view ) -> ( - pair_t kloc (input_ty, None) (storage_type, None) - >>?= fun pair_ty -> + pair_t kloc input_ty storage_type >>?= fun pair_ty -> let open Gas_monad in let io_ty = Script_ir_translator.merge_types diff --git a/src/proto_alpha/lib_protocol/script_interpreter_defs.ml b/src/proto_alpha/lib_protocol/script_interpreter_defs.ml index 76455a1d77d824bb5ca0b3ad20b7e1f9bd86cc52..6501f6ac43276692c02edfe715ac445945287d61 100644 --- a/src/proto_alpha/lib_protocol/script_interpreter_defs.ml +++ b/src/proto_alpha/lib_protocol/script_interpreter_defs.ml @@ -462,7 +462,7 @@ let apply ctxt gas capture_ty capture lam = let loc = Micheline.dummy_location in unparse_ty ~loc ctxt capture_ty >>?= fun (ty_expr, ctxt) -> match full_arg_ty with - | Pair_t ((capture_ty, _), (arg_ty, _), _) -> + | Pair_t (capture_ty, arg_ty, _) -> let arg_stack_ty = Item_t (arg_ty, Bot_t) in let full_descr = { diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.ml b/src/proto_alpha/lib_protocol/script_ir_annot.ml index cae86bb3bd38955469691f7230954e897dfc55a4..c8ccf6047c718436ab1c1eb50d437a5f45dffd74 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.ml +++ b/src/proto_alpha/lib_protocol/script_ir_annot.ml @@ -199,15 +199,13 @@ let check_type_annot : Script.location -> string list -> unit tzresult = error_unexpected_annot loc fields >>? fun () -> get_one_annot loc types >|? fun _a -> () -let parse_composed_type_annot : - Script.location -> - string list -> - (field_annot option * field_annot option) tzresult = +let check_composed_type_annot : Script.location -> string list -> unit tzresult + = fun loc annot -> parse_annots loc annot >>? classify_annot loc >>? fun (vars, types, fields) -> error_unexpected_annot loc vars >>? fun () -> get_one_annot loc types >>? fun _t -> - get_two_annot loc fields >|? fun (f1, f2) -> (f1, f2) + get_two_annot loc fields >|? fun (_f1, _f2) -> () let parse_field_annot : Script.location -> string list -> field_annot option tzresult = @@ -233,18 +231,6 @@ let extract_field_annot : >|? fun field_annot -> (Prim (loc, prim, args, annot), field_annot) | expr -> ok (expr, None) -let check_correct_field : - field_annot option -> field_annot option -> unit tzresult = - fun f1 f2 -> - match (f1, f2) with - | (None, _) | (_, None) -> Result.return_unit - | (Some (Field_annot s1), Some (Field_annot s2)) -> - if Non_empty_string.(s1 = s2) then Result.return_unit - else - error - (Inconsistent_field_annotations - ("%" ^ (s1 :> string), "%" ^ (s2 :> string))) - let check_var_annot : Script.location -> string list -> unit tzresult = fun loc annot -> parse_annots loc annot >>? classify_annot loc >>? fun (vars, types, fields) -> @@ -277,24 +263,21 @@ let check_two_var_annot : Script.location -> string list -> unit tzresult = error_unexpected_annot loc fields >>? fun () -> get_two_annot loc vars >|? fun (_a1, _a2) -> () -let parse_destr_annot : - Script.location -> string list -> field_annot option tzresult = +let check_destr_annot : Script.location -> string list -> unit tzresult = fun loc annot -> parse_annots loc ~allow_special_var:true annot >>? classify_annot loc >>? fun (vars, types, fields) -> error_unexpected_annot loc types >>? fun () -> get_one_annot loc vars >>? fun (_v : var_annot option) -> - get_one_annot loc fields + get_one_annot loc fields >|? fun (_f : field_annot option) -> () -let parse_unpair_annot : - Script.location -> - string list -> - (field_annot option * field_annot option) tzresult = +let check_unpair_annot : Script.location -> string list -> unit tzresult = fun loc annot -> parse_annots loc ~allow_special_var:true annot >>? classify_annot loc >>? fun (vars, types, fields) -> error_unexpected_annot loc types >>? fun () -> - get_two_annot loc vars >>? fun (_vcar, _vcdr) -> get_two_annot loc fields + get_two_annot loc vars >>? fun (_vcar, _vcdr) -> + get_two_annot loc fields >|? fun (_f1, _f2) -> () let parse_entrypoint_annot : Script.location -> string list -> field_annot option tzresult = diff --git a/src/proto_alpha/lib_protocol/script_ir_annot.mli b/src/proto_alpha/lib_protocol/script_ir_annot.mli index 7d6035356aa0fa9904d0feec3e0480ca6b86d9a6..50c5be2a100ab1592755c89e0bfb525c6073aaab 100644 --- a/src/proto_alpha/lib_protocol/script_ir_annot.mli +++ b/src/proto_alpha/lib_protocol/script_ir_annot.mli @@ -61,28 +61,29 @@ val merge_field_annot : (** @return an error {!Unexpected_annotation} in the monad the list is not empty. *) val error_unexpected_annot : Script.location -> 'a list -> unit tzresult -(** Parse a type annotation only. *) +(** check_xxx_annot functions below are remains from the past (they were called + parse_xxx_annot before). + They check that annotations are well-formed and, depending on different + contexts, that only the annotations that are expected to be found are + present. + Hopefully we will relax this property soon. +*) + +(** Check a type annotation only. *) val check_type_annot : Script.location -> string list -> unit tzresult (** Parse a field annotation only. *) val parse_field_annot : Script.location -> string list -> field_annot option tzresult -(** Parse an annotation for composed types, of the form +(** Check an annotation for composed types, of the form [:ty_name %field1 %field2] in any order. *) -val parse_composed_type_annot : - Script.location -> - string list -> - (field_annot option * field_annot option) tzresult +val check_composed_type_annot : Script.location -> string list -> unit tzresult (** Extract and remove a field annotation from a node *) val extract_field_annot : Script.node -> (Script.node * field_annot option) tzresult -(** Check that field annotations match, used for field accesses. *) -val check_correct_field : - field_annot option -> field_annot option -> unit tzresult - (** Instruction annotations parsing *) (** Check a variable annotation. *) @@ -97,13 +98,9 @@ val parse_constr_annot : val check_two_var_annot : Script.location -> string list -> unit tzresult -val parse_destr_annot : - Script.location -> string list -> field_annot option tzresult +val check_destr_annot : Script.location -> string list -> unit tzresult -val parse_unpair_annot : - Script.location -> - string list -> - (field_annot option * field_annot option) tzresult +val check_unpair_annot : Script.location -> string list -> unit tzresult val parse_entrypoint_annot : Script.location -> string list -> field_annot option tzresult diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index f38809b61cb0465dca1a0145a0cb733eeab3fc64..c952de4a0006299aa1149bd0f11f196b6cc6bd1f 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -172,10 +172,11 @@ let rec ty_of_comparable_ty : type a. a comparable_ty -> a ty = function | Timestamp_key tname -> Timestamp_t tname | Address_key tname -> Address_t tname | Chain_id_key tname -> Chain_id_t tname - | Pair_key ((l, al), (r, ar), tname) -> - Pair_t ((ty_of_comparable_ty l, al), (ty_of_comparable_ty r, ar), tname) - | Union_key ((l, al), (r, ar), tname) -> - Union_t ((ty_of_comparable_ty l, al), (ty_of_comparable_ty r, ar), tname) + | Pair_key (l, r, tname) -> + Pair_t (ty_of_comparable_ty l, ty_of_comparable_ty r, tname) + | Union_key (l, r, tname) -> + Union_t + ((ty_of_comparable_ty l, None), (ty_of_comparable_ty r, None), tname) | Option_key (t, tname) -> Option_t (ty_of_comparable_ty t, tname) let add_field_annot a = function @@ -200,18 +201,18 @@ let rec unparse_comparable_ty_uncarbonated : | Timestamp_key _meta -> Prim (loc, T_timestamp, [], []) | Address_key _meta -> Prim (loc, T_address, [], []) | Chain_id_key _meta -> Prim (loc, T_chain_id, [], []) - | Pair_key ((l, al), (r, ar), _meta) -> ( - let tl = add_field_annot al (unparse_comparable_ty_uncarbonated ~loc l) in - let tr = add_field_annot ar (unparse_comparable_ty_uncarbonated ~loc r) in + | Pair_key (l, r, _meta) -> ( + let tl = unparse_comparable_ty_uncarbonated ~loc l in + let tr = unparse_comparable_ty_uncarbonated ~loc r in (* Fold [pair a1 (pair ... (pair an-1 an))] into [pair a1 ... an] *) (* Note that the folding does not happen if the pair on the right has a field annotation because this annotation would be lost *) match tr with | Prim (_, T_pair, ts, []) -> Prim (loc, T_pair, tl :: ts, []) | _ -> Prim (loc, T_pair, [tl; tr], [])) - | Union_key ((l, al), (r, ar), _meta) -> - let tl = add_field_annot al (unparse_comparable_ty_uncarbonated ~loc l) in - let tr = add_field_annot ar (unparse_comparable_ty_uncarbonated ~loc r) in + | Union_key (l, r, _meta) -> + let tl = unparse_comparable_ty_uncarbonated ~loc l in + let tr = unparse_comparable_ty_uncarbonated ~loc r in Prim (loc, T_or, [tl; tr], []) | Option_key (t, _meta) -> Prim (loc, T_option, [unparse_comparable_ty_uncarbonated ~loc t], []) @@ -246,12 +247,10 @@ let rec unparse_ty_uncarbonated : | Contract_t (ut, _meta) -> let t = unparse_ty_uncarbonated ~loc ut in prim (T_contract, [t], []) - | Pair_t ((utl, l_field), (utr, r_field), _meta) -> + | Pair_t (utl, utr, _meta) -> let annot = [] in - let utl = unparse_ty_uncarbonated ~loc utl in - let tl = add_field_annot l_field utl in - let utr = unparse_ty_uncarbonated ~loc utr in - let tr = add_field_annot r_field utr in + let tl = unparse_ty_uncarbonated ~loc utl in + let tr = unparse_ty_uncarbonated ~loc utr in (* Fold [pair a1 (pair ... (pair an-1 an))] into [pair a1 ... an] *) (* Note that the folding does not happen if the pair on the right has an annotation because this annotation would be lost *) @@ -346,14 +345,14 @@ let[@coq_axiom_with_reason "gadt"] rec comparable_ty_of_ty : | Timestamp_t tname -> ok (Timestamp_key tname, ctxt) | Address_t tname -> ok (Address_key tname, ctxt) | Chain_id_t tname -> ok (Chain_id_key tname, ctxt) - | Pair_t ((l, al), (r, ar), pname) -> + | Pair_t (l, r, pname) -> comparable_ty_of_ty ctxt loc l >>? fun (lty, ctxt) -> comparable_ty_of_ty ctxt loc r >|? fun (rty, ctxt) -> - (Pair_key ((lty, al), (rty, ar), pname), ctxt) - | Union_t ((l, al), (r, ar), tname) -> + (Pair_key (lty, rty, pname), ctxt) + | Union_t ((l, _al), (r, _ar), tname) -> comparable_ty_of_ty ctxt loc l >>? fun (lty, ctxt) -> comparable_ty_of_ty ctxt loc r >|? fun (rty, ctxt) -> - (Union_key ((lty, al), (rty, ar), tname), ctxt) + (Union_key (lty, rty, tname), ctxt) | Option_t (tt, tname) -> comparable_ty_of_ty ctxt loc tt >|? fun (ty, ctxt) -> (Option_key (ty, tname), ctxt) @@ -556,7 +555,7 @@ let unparse_option ~loc unparse_v ctxt = function let comparable_comb_witness2 : type t. t comparable_ty -> (t, unit -> unit -> unit) comb_witness = function - | Pair_key (_, (Pair_key _, _), _) -> Comb_Pair (Comb_Pair Comb_Any) + | Pair_key (_, Pair_key _, _) -> Comb_Pair (Comb_Pair Comb_Any) | Pair_key _ -> Comb_Pair Comb_Any | _ -> Comb_Any @@ -594,12 +593,12 @@ let[@coq_axiom_with_reason "gadt"] rec unparse_comparable_data : | (Key_hash_key _, k) -> Lwt.return @@ unparse_key_hash ~loc ctxt mode k | (Chain_id_key _, chain_id) -> Lwt.return @@ unparse_chain_id ~loc ctxt mode chain_id - | (Pair_key ((tl, _), (tr, _), _), pair) -> + | (Pair_key (tl, tr, _), pair) -> let r_witness = comparable_comb_witness2 tr in let unparse_l ctxt v = unparse_comparable_data ~loc ctxt mode tl v in let unparse_r ctxt v = unparse_comparable_data ~loc ctxt mode tr v in unparse_pair ~loc unparse_l unparse_r ctxt mode r_witness pair - | (Union_key ((tl, _), (tr, _), _), v) -> + | (Union_key (tl, tr, _), v) -> let unparse_l ctxt v = unparse_comparable_data ~loc ctxt mode tl v in let unparse_r ctxt v = unparse_comparable_data ~loc ctxt mode tr v in unparse_union ~loc unparse_l unparse_r ctxt v @@ -674,8 +673,7 @@ let check_dupable_ty ctxt loc ty = | Chest_t _ -> return_unit | Chest_key_t _ -> return_unit | Ticket_t _ -> of_result (error (Unexpected_ticket loc)) - | Pair_t ((ty_a, _), (ty_b, _), _) -> - aux loc ty_a >>$ fun () -> aux loc ty_b + | Pair_t (ty_a, ty_b, _) -> aux loc ty_a >>$ fun () -> aux loc ty_b | Union_t ((ty_a, _), (ty_b, _), _) -> aux loc ty_a >>$ fun () -> aux loc ty_b | Lambda_t (_, _, _) -> @@ -752,9 +750,6 @@ let rec merge_comparable_types : let merge_type_metadata meta_a meta_b = of_result @@ merge_type_metadata ~error_details meta_a meta_b in - let merge_field_annot ~legacy annot_a annot_b = - of_result @@ merge_field_annot ~legacy ~error_details annot_a annot_b - in let return f eq annot_a annot_b : ( (ta comparable_ty, tb comparable_ty) eq * ta comparable_ty, error_trace ) @@ -790,34 +785,24 @@ let rec merge_comparable_types : return (fun annot -> Chain_id_key annot) Eq annot_a annot_b | (Address_key annot_a, Address_key annot_b) -> return (fun annot -> Address_key annot) Eq annot_a annot_b - | ( Pair_key ((left_a, annot_left_a), (right_a, annot_right_a), annot_a), - Pair_key ((left_b, annot_left_b), (right_b, annot_right_b), annot_b) ) + | (Pair_key (left_a, right_a, annot_a), Pair_key (left_b, right_b, annot_b)) -> merge_type_metadata annot_a annot_b >>$ fun annot -> - merge_field_annot ~legacy annot_left_a annot_left_b - >>$ fun annot_left -> - merge_field_annot ~legacy annot_right_a annot_right_b - >>$ fun annot_right -> merge_comparable_types ~legacy ~error_details left_a left_b >>$ fun (Eq, left) -> merge_comparable_types ~legacy ~error_details right_a right_b >|$ fun (Eq, right) -> ( (Eq : (ta comparable_ty, tb comparable_ty) eq), - Pair_key ((left, annot_left), (right, annot_right), annot) ) - | ( Union_key ((left_a, annot_left_a), (right_a, annot_right_a), annot_a), - Union_key ((left_b, annot_left_b), (right_b, annot_right_b), annot_b) ) - -> + Pair_key (left, right, annot) ) + | ( Union_key (left_a, right_a, annot_a), + Union_key (left_b, right_b, annot_b) ) -> merge_type_metadata annot_a annot_b >>$ fun annot -> - merge_field_annot ~legacy annot_left_a annot_left_b - >>$ fun annot_left -> - merge_field_annot ~legacy annot_right_a annot_right_b - >>$ fun annot_right -> merge_comparable_types ~legacy ~error_details left_a left_b >>$ fun (Eq, left) -> merge_comparable_types ~legacy ~error_details right_a right_b >|$ fun (Eq, right) -> ( (Eq : (ta comparable_ty, tb comparable_ty) eq), - Union_key ((left, annot_left), (right, annot_right), annot) ) + Union_key (left, right, annot) ) | (Option_key (ta, annot_a), Option_key (tb, annot_b)) -> merge_type_metadata annot_a annot_b >>$ fun annot -> merge_comparable_types ~legacy ~error_details ta tb >|$ fun (Eq, t) -> @@ -958,15 +943,11 @@ let merge_types : merge_type_metadata tn1 tn2 >>$ fun tname -> merge_comparable_types ~legacy ~error_details ea eb >|$ fun (Eq, e) -> ((Eq : (ta ty, tb ty) eq), Ticket_t (e, tname)) - | ( Pair_t ((tal, l_field1), (tar, r_field1), tn1), - Pair_t ((tbl, l_field2), (tbr, r_field2), tn2) ) -> + | (Pair_t (tal, tar, tn1), Pair_t (tbl, tbr, tn2)) -> merge_type_metadata tn1 tn2 >>$ fun tname -> - merge_field_annot ~legacy l_field1 l_field2 >>$ fun l_field -> - merge_field_annot ~legacy r_field1 r_field2 >>$ fun r_field -> help tal tbl >>$ fun (Eq, left_ty) -> help tar tbr >|$ fun (Eq, right_ty) -> - ( (Eq : (ta ty, tb ty) eq), - Pair_t ((left_ty, l_field), (right_ty, r_field), tname) ) + ((Eq : (ta ty, tb ty) eq), Pair_t (left_ty, right_ty, tname)) | ( Union_t ((tal, tal_annot), (tar, tar_annot), tn1), Union_t ((tbl, tbl_annot), (tbr, tbr_annot), tn2) ) -> merge_type_metadata tn1 tn2 >>$ fun tname -> @@ -1198,29 +1179,27 @@ let[@coq_struct "ty"] rec parse_comparable_ty : error (Invalid_arity (loc, prim, 0, List.length l)) | Prim (loc, T_pair, left :: right, annot) -> check_type_annot loc annot >>? fun () -> - extract_field_annot left >>? fun (left, left_annot) -> + extract_field_annot left >>? fun (left, _left_annot) -> (match right with | [right] -> extract_field_annot right | right -> (* Unfold [pair t1 ... tn] as [pair t1 (... (pair tn-1 tn))] *) ok (Prim (loc, T_pair, right, []), None)) - >>? fun (right, right_annot) -> + >>? fun (right, _right_annot) -> parse_comparable_ty ~stack_depth:(stack_depth + 1) ctxt right >>? fun (Ex_comparable_ty right, ctxt) -> parse_comparable_ty ~stack_depth:(stack_depth + 1) ctxt left >>? fun (Ex_comparable_ty left, ctxt) -> - pair_key loc (left, left_annot) (right, right_annot) >|? fun ty -> - (Ex_comparable_ty ty, ctxt) + pair_key loc left right >|? fun ty -> (Ex_comparable_ty ty, ctxt) | Prim (loc, T_or, [left; right], annot) -> check_type_annot loc annot >>? fun () -> - extract_field_annot left >>? fun (left, left_annot) -> - extract_field_annot right >>? fun (right, right_annot) -> + extract_field_annot left >>? fun (left, _left_annot) -> + extract_field_annot right >>? fun (right, _right_annot) -> parse_comparable_ty ~stack_depth:(stack_depth + 1) ctxt right >>? fun (Ex_comparable_ty right, ctxt) -> parse_comparable_ty ~stack_depth:(stack_depth + 1) ctxt left >>? fun (Ex_comparable_ty left, ctxt) -> - union_key loc (left, left_annot) (right, right_annot) >|? fun ty -> - (Ex_comparable_ty ty, ctxt) + union_key loc left right >|? fun ty -> (Ex_comparable_ty ty, ctxt) | Prim (loc, ((T_pair | T_or) as prim), l, _) -> error (Invalid_arity (loc, prim, 2, List.length l)) | Prim (loc, T_option, [t], annot) -> @@ -1440,7 +1419,7 @@ and[@coq_axiom_with_reason "complex mutually recursive definition"] parse_ty : contract_t loc tl >|? fun ty -> (Ex_ty ty, ctxt) else error (Unexpected_contract loc) | Prim (loc, T_pair, utl :: utr, annot) -> - extract_field_annot utl >>? fun (utl, left_field) -> + extract_field_annot utl >>? fun (utl, _left_field) -> parse_ty ctxt ~stack_depth:(stack_depth + 1) @@ -1456,7 +1435,7 @@ and[@coq_axiom_with_reason "complex mutually recursive definition"] parse_ty : | utr -> (* Unfold [pair t1 ... tn] as [pair t1 (... (pair tn-1 tn))] *) ok (Prim (loc, T_pair, utr, []), None)) - >>? fun (utr, right_field) -> + >>? fun (utr, _right_field) -> parse_ty ctxt ~stack_depth:(stack_depth + 1) @@ -1468,8 +1447,7 @@ and[@coq_axiom_with_reason "complex mutually recursive definition"] parse_ty : utr >>? fun (Ex_ty tr, ctxt) -> check_type_annot loc annot >>? fun () -> - pair_t loc (tl, left_field) (tr, right_field) >|? fun ty -> - (Ex_ty ty, ctxt) + pair_t loc tl tr >|? fun ty -> (Ex_ty ty, ctxt) | Prim (loc, T_or, [utl; utr], annot) -> extract_field_annot utl >>? fun (utl, left_constr) -> extract_field_annot utr >>? fun (utr, right_constr) -> @@ -1507,7 +1485,7 @@ and[@coq_axiom_with_reason "complex mutually recursive definition"] parse_ty : (if legacy then (* legacy semantics with (broken) field annotations *) extract_field_annot ut >>? fun (ut, _some_constr) -> - parse_composed_type_annot loc annot >>? fun (_none_constr, _) -> ok ut + check_composed_type_annot loc annot >>? fun () -> ok ut else check_type_annot loc annot >>? fun () -> ok ut) >>? fun ut -> parse_ty @@ -1698,10 +1676,9 @@ let parse_storage_ty : ~legacy remaining_storage >>? fun (Ex_ty remaining_storage, ctxt) -> - parse_composed_type_annot loc storage_annot - >>? fun (map_field, storage_field) -> - pair_t loc (big_map_ty, map_field) (remaining_storage, storage_field) - >|? fun ty -> (Ex_ty ty, ctxt)) + check_composed_type_annot loc storage_annot >>? fun () -> + pair_t loc big_map_ty remaining_storage >|? fun ty -> (Ex_ty ty, ctxt) + ) | _ -> (parse_normal_storage_ty [@tailcall]) ctxt ~stack_depth ~legacy node let check_packable ~legacy loc root = @@ -1731,7 +1708,7 @@ let check_packable ~legacy loc root = | Bls12_381_g1_t _ -> Result.return_unit | Bls12_381_g2_t _ -> Result.return_unit | Bls12_381_fr_t _ -> Result.return_unit - | Pair_t ((l_ty, _), (r_ty, _), _) -> check l_ty >>? fun () -> check r_ty + | Pair_t (l_ty, r_ty, _) -> check l_ty >>? fun () -> check r_ty | Union_t ((l_ty, _), (r_ty, _), _) -> check l_ty >>? fun () -> check r_ty | Option_t (v_ty, _) -> check v_ty | List_t (elt_ty, _) -> check elt_ty @@ -1961,8 +1938,7 @@ let parse_uint11 = parse_uint ~nb_bits:11 (* This type is used to: - serialize and deserialize tickets when they are stored or transferred, - type the READ_TICKET instruction. *) -let opened_ticket_type loc ty = - pair_3_key loc (address_key, None) (ty, None) (nat_key, None) +let opened_ticket_type loc ty = pair_3_key loc address_key ty nat_key (* -- parse data of primitive types -- *) @@ -2289,12 +2265,12 @@ let[@coq_axiom_with_reason "gadt"] rec parse_comparable_data : Lwt.return @@ traced_no_lwt @@ parse_chain_id ctxt expr | (Address_key _, expr) -> Lwt.return @@ traced_no_lwt @@ parse_address ctxt expr - | (Pair_key ((tl, _), (tr, _), _), expr) -> + | (Pair_key (tl, tr, _), expr) -> let r_witness = comparable_comb_witness1 tr in let parse_l ctxt v = parse_comparable_data ?type_logger ctxt tl v in let parse_r ctxt v = parse_comparable_data ?type_logger ctxt tr v in traced @@ parse_pair parse_l parse_r ctxt ~legacy r_witness expr - | (Union_key ((tl, _), (tr, _), _), expr) -> + | (Union_key (tl, tr, _), expr) -> let parse_l ctxt v = parse_comparable_data ?type_logger ctxt tl v in let parse_r ctxt v = parse_comparable_data ?type_logger ctxt tr v in traced @@ parse_union parse_l parse_r ctxt ~legacy expr @@ -2506,7 +2482,7 @@ let[@coq_axiom_with_reason "gadt"] rec parse_data : ~entrypoint:address.entrypoint >|=? fun (ctxt, _) -> ({arg_ty; address}, ctxt) ) (* Pairs *) - | (Pair_t ((tl, _), (tr, _), _), expr) -> + | (Pair_t (tl, tr, _), expr) -> let r_witness = comb_witness1 tr in let parse_l ctxt v = non_terminal_recursion ?type_logger ctxt ~legacy tl v @@ -2761,7 +2737,7 @@ and parse_view_returning : (Some "return of view", strip_locations output_ty, output_ty_loc)) (parse_view_output_ty ctxt ~stack_depth:0 ~legacy output_ty) >>?= fun (Ex_ty output_ty', ctxt) -> - pair_t input_ty_loc (input_ty', None) (storage_type, None) >>?= fun pair_ty -> + pair_t input_ty_loc input_ty' storage_type >>?= fun pair_ty -> parse_instr ?type_logger ~stack_depth:0 @@ -3138,8 +3114,8 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : Lwt.return @@ merge_branches ~legacy ctxt loc btr bfr {branch} (* pairs *) | (Prim (loc, I_PAIR, [], annot), Item_t (a, Item_t (b, rest))) -> - parse_constr_annot loc annot >>?= fun (l_field, r_field) -> - pair_t loc (a, l_field) (b, r_field) >>?= fun ty -> + parse_constr_annot loc annot >>?= fun (_l_field, _r_field) -> + pair_t loc a b >>?= fun ty -> let stack_ty = Item_t (ty, rest) in let cons_pair = {apply = (fun kinfo k -> ICons_pair (kinfo, k))} in typed ctxt loc cons_pair stack_ty @@ -3156,7 +3132,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : make_proof_argument (n - 1) tl_ty >>? fun (Comb_proof_argument (comb_witness, Item_t (b_ty, tl_ty'))) -> - pair_t loc (a_ty, None) (b_ty, None) >|? fun pair_t -> + pair_t loc a_ty b_ty >|? fun pair_t -> Comb_proof_argument (Comb_succ comb_witness, Item_t (pair_t, tl_ty')) | _ -> let whole_stack = serialize_stack_for_error ctxt stack_ty in @@ -3179,7 +3155,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : match (n, stack_ty) with | (1, Item_t (a_ty, tl_ty)) -> ok @@ Uncomb_proof_argument (Uncomb_one, Item_t (a_ty, tl_ty)) - | (n, Item_t (Pair_t ((a_ty, _), (b_ty, _), _), tl_ty)) -> + | (n, Item_t (Pair_t (a_ty, b_ty, _), tl_ty)) -> make_proof_argument (n - 1) (Item_t (b_ty, tl_ty)) >|? fun (Uncomb_proof_argument (uncomb_witness, after_ty)) -> Uncomb_proof_argument @@ -3204,9 +3180,9 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : match (n, ty) with | (0, value_ty) -> ok @@ Comb_get_proof_argument (Comb_get_zero, value_ty) - | (1, Pair_t ((hd_ty, _at1), _, _annot)) -> + | (1, Pair_t (hd_ty, _, _annot)) -> ok @@ Comb_get_proof_argument (Comb_get_one, hd_ty) - | (n, Pair_t (_, (tl_ty, _bt1), _annot)) -> + | (n, Pair_t (_, tl_ty, _annot)) -> make_proof_argument (n - 2) tl_ty >|? fun (Comb_get_proof_argument (comb_get_left_witness, ty')) -> Comb_get_proof_argument @@ -3236,13 +3212,13 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : fun n value_ty ty -> match (n, ty) with | (0, _) -> ok @@ Comb_set_proof_argument (Comb_set_zero, value_ty) - | (1, Pair_t ((_hd_ty, at1), (tl_ty, bt1), _)) -> - pair_t loc (value_ty, at1) (tl_ty, bt1) >|? fun after_ty -> + | (1, Pair_t (_hd_ty, tl_ty, _)) -> + pair_t loc value_ty tl_ty >|? fun after_ty -> Comb_set_proof_argument (Comb_set_one, after_ty) - | (n, Pair_t ((hd_ty, at1), (tl_ty, bt1), _)) -> + | (n, Pair_t (hd_ty, tl_ty, _)) -> make_proof_argument (n - 2) value_ty tl_ty >>? fun (Comb_set_proof_argument (comb_set_left_witness, tl_ty')) -> - pair_t loc (hd_ty, at1) (tl_ty', bt1) >|? fun after_ty -> + pair_t loc hd_ty tl_ty' >|? fun after_ty -> Comb_set_proof_argument (Comb_set_plus_two comb_set_left_witness, after_ty) | _ -> @@ -3258,25 +3234,16 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : {apply = (fun kinfo k -> IComb_set (kinfo, n, witness, k))} in typed ctxt loc comb_set after_stack_ty - | ( Prim (loc, I_UNPAIR, [], annot), - Item_t - ( Pair_t ((a, expected_field_annot_a), (b, expected_field_annot_b), _), - rest ) ) -> - parse_unpair_annot loc annot >>?= fun (field_a, field_b) -> - check_correct_field field_a expected_field_annot_a >>?= fun () -> - check_correct_field field_b expected_field_annot_b >>?= fun () -> + | (Prim (loc, I_UNPAIR, [], annot), Item_t (Pair_t (a, b, _), rest)) -> + check_unpair_annot loc annot >>?= fun () -> let unpair = {apply = (fun kinfo k -> IUnpair (kinfo, k))} in typed ctxt loc unpair (Item_t (a, Item_t (b, rest))) - | ( Prim (loc, I_CAR, [], annot), - Item_t (Pair_t ((a, expected_field_annot), _, _), rest) ) -> - parse_destr_annot loc annot >>?= fun field_annot -> - check_correct_field field_annot expected_field_annot >>?= fun () -> + | (Prim (loc, I_CAR, [], annot), Item_t (Pair_t (a, _, _), rest)) -> + check_destr_annot loc annot >>?= fun () -> let car = {apply = (fun kinfo k -> ICar (kinfo, k))} in typed ctxt loc car (Item_t (a, rest)) - | ( Prim (loc, I_CDR, [], annot), - Item_t (Pair_t (_, (b, expected_field_annot), _), rest) ) -> - parse_destr_annot loc annot >>?= fun field_annot -> - check_correct_field field_annot expected_field_annot >>?= fun () -> + | (Prim (loc, I_CDR, [], annot), Item_t (Pair_t (_, b, _), rest)) -> + check_destr_annot loc annot >>?= fun () -> let cdr = {apply = (fun kinfo k -> ICdr (kinfo, k))} in typed ctxt loc cdr (Item_t (b, rest)) (* unions *) @@ -3532,7 +3499,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : let k = ty_of_comparable_ty ck in check_kind [Seq_kind] body >>?= fun () -> check_var_type_annot loc annot >>?= fun () -> - pair_t loc (k, None) (elt, None) >>?= fun ty -> + pair_t loc k elt >>?= fun ty -> non_terminal_recursion ?type_logger tc_context @@ -3577,7 +3544,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : check_kind [Seq_kind] body >>?= fun () -> error_unexpected_annot loc annot >>?= fun () -> let key = ty_of_comparable_ty comp_elt in - pair_t loc (key, None) (element_ty, None) >>?= fun ty -> + pair_t loc key element_ty >>?= fun ty -> non_terminal_recursion ?type_logger tc_context @@ -3740,7 +3707,7 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : let instr = {apply = (fun kinfo k -> ISapling_verify_update (kinfo, k))} in - pair_t loc (int_t, None) (state_ty, None) >>?= fun pair_ty -> + pair_t loc int_t state_ty >>?= fun pair_ty -> option_t loc pair_ty >>?= fun ty -> let stack = Item_t (ty, rest) in typed ctxt loc instr stack @@ -3919,9 +3886,8 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : | ( Prim (loc, I_APPLY, [], annot), Item_t ( capture, - Item_t - (Lambda_t (Pair_t ((capture_ty, _), (arg_ty, _), _), ret, _), rest) - ) ) -> + Item_t (Lambda_t (Pair_t (capture_ty, arg_ty, _), ret, _), rest) ) ) + -> check_packable ~legacy:false loc capture_ty >>?= fun () -> check_item_ty ctxt capture capture_ty loc I_APPLY 1 2 >>?= fun (Eq, capture_ty, ctxt) -> @@ -4505,9 +4471,8 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : ~legacy storage_type) >>?= fun (Ex_ty storage_type, ctxt) -> - pair_t loc (arg_type, None) (storage_type, None) >>?= fun arg_type_full -> - pair_t loc (list_operation_t, None) (storage_type, None) - >>?= fun ret_type_full -> + pair_t loc arg_type storage_type >>?= fun arg_type_full -> + pair_t loc list_operation_t storage_type >>?= fun ret_type_full -> trace (Ill_typed_contract (canonical_code, [])) (parse_returning @@ -4749,9 +4714,8 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : let stack = Item_t (Bls12_381_fr_t tname, rest) in typed ctxt loc instr stack | ( Prim (loc, I_PAIRING_CHECK, [], annot), - Item_t - ( List_t (Pair_t ((Bls12_381_g1_t _, _), (Bls12_381_g2_t _, _), _), _), - rest ) ) -> + Item_t (List_t (Pair_t (Bls12_381_g1_t _, Bls12_381_g2_t _, _), _), rest) + ) -> check_var_annot loc annot >>?= fun () -> let instr = {apply = (fun kinfo k -> IPairing_check_bls12_381 (kinfo, k))} @@ -4778,18 +4742,17 @@ and[@coq_axiom_with_reason "gadt"] parse_instr : | ( Prim (loc, I_SPLIT_TICKET, [], annot), Item_t ( (Ticket_t (t, _) as ticket_t), - Item_t (Pair_t ((Nat_t _, fa_a), (Nat_t _, fa_b), _), rest) ) ) -> + Item_t (Pair_t (Nat_t _, Nat_t _, _), rest) ) ) -> check_var_annot loc annot >>?= fun () -> let () = check_dupable_comparable_ty t in - pair_t loc (ticket_t, fa_a) (ticket_t, fa_b) >>?= fun pair_tickets_ty -> + pair_t loc ticket_t ticket_t >>?= fun pair_tickets_ty -> option_t loc pair_tickets_ty >>?= fun res_ty -> let instr = {apply = (fun kinfo k -> ISplit_ticket (kinfo, k))} in let stack = Item_t (res_ty, rest) in typed ctxt loc instr stack | ( Prim (loc, I_JOIN_TICKETS, [], annot), - Item_t - (Pair_t (((Ticket_t _ as ty_a), _), ((Ticket_t _ as ty_b), _), _), rest) - ) -> ( + Item_t (Pair_t ((Ticket_t _ as ty_a), (Ticket_t _ as ty_b), _), rest) ) + -> ( check_var_annot loc annot >>?= fun () -> Gas_monad.run ctxt @@ merge_types ~legacy ~error_details:Informative loc ty_a ty_b @@ -5283,9 +5246,8 @@ let parse_code : (Ill_formed_type (Some "storage", code, storage_type_loc)) (parse_storage_ty ctxt ~stack_depth:0 ~legacy storage_type) >>?= fun (Ex_ty storage_type, ctxt) -> - pair_t storage_type_loc (arg_type, None) (storage_type, None) - >>?= fun arg_type_full -> - pair_t storage_type_loc (list_operation_t, None) (storage_type, None) + pair_t storage_type_loc arg_type storage_type >>?= fun arg_type_full -> + pair_t storage_type_loc list_operation_t storage_type >>?= fun ret_type_full -> trace (Ill_typed_contract (code, [])) @@ -5394,9 +5356,8 @@ let typecheck_code : (Ill_formed_type (Some "storage", code, storage_type_loc)) (parse_storage_ty ctxt ~stack_depth:0 ~legacy storage_type) >>?= fun (Ex_ty storage_type, ctxt) -> - pair_t storage_type_loc (arg_type, None) (storage_type, None) - >>?= fun arg_type_full -> - pair_t storage_type_loc (list_operation_t, None) (storage_type, None) + pair_t storage_type_loc arg_type storage_type >>?= fun arg_type_full -> + pair_t storage_type_loc list_operation_t storage_type >>?= fun ret_type_full -> let type_logger loc bef aft = type_map := (loc, (bef, aft)) :: !type_map in let type_logger = if show_types then Some type_logger else None in @@ -5495,7 +5456,7 @@ let list_entrypoints (type full) (full : full ty) ctxt ~root_name = let comb_witness2 : type t. t ty -> (t, unit -> unit -> unit) comb_witness = function - | Pair_t (_, (Pair_t _, _), _) -> Comb_Pair (Comb_Pair Comb_Any) + | Pair_t (_, Pair_t _, _) -> Comb_Pair (Comb_Pair Comb_Any) | Pair_t _ -> Comb_Pair Comb_Any | _ -> Comb_Any @@ -5538,7 +5499,7 @@ let[@coq_axiom_with_reason "gadt"] rec unparse_data : | (Bls12_381_g1_t _, x) -> Lwt.return @@ unparse_bls12_381_g1 ~loc ctxt x | (Bls12_381_g2_t _, x) -> Lwt.return @@ unparse_bls12_381_g2 ~loc ctxt x | (Bls12_381_fr_t _, x) -> Lwt.return @@ unparse_bls12_381_fr ~loc ctxt x - | (Pair_t ((tl, _), (tr, _), _), pair) -> + | (Pair_t (tl, tr, _), pair) -> let r_witness = comb_witness2 tr in let unparse_l ctxt v = non_terminal_recursion ctxt mode tl v in let unparse_r ctxt v = non_terminal_recursion ctxt mode tr v in @@ -6018,7 +5979,7 @@ let rec has_lazy_storage : type t. t ty -> t has_lazy_storage = | Ticket_t _ -> False_f | Chest_key_t _ -> False_f | Chest_t _ -> False_f - | Pair_t ((l, _), (r, _), _) -> aux2 (fun l r -> Pair_f (l, r)) l r + | Pair_t (l, r, _) -> aux2 (fun l r -> Pair_f (l, r)) l r | Union_t ((l, _), (r, _), _) -> aux2 (fun l r -> Union_f (l, r)) l r | Option_t (t, _) -> aux1 (fun h -> Option_f h) t | List_t (t, _) -> aux1 (fun h -> List_f h) t @@ -6071,7 +6032,7 @@ let[@coq_axiom_with_reason "gadt"] extract_lazy_storage_updates ctxt mode let diff = Lazy_storage.make Sapling_state id diff in let ids_to_copy = Lazy_storage.IdSet.add Sapling_state id ids_to_copy in (ctxt, sapling_state, ids_to_copy, diff :: acc) - | (Pair_f (hl, hr), Pair_t ((tyl, _), (tyr, _), _), (xl, xr)) -> + | (Pair_f (hl, hr), Pair_t (tyl, tyr, _), (xl, xr)) -> aux ctxt mode ~temporary ids_to_copy acc tyl xl ~has_lazy_storage:hl >>=? fun (ctxt, xl, ids_to_copy, acc) -> aux ctxt mode ~temporary ids_to_copy acc tyr xr ~has_lazy_storage:hr @@ -6167,7 +6128,7 @@ let[@coq_axiom_with_reason "gadt"] rec fold_lazy_storage : ok (Fold_lazy_storage.Ok init, ctxt) | (Sapling_state_f, Sapling_state_t _, {id = None; _}) -> ok (Fold_lazy_storage.Ok init, ctxt) - | (Pair_f (hl, hr), Pair_t ((tyl, _), (tyr, _), _), (xl, xr)) -> ( + | (Pair_f (hl, hr), Pair_t (tyl, tyr, _), (xl, xr)) -> ( fold_lazy_storage ~f ~init ctxt tyl xl ~has_lazy_storage:hl >>? fun (init, ctxt) -> match init with diff --git a/src/proto_alpha/lib_protocol/script_tc_errors.ml b/src/proto_alpha/lib_protocol/script_tc_errors.ml index f75694fe81040f16dbbad81b947afa57bc3753a6..b75572cae9c4b109e8226dfde73ea89211cd7939 100644 --- a/src/proto_alpha/lib_protocol/script_tc_errors.ml +++ b/src/proto_alpha/lib_protocol/script_tc_errors.ml @@ -119,8 +119,6 @@ type error += Script.location * Script.expr * Script.expr -> error -type error += Inconsistent_field_annotations of string * string - type error += Unexpected_annotation of Script.location type error += Ungrouped_annotations of Script.location diff --git a/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml b/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml index fee39265d22477e298277cfb2c67dc86ff54940d..26e5b3a9e4226368244153a2d48c0b1400352e4f 100644 --- a/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml +++ b/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml @@ -376,18 +376,6 @@ let () = | Inconsistent_annotations (annot1, annot2) -> Some (annot1, annot2) | _ -> None) (fun (annot1, annot2) -> Inconsistent_annotations (annot1, annot2)) ; - (* Inconsistent field annotations *) - register_error_kind - `Permanent - ~id:"michelson_v1.inconsistent_field_annotations" - ~title:"Annotations for field accesses is inconsistent" - ~description: - "The specified field does not match the field annotation in the type" - (obj2 (req "annot1" string) (req "annot2" string)) - (function - | Inconsistent_field_annotations (annot1, annot2) -> Some (annot1, annot2) - | _ -> None) - (fun (annot1, annot2) -> Inconsistent_field_annotations (annot1, annot2)) ; (* Inconsistent type annotations *) register_error_kind `Permanent diff --git a/src/proto_alpha/lib_protocol/script_typed_ir.ml b/src/proto_alpha/lib_protocol/script_typed_ir.ml index 3d22feafec8c94ff191aedb2887bb857b1a0e517..41611a5e574284fe743314f8957d0b4f126a2da5 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir.ml +++ b/src/proto_alpha/lib_protocol/script_typed_ir.ml @@ -332,14 +332,10 @@ type _ comparable_ty = -> Script_chain_id.t comparable_ty | Address_key : address ty_metadata -> address comparable_ty | Pair_key : - ('a comparable_ty * field_annot option) - * ('b comparable_ty * field_annot option) - * ('a, 'b) pair ty_metadata + 'a comparable_ty * 'b comparable_ty * ('a, 'b) pair ty_metadata -> ('a, 'b) pair comparable_ty | Union_key : - ('a comparable_ty * field_annot option) - * ('b comparable_ty * field_annot option) - * ('a, 'b) union ty_metadata + 'a comparable_ty * 'b comparable_ty * ('a, 'b) union ty_metadata -> ('a, 'b) union comparable_ty | Option_key : 'v comparable_ty * 'v option ty_metadata @@ -394,15 +390,15 @@ let chain_id_key = Chain_id_key {size = Type_size.one} let address_key = Address_key {size = Type_size.one} -let pair_key loc (l, fannot_l) (r, fannot_r) = +let pair_key loc l r = Type_size.compound2 loc (comparable_ty_size l) (comparable_ty_size r) - >|? fun size -> Pair_key ((l, fannot_l), (r, fannot_r), {size}) + >|? fun size -> Pair_key (l, r, {size}) -let pair_3_key loc l m r = pair_key loc m r >>? fun r -> pair_key loc l (r, None) +let pair_3_key loc l m r = pair_key loc m r >>? fun r -> pair_key loc l r -let union_key loc (l, fannot_l) (r, fannot_r) = +let union_key loc l r = Type_size.compound2 loc (comparable_ty_size l) (comparable_ty_size r) - >|? fun size -> Union_key ((l, fannot_l), (r, fannot_r), {size}) + >|? fun size -> Union_key (l, r, {size}) let option_key loc t = Type_size.compound1 loc (comparable_ty_size t) >|? fun size -> @@ -1292,11 +1288,7 @@ and 'ty ty = | Timestamp_t : Script_timestamp.t ty_metadata -> Script_timestamp.t ty | Address_t : address ty_metadata -> address ty | Bool_t : bool ty_metadata -> bool ty - | Pair_t : - ('a ty * field_annot option) - * ('b ty * field_annot option) - * ('a, 'b) pair ty_metadata - -> ('a, 'b) pair ty + | Pair_t : 'a ty * 'b ty * ('a, 'b) pair ty_metadata -> ('a, 'b) pair ty | Union_t : ('a ty * field_annot option) * ('b ty * field_annot option) @@ -1835,9 +1827,9 @@ let address_t = Address_t {size = Type_size.one} let bool_t = Bool_t {size = Type_size.one} -let pair_t loc (l, fannot_l) (r, fannot_r) = +let pair_t loc l r = Type_size.compound2 loc (ty_size l) (ty_size r) >|? fun size -> - Pair_t ((l, fannot_l), (r, fannot_r), {size}) + Pair_t (l, r, {size}) let union_t loc (l, fannot_l) (r, fannot_r) = Type_size.compound2 loc (ty_size l) (ty_size r) >|? fun size -> @@ -1863,23 +1855,20 @@ let option_nat_t = Option_t (nat_t, {size = Type_size.two}) let option_pair_nat_nat_t = Option_t - ( Pair_t ((nat_t, None), (nat_t, None), {size = Type_size.three}), - {size = Type_size.four} ) + (Pair_t (nat_t, nat_t, {size = Type_size.three}), {size = Type_size.four}) let option_pair_nat_mutez_t = Option_t - ( Pair_t ((nat_t, None), (mutez_t, None), {size = Type_size.three}), - {size = Type_size.four} ) + (Pair_t (nat_t, mutez_t, {size = Type_size.three}), {size = Type_size.four}) let option_pair_mutez_mutez_t = Option_t - ( Pair_t ((mutez_t, None), (mutez_t, None), {size = Type_size.three}), + ( Pair_t (mutez_t, mutez_t, {size = Type_size.three}), {size = Type_size.four} ) let option_pair_int_nat_t = Option_t - ( Pair_t ((int_t, None), (nat_t, None), {size = Type_size.three}), - {size = Type_size.four} ) + (Pair_t (int_t, nat_t, {size = Type_size.three}), {size = Type_size.four}) let list_t loc t = Type_size.compound1 loc (ty_size t) >|? fun size -> List_t (t, {size}) @@ -2142,8 +2131,8 @@ let (ty_traverse, comparable_ty_traverse) = | Bytes_key _ | Mutez_key _ | Key_hash_key _ | Key_key _ | Timestamp_key _ | Address_key _ | Bool_key _ | Chain_id_key _ | Never_key _ -> (return [@ocaml.tailcall]) () - | Pair_key ((ty1, _), (ty2, _), _) -> (next2 [@ocaml.tailcall]) ty1 ty2 - | Union_key ((ty1, _), (ty2, _), _) -> (next2 [@ocaml.tailcall]) ty1 ty2 + | Pair_key (ty1, ty2, _) -> (next2 [@ocaml.tailcall]) ty1 ty2 + | Union_key (ty1, ty2, _) -> (next2 [@ocaml.tailcall]) ty1 ty2 | Option_key (ty, _) -> (next [@ocaml.tailcall]) ty and aux' : type ret t accu. accu ty_traverse -> accu -> t ty -> (accu -> ret) -> ret @@ -2161,8 +2150,7 @@ let (ty_traverse, comparable_ty_traverse) = (continue [@ocaml.tailcall]) accu | Ticket_t (cty, _) -> aux f accu cty continue | Chest_key_t _ | Chest_t _ -> (continue [@ocaml.tailcall]) accu - | Pair_t ((ty1, _), (ty2, _), _) -> - (next2' [@ocaml.tailcall]) f accu ty1 ty2 continue + | Pair_t (ty1, ty2, _) -> (next2' [@ocaml.tailcall]) f accu ty1 ty2 continue | Union_t ((ty1, _), (ty2, _), _) -> (next2' [@ocaml.tailcall]) f accu ty1 ty2 continue | Lambda_t (ty1, ty2, _) -> @@ -2243,8 +2231,7 @@ let value_traverse (type t) (ty : (t ty, t comparable_ty) union) (x : t) init f | Bls12_381_g2_t _ | Bls12_381_fr_t _ | Chest_key_t _ | Chest_t _ | Lambda_t (_, _, _) -> (return [@ocaml.tailcall]) () - | Pair_t ((ty1, _), (ty2, _), _) -> - (next2 [@ocaml.tailcall]) ty1 ty2 (fst x) (snd x) + | Pair_t (ty1, ty2, _) -> (next2 [@ocaml.tailcall]) ty1 ty2 (fst x) (snd x) | Union_t ((ty1, _), (ty2, _), _) -> ( match x with | L l -> (next [@ocaml.tailcall]) ty1 l @@ -2306,9 +2293,9 @@ let value_traverse (type t) (ty : (t ty, t comparable_ty) union) (x : t) init f | Bytes_key _ | Mutez_key _ | Key_hash_key _ | Key_key _ | Timestamp_key _ | Address_key _ | Bool_key _ | Chain_id_key _ | Never_key _ -> (return [@ocaml.tailcall]) () - | Pair_key ((ty1, _), (ty2, _), _) -> + | Pair_key (ty1, ty2, _) -> (next2 [@ocaml.tailcall]) ty1 ty2 (fst x) (snd x) - | Union_key ((ty1, _), (ty2, _), _) -> ( + | Union_key (ty1, ty2, _) -> ( match x with | L l -> (next [@ocaml.tailcall]) ty1 l | R r -> (next [@ocaml.tailcall]) ty2 r) diff --git a/src/proto_alpha/lib_protocol/script_typed_ir.mli b/src/proto_alpha/lib_protocol/script_typed_ir.mli index 4f1225e63d3c86a28a34cd03205f52263cf7d32d..8b54a5d6dab5c0a99f0591146735aa7a11c8137c 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir.mli +++ b/src/proto_alpha/lib_protocol/script_typed_ir.mli @@ -210,14 +210,10 @@ type _ comparable_ty = -> Script_chain_id.t comparable_ty | Address_key : address ty_metadata -> address comparable_ty | Pair_key : - ('a comparable_ty * field_annot option) - * ('b comparable_ty * field_annot option) - * ('a, 'b) pair ty_metadata + 'a comparable_ty * 'b comparable_ty * ('a, 'b) pair ty_metadata -> ('a, 'b) pair comparable_ty | Union_key : - ('a comparable_ty * field_annot option) - * ('b comparable_ty * field_annot option) - * ('a, 'b) union ty_metadata + 'a comparable_ty * 'b comparable_ty * ('a, 'b) union ty_metadata -> ('a, 'b) union comparable_ty | Option_key : 'v comparable_ty * 'v option ty_metadata @@ -253,21 +249,21 @@ val address_key : address comparable_ty val pair_key : Script.location -> - 'a comparable_ty * field_annot option -> - 'b comparable_ty * field_annot option -> + 'a comparable_ty -> + 'b comparable_ty -> ('a, 'b) pair comparable_ty tzresult val pair_3_key : Script.location -> - 'a comparable_ty * field_annot option -> - 'b comparable_ty * field_annot option -> - 'c comparable_ty * field_annot option -> + 'a comparable_ty -> + 'b comparable_ty -> + 'c comparable_ty -> ('a, ('b, 'c) pair) pair comparable_ty tzresult val union_key : Script.location -> - 'a comparable_ty * field_annot option -> - 'b comparable_ty * field_annot option -> + 'a comparable_ty -> + 'b comparable_ty -> ('a, 'b) union comparable_ty tzresult val option_key : @@ -1371,11 +1367,7 @@ and 'ty ty = | Timestamp_t : Script_timestamp.t ty_metadata -> Script_timestamp.t ty | Address_t : address ty_metadata -> address ty | Bool_t : bool ty_metadata -> bool ty - | Pair_t : - ('a ty * field_annot option) - * ('b ty * field_annot option) - * ('a, 'b) pair ty_metadata - -> ('a, 'b) pair ty + | Pair_t : 'a ty * 'b ty * ('a, 'b) pair ty_metadata -> ('a, 'b) pair ty | Union_t : ('a ty * field_annot option) * ('b ty * field_annot option) @@ -1560,11 +1552,7 @@ val address_t : address ty val bool_t : bool ty -val pair_t : - Script.location -> - 'a ty * field_annot option -> - 'b ty * field_annot option -> - ('a, 'b) pair ty tzresult +val pair_t : Script.location -> 'a ty -> 'b ty -> ('a, 'b) pair ty tzresult val union_t : Script.location -> diff --git a/src/proto_alpha/lib_protocol/script_typed_ir_size.ml b/src/proto_alpha/lib_protocol/script_typed_ir_size.ml index bd50d9f0cbb468f5b3b5862b0267c36cd5f2294b..ee5a35531fe2fcb1f08a2855c0aadd7b9720db41 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir_size.ml +++ b/src/proto_alpha/lib_protocol/script_typed_ir_size.ml @@ -58,10 +58,10 @@ let (comparable_ty_size, ty_size) = | Bool_key a -> ret_succ_adding accu (base_basic a) | Chain_id_key a -> ret_succ_adding accu (base_basic a) | Never_key a -> ret_succ_adding accu (base_basic a) - | Pair_key ((_ty1, _fa1), (_ty2, _fa2), a) -> - ret_succ_adding accu @@ (base_compound a +! hh6w) - | Union_key ((_ty1, _fa1), (_ty2, _fa2), a) -> - ret_succ_adding accu @@ (base_compound a +! hh6w) + | Pair_key (_ty1, _ty2, a) -> + ret_succ_adding accu @@ (base_compound a +! (word_size *? 2)) + | Union_key (_ty1, _ty2, a) -> + ret_succ_adding accu @@ (base_compound a +! (word_size *? 2)) | Option_key (_ty, a) -> ret_succ_adding accu @@ (base_compound a +! word_size) and apply : type a. nodes_and_size -> a ty -> nodes_and_size = @@ -87,8 +87,8 @@ let (comparable_ty_size, ty_size) = | Bls12_381_fr_t a -> ret_succ_adding accu @@ base_basic a | Chest_key_t a -> ret_succ_adding accu @@ base_basic a | Chest_t a -> ret_succ_adding accu @@ base_basic a - | Pair_t ((_ty1, _fa1), (_ty2, _fa2), a) -> - ret_succ_adding accu @@ (base_compound a +! hh6w) + | Pair_t (_ty1, _ty2, a) -> + ret_succ_adding accu @@ (base_compound a +! (word_size *? 2)) | Union_t ((_ty1, _fa1), (_ty2, _fa2), a) -> ret_succ_adding accu @@ (base_compound a +! hh6w) | Lambda_t (_ty1, _ty2, a) -> diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml index ca327f466ec13040b29924d0279471b6c7c38db8..a92e093c86021c00bdf5047d846c81b8f239d1e6 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml @@ -1004,7 +1004,7 @@ module Interpreter_tests = struct (let memo_size = memo_size_of_int memo_size in let open Script_typed_ir in let state_ty = sapling_state_t ~memo_size in - pair_t (-1) (state_ty, None) (state_ty, None)) + pair_t (-1) state_ty state_ty) >>??= fun tytype -> Script_ir_translator.parse_storage ctx_without_gas diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml index d080cb9daac807c6882805b04bcd3ee7cc0369b3..169cd01ac697a7cbaa31db0873fa54606d50b8e6 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_script_cache.ml @@ -46,7 +46,7 @@ let err x = Exn (Script_cache_test_error x) model. It has been computed by a manual run of the test. *) -let liquidity_baking_contract_size = 275006 +let liquidity_baking_contract_size = 269746 let liquidity_baking_contract = Contract.of_b58check "KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5" |> function @@ -120,7 +120,7 @@ let add_some_contracts k src block baker = model. It has been computed by a manual run of the test. *) -let int_store_contract_size = 1042 +let int_store_contract_size = 891 (* diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml index a06e3c575691aae9822dd909effb88deb107cd9a..46cc2e17617612baafbfbaf0b07f53d4160c584f 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_typechecking.ml @@ -190,7 +190,7 @@ let test_parse_comb_type () = let nat_prim_c = Prim (-1, T_nat, [], ["%c"]) in let nat_ty = nat_t in let pair_prim l = Prim (-1, T_pair, l, []) in - let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) in + let pair_ty ty1 ty2 = pair_t (-1) ty1 ty2 in let pair_prim2 a b = pair_prim [a; b] in let pair_nat_nat_prim = pair_prim2 nat_prim nat_prim in pair_ty nat_ty nat_ty >>??= fun pair_nat_nat_ty -> @@ -219,37 +219,28 @@ let test_parse_comb_type () = pair_nat_nat_nat_ty >>?= fun ctxt -> (* pair (nat %a) nat *) - pair_t (-1) (nat_ty, Some (field_annot "a")) (nat_ty, None) - >>??= fun pair_nat_a_nat_ty -> + pair_t (-1) nat_ty nat_ty >>??= fun pair_nat_a_nat_ty -> test_parse_ty ctxt (pair_prim2 nat_prim_a nat_prim) pair_nat_a_nat_ty >>?= fun ctxt -> (* pair nat (nat %b) *) - pair_t (-1) (nat_ty, None) (nat_ty, Some (field_annot "b")) - >>??= fun pair_nat_nat_b_ty -> + pair_t (-1) nat_ty nat_ty >>??= fun pair_nat_nat_b_ty -> test_parse_ty ctxt (pair_prim2 nat_prim nat_prim_b) pair_nat_nat_b_ty >>?= fun ctxt -> (* pair (nat %a) (nat %b) *) - pair_t (-1) (nat_ty, Some (field_annot "a")) (nat_ty, Some (field_annot "b")) - >>??= fun pair_nat_a_nat_b_ty -> + pair_t (-1) nat_ty nat_ty >>??= fun pair_nat_a_nat_b_ty -> test_parse_ty ctxt (pair_prim2 nat_prim_a nat_prim_b) pair_nat_a_nat_b_ty >>?= fun ctxt -> (* pair (nat %a) (nat %b) (nat %c) *) - pair_t (-1) (nat_ty, Some (field_annot "b")) (nat_ty, Some (field_annot "c")) - >>??= fun pair_nat_b_nat_c_ty -> - pair_t (-1) (nat_ty, Some (field_annot "a")) (pair_nat_b_nat_c_ty, None) - >>??= fun pair_nat_a_nat_b_nat_c_ty -> + pair_t (-1) nat_ty nat_ty >>??= fun pair_nat_b_nat_c_ty -> + pair_t (-1) nat_ty pair_nat_b_nat_c_ty >>??= fun pair_nat_a_nat_b_nat_c_ty -> test_parse_ty ctxt (pair_prim [nat_prim_a; nat_prim_b; nat_prim_c]) pair_nat_a_nat_b_nat_c_ty >>?= fun ctxt -> (* pair (nat %a) (pair %b nat nat) *) - pair_t (-1) (nat_ty, None) (nat_ty, None) >>??= fun pair_b_nat_nat_ty -> - pair_t - (-1) - (nat_ty, Some (field_annot "a")) - (pair_b_nat_nat_ty, Some (field_annot "b")) - >>??= fun pair_nat_a_pair_b_nat_nat_ty -> + pair_t (-1) nat_ty nat_ty >>??= fun pair_b_nat_nat_ty -> + pair_t (-1) nat_ty pair_b_nat_nat_ty >>??= fun pair_nat_a_pair_b_nat_nat_ty -> test_parse_ty ctxt (pair_prim2 nat_prim_a (Prim (-1, T_pair, [nat_prim; nat_prim], ["%b"]))) @@ -266,12 +257,9 @@ let test_unparse_comb_type () = let open Script in let open Script_typed_ir in let nat_prim = Prim ((), T_nat, [], []) in - let nat_prim_a = Prim ((), T_nat, [], ["%a"]) in - let nat_prim_b = Prim ((), T_nat, [], ["%b"]) in - let nat_prim_c = Prim ((), T_nat, [], ["%c"]) in let nat_ty = nat_t in let pair_prim l = Prim ((), T_pair, l, []) in - let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) in + let pair_ty ty1 ty2 = pair_t (-1) ty1 ty2 in let pair_prim2 a b = pair_prim [a; b] in let pair_nat_nat_prim = pair_prim2 nat_prim nat_prim in pair_ty nat_ty nat_ty >>??= fun pair_nat_nat_ty -> @@ -294,57 +282,6 @@ let test_unparse_comb_type () = ctxt (pair_prim [nat_prim; nat_prim; nat_prim]) pair_nat_nat_nat_ty - >>?= fun ctxt -> - (* pair (nat %a) nat *) - pair_t (-1) (nat_ty, Some (field_annot "a")) (nat_ty, None) - >>??= fun pair_nat_a_nat_ty -> - test_unparse_ty - __LOC__ - ctxt - (pair_prim2 nat_prim_a nat_prim) - pair_nat_a_nat_ty - >>?= fun ctxt -> - (* pair nat (nat %b) *) - pair_t (-1) (nat_ty, None) (nat_ty, Some (field_annot "b")) - >>??= fun pair_nat_nat_b_ty -> - test_unparse_ty - __LOC__ - ctxt - (pair_prim2 nat_prim nat_prim_b) - pair_nat_nat_b_ty - >>?= fun ctxt -> - (* pair (nat %a) (nat %b) *) - pair_t (-1) (nat_ty, Some (field_annot "a")) (nat_ty, Some (field_annot "b")) - >>??= fun pair_nat_a_nat_b_ty -> - test_unparse_ty - __LOC__ - ctxt - (pair_prim2 nat_prim_a nat_prim_b) - pair_nat_a_nat_b_ty - >>?= fun ctxt -> - (* pair (nat %a) (nat %b) (nat %c) *) - pair_t (-1) (nat_ty, Some (field_annot "b")) (nat_ty, Some (field_annot "c")) - >>??= fun pair_nat_b_nat_c_ty -> - pair_t (-1) (nat_ty, Some (field_annot "a")) (pair_nat_b_nat_c_ty, None) - >>??= fun pair_nat_a_nat_b_nat_c_ty -> - test_unparse_ty - __LOC__ - ctxt - (pair_prim [nat_prim_a; nat_prim_b; nat_prim_c]) - pair_nat_a_nat_b_nat_c_ty - >>?= fun ctxt -> - (* pair (nat %a) (pair %b nat nat) *) - pair_t (-1) (nat_ty, None) (nat_ty, None) >>??= fun pair_nat_nat_ty -> - pair_t - (-1) - (nat_ty, Some (field_annot "a")) - (pair_nat_nat_ty, Some (field_annot "b")) - >>??= fun pair_nat_a_pair_b_nat_nat_ty -> - test_unparse_ty - __LOC__ - ctxt - (pair_prim2 nat_prim_a (Prim ((), T_pair, [nat_prim; nat_prim], ["%b"]))) - pair_nat_a_pair_b_nat_nat_ty >>?= fun _ -> return_unit let test_unparse_comparable_ty loc ctxt expected ty = @@ -362,12 +299,9 @@ let test_unparse_comb_comparable_type () = let open Script in let open Script_typed_ir in let nat_prim = Prim ((), T_nat, [], []) in - let nat_prim_a = Prim ((), T_nat, [], ["%a"]) in - let nat_prim_b = Prim ((), T_nat, [], ["%b"]) in - let nat_prim_c = Prim ((), T_nat, [], ["%c"]) in let nat_ty = nat_key in let pair_prim l = Prim ((), T_pair, l, []) in - let pair_ty ty1 ty2 = pair_key (-1) (ty1, None) (ty2, None) in + let pair_ty ty1 ty2 = pair_key (-1) ty1 ty2 in let pair_prim2 a b = pair_prim [a; b] in let pair_nat_nat_prim = pair_prim2 nat_prim nat_prim in pair_ty nat_ty nat_ty >>??= fun pair_nat_nat_ty -> @@ -390,56 +324,6 @@ let test_unparse_comb_comparable_type () = ctxt (pair_prim [nat_prim; nat_prim; nat_prim]) pair_nat_nat_nat_ty - >>?= fun ctxt -> - (* pair (nat %a) nat *) - pair_key (-1) (nat_ty, Some (field_annot "a")) (nat_ty, None) - >>??= fun pair_nat_a_nat_ty -> - test_unparse_comparable_ty - __LOC__ - ctxt - (pair_prim2 nat_prim_a nat_prim) - pair_nat_a_nat_ty - >>?= fun ctxt -> - (* pair nat (nat %b) *) - pair_key (-1) (nat_ty, None) (nat_ty, Some (field_annot "b")) - >>??= fun pair_nat_nat_b_ty -> - test_unparse_comparable_ty - __LOC__ - ctxt - (pair_prim2 nat_prim nat_prim_b) - pair_nat_nat_b_ty - >>?= fun ctxt -> - (* pair (nat %a) (nat %b) *) - pair_key (-1) (nat_ty, Some (field_annot "a")) (nat_ty, Some (field_annot "b")) - >>??= fun pair_nat_a_nat_b_ty -> - test_unparse_comparable_ty - __LOC__ - ctxt - (pair_prim2 nat_prim_a nat_prim_b) - pair_nat_a_nat_b_ty - >>?= fun ctxt -> - (* pair (nat %a) (nat %b) (nat %c) *) - pair_key (-1) (nat_ty, Some (field_annot "b")) (nat_ty, Some (field_annot "c")) - >>??= fun pair_nat_b_nat_c_ty -> - pair_key (-1) (nat_ty, Some (field_annot "a")) (pair_nat_b_nat_c_ty, None) - >>??= fun pair_nat_a_nat_b_nat_c_ty -> - test_unparse_comparable_ty - __LOC__ - ctxt - (pair_prim [nat_prim_a; nat_prim_b; nat_prim_c]) - pair_nat_a_nat_b_nat_c_ty - >>?= fun ctxt -> - (* pair (nat %a) (pair %b nat nat) *) - pair_key - (-1) - (nat_ty, Some (field_annot "a")) - (pair_nat_nat_ty, Some (field_annot "b")) - >>??= fun pair_nat_a_pair_b_nat_nat_ty -> - test_unparse_comparable_ty - __LOC__ - ctxt - (pair_prim2 nat_prim_a (Prim ((), T_pair, [nat_prim; nat_prim], ["%b"]))) - pair_nat_a_pair_b_nat_nat_ty >>?= fun _ -> return_unit let test_parse_data ?(equal = Stdlib.( = )) loc ctxt ty node expected = @@ -484,7 +368,7 @@ let test_parse_comb_data () = let z_prim = Micheline.Int (-1, Z.zero) in let nat_ty = nat_t in let pair_prim l = Prim (-1, D_Pair, l, []) in - let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) in + let pair_ty ty1 ty2 = pair_t (-1) ty1 ty2 in pair_ty nat_ty nat_ty >>??= fun pair_nat_nat_ty -> let pair_prim2 a b = pair_prim [a; b] in let pair_z_z_prim = pair_prim2 z_prim z_prim in @@ -633,7 +517,7 @@ let test_unparse_comb_data () = let z_prim = Micheline.Int (-1, Z.zero) in let nat_ty = nat_t in let pair_prim l = Prim (-1, D_Pair, l, []) in - let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) in + let pair_ty ty1 ty2 = pair_t (-1) ty1 ty2 in pair_ty nat_ty nat_ty >>??= fun pair_nat_nat_ty -> let pair_prim2 a b = pair_prim [a; b] in let pair_z_z_prim = pair_prim2 z_prim z_prim in @@ -740,7 +624,7 @@ let test_optimal_comb () = @@ gen_combs leaf_mich arity >>=? fun () -> return ctxt ) in - let pair_ty ty1 ty2 = pair_t (-1) (ty1, None) (ty2, None) in + let pair_ty ty1 ty2 = pair_t (-1) ty1 ty2 in test_context () >>=? fun ctxt -> pair_ty leaf_ty leaf_ty >>??= fun comb2_ty -> let comb2_v = (leaf_v, leaf_v) in diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml b/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml index 187af4ad03c1a0d6d79a350848a8e1c6883d2745..07631a673b6e673ad90fa6e58d2e4f4bc85b5db8 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml @@ -66,13 +66,13 @@ let rec reference_compare_comparable : type a. a comparable_ty -> a -> a -> int normalize_compare @@ Script_comparable.compare_address x y | (Bytes_key _, x, y) -> normalize_compare @@ Compare.Bytes.compare x y | (Chain_id_key _, x, y) -> normalize_compare @@ Script_chain_id.compare x y - | (Pair_key ((tl, _), (tr, _), _), (lx, rx), (ly, ry)) -> + | (Pair_key (tl, tr, _), (lx, rx), (ly, ry)) -> let cl = reference_compare_comparable tl lx ly in if Compare.Int.(cl = 0) then reference_compare_comparable tr rx ry else cl - | (Union_key ((tl, _), _, _), L x, L y) -> reference_compare_comparable tl x y + | (Union_key (tl, _, _), L x, L y) -> reference_compare_comparable tl x y | (Union_key _, L _, R _) -> -1 | (Union_key _, R _, L _) -> 1 - | (Union_key (_, (tr, _), _), R x, R y) -> reference_compare_comparable tr x y + | (Union_key (_, tr, _), R x, R y) -> reference_compare_comparable tr x y | (Option_key _, None, None) -> 0 | (Option_key _, None, Some _) -> -1 | (Option_key _, Some _, None) -> 1 diff --git a/src/proto_alpha/lib_protocol/ticket_scanner.ml b/src/proto_alpha/lib_protocol/ticket_scanner.ml index 4a87b505fe2bac4356653da0088de9e33b17fadd..e50eee3be5433519f2eeb86b323218ed79bfcceb 100644 --- a/src/proto_alpha/lib_protocol/ticket_scanner.ml +++ b/src/proto_alpha/lib_protocol/ticket_scanner.ml @@ -123,8 +123,8 @@ module Ticket_inspection = struct | Timestamp_key _ -> (k [@ocaml.tailcall]) False_ht | Chain_id_key _ -> (k [@ocaml.tailcall]) False_ht | Address_key _ -> (k [@ocaml.tailcall]) False_ht - | Pair_key ((_, _), (_, _), _) -> (k [@ocaml.tailcall]) False_ht - | Union_key (_, (_, _), _) -> (k [@ocaml.tailcall]) False_ht + | Pair_key (_, _, _) -> (k [@ocaml.tailcall]) False_ht + | Union_key (_, _, _) -> (k [@ocaml.tailcall]) False_ht | Option_key (_, _) -> (k [@ocaml.tailcall]) False_ht (* Short circuit pairing of two [has_tickets] values. @@ -161,7 +161,7 @@ module Ticket_inspection = struct | Timestamp_t _ -> (k [@ocaml.tailcall]) False_ht | Address_t _ -> (k [@ocaml.tailcall]) False_ht | Bool_t _ -> (k [@ocaml.tailcall]) False_ht - | Pair_t ((ty1, _), (ty2, _), _) -> + | Pair_t (ty1, ty2, _) -> (has_tickets_of_pair [@ocaml.tailcall]) ty1 ty2 @@ -285,8 +285,8 @@ module Ticket_collection = struct | Timestamp_key _ -> (k [@ocaml.tailcall]) ctxt acc | Chain_id_key _ -> (k [@ocaml.tailcall]) ctxt acc | Address_key _ -> (k [@ocaml.tailcall]) ctxt acc - | Pair_key ((_, _), (_, _), _) -> (k [@ocaml.tailcall]) ctxt acc - | Union_key ((_, _), (_, _), _) -> (k [@ocaml.tailcall]) ctxt acc + | Pair_key (_, _, _) -> (k [@ocaml.tailcall]) ctxt acc + | Union_key (_, _, _) -> (k [@ocaml.tailcall]) ctxt acc | Option_key (_, _) -> (k [@ocaml.tailcall]) ctxt acc let tickets_of_set : @@ -318,7 +318,7 @@ module Ticket_collection = struct consume_gas_steps ctxt ~num_steps:1 >>?= fun ctxt -> match (hty, ty) with | (False_ht, _) -> (k [@ocaml.tailcall]) ctxt acc - | (Pair_ht (hty1, hty2), Pair_t ((ty1, _), (ty2, _), _)) -> + | (Pair_ht (hty1, hty2), Pair_t (ty1, ty2, _)) -> let (l, r) = x in (tickets_of_value [@ocaml.tailcall]) ~include_lazy diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--accounts.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--accounts.tz].out index 9044ed78bb7e08c73e79a3f663f042a98d41f0d0..27aae3f11dcaa064e0aaab066b4baa5a8d3ffe71 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--accounts.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--accounts.tz].out @@ -7,23 +7,18 @@ Gas remaining: 1039925.145 units remaining (pair %Withdraw (key %from) (pair (mutez %withdraw_amount) (signature %sig)))) ; storage (map :stored_balance key_hash mutez) ; code { DUP - /* [ pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; CAR - /* [ or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig)) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ or (key_hash %Initialize) (pair %Withdraw key mutez signature) + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; IF_LEFT { DUP /* [ key_hash : key_hash - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; DIIP { CDR %stored_balance /* [ map key_hash mutez ] */ ; @@ -63,86 +58,59 @@ Gas remaining: 1039925.145 units remaining PAIR /* [ pair (list operation) (map key_hash mutez) ] */ } } { DUP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ pair key mutez signature : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; DUP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ pair key mutez signature : pair key mutez signature + : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; DUP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ pair key mutez signature : pair key mutez signature + : pair key mutez signature : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; DUP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ pair key mutez signature : pair key mutez signature + : pair key mutez signature : pair key mutez signature + : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; CAR %from - /* [ key : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ key : pair key mutez signature : pair key mutez signature + : pair key mutez signature : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; DIIP { CDAR %withdraw_amount ; PACK - /* [ bytes : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ bytes : pair key mutez signature : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; BLAKE2B @signed_amount - /* [ bytes : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ bytes : pair key mutez signature : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ } - /* [ key : pair (key %from) (mutez %withdraw_amount) (signature %sig) : bytes - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ key : pair key mutez signature : bytes : pair key mutez signature + : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; DIP { CDDR %sig } - /* [ key : signature : bytes - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ key : signature : bytes : pair key mutez signature + : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; CHECK_SIGNATURE - /* [ bool : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ bool : pair key mutez signature : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; - IF { /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + IF { /* [ pair key mutez signature : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ } { PUSH string "Bad signature" - /* [ string : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (or (key_hash %Initialize) - (pair %Withdraw (key %from) (mutez %withdraw_amount) (signature %sig))) + /* [ string : pair key mutez signature : pair key mutez signature + : pair (or (key_hash %Initialize) (pair %Withdraw key mutez signature)) (map key_hash mutez) ] */ ; FAILWITH /* [] */ } ; @@ -150,149 +118,97 @@ Gas remaining: 1039925.145 units remaining /* [ map key_hash mutez ] */ ; DUP /* [ map key_hash mutez : map key_hash mutez ] */ } - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez : map key_hash mutez ] */ ; + /* [ pair key mutez signature : pair key mutez signature : map key_hash mutez + : map key_hash mutez ] */ ; CAR %from - /* [ key : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez : map key_hash mutez ] */ ; + /* [ key : pair key mutez signature : map key_hash mutez : map key_hash mutez ] */ ; HASH_KEY @from_hash - /* [ key_hash : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez : map key_hash mutez ] */ ; + /* [ key_hash : pair key mutez signature : map key_hash mutez + : map key_hash mutez ] */ ; DUP - /* [ key_hash : key_hash - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez : map key_hash mutez ] */ ; + /* [ key_hash : key_hash : pair key mutez signature : map key_hash mutez + : map key_hash mutez ] */ ; DIP { DIP { SWAP - /* [ map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ } - /* [ key_hash : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) + /* [ map key_hash mutez : pair key mutez signature : map key_hash mutez ] */ } + /* [ key_hash : map key_hash mutez : pair key mutez signature : map key_hash mutez ] */ ; SWAP - /* [ map key_hash mutez : key_hash - : pair (key %from) (mutez %withdraw_amount) (signature %sig) + /* [ map key_hash mutez : key_hash : pair key mutez signature : map key_hash mutez ] */ } - /* [ key_hash : map key_hash mutez : key_hash - : pair (key %from) (mutez %withdraw_amount) (signature %sig) + /* [ key_hash : map key_hash mutez : key_hash : pair key mutez signature : map key_hash mutez ] */ ; GET - /* [ option mutez : key_hash - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ option mutez : key_hash : pair key mutez signature : map key_hash mutez ] */ ; IF_NONE { PUSH string "Account does not exist" - /* [ string : key_hash - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ string : key_hash : pair key mutez signature : map key_hash mutez ] */ ; PAIR - /* [ pair string key_hash - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ pair string key_hash : pair key mutez signature : map key_hash mutez ] */ ; FAILWITH /* [] */ } { RENAME @previous_balance - /* [ mutez : key_hash - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; - DIP { DROP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ } - /* [ mutez : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ mutez : key_hash : pair key mutez signature : map key_hash mutez ] */ ; + DIP { DROP /* [ pair key mutez signature : map key_hash mutez ] */ } + /* [ mutez : pair key mutez signature : map key_hash mutez ] */ ; DUP - /* [ mutez : mutez : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ mutez : mutez : pair key mutez signature : map key_hash mutez ] */ ; DIIP { DUP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ pair key mutez signature : pair key mutez signature : map key_hash mutez ] */ ; CDAR %withdraw_amount ; DUP - /* [ mutez : mutez : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ } - /* [ mutez : mutez : mutez : mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) + /* [ mutez : mutez : pair key mutez signature : map key_hash mutez ] */ } + /* [ mutez : mutez : mutez : mutez : pair key mutez signature : map key_hash mutez ] */ ; DIP { CMPLT @not_enough } - /* [ mutez : bool : mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ mutez : bool : mutez : pair key mutez signature : map key_hash mutez ] */ ; SWAP - /* [ bool : mutez : mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ bool : mutez : mutez : pair key mutez signature : map key_hash mutez ] */ ; IF { PUSH string "Not enough funds" - /* [ string : mutez : mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ string : mutez : mutez : pair key mutez signature : map key_hash mutez ] */ ; FAILWITH /* [] */ } { SUB_MUTEZ @new_balance - /* [ option mutez : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ option mutez : pair key mutez signature : map key_hash mutez ] */ ; ASSERT_SOME ; DIP { DUP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; - DIP { SWAP - /* [ map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ } - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ } - /* [ mutez : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ ; + /* [ pair key mutez signature : pair key mutez signature : map key_hash mutez ] */ ; + DIP { SWAP /* [ map key_hash mutez : pair key mutez signature ] */ } + /* [ pair key mutez signature : map key_hash mutez : pair key mutez signature ] */ } + /* [ mutez : pair key mutez signature : map key_hash mutez + : pair key mutez signature ] */ ; DUP - /* [ mutez : mutez : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ ; + /* [ mutez : mutez : pair key mutez signature : map key_hash mutez + : pair key mutez signature ] */ ; PUSH @zero mutez 0 - /* [ mutez : mutez : mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ ; + /* [ mutez : mutez : mutez : pair key mutez signature : map key_hash mutez + : pair key mutez signature ] */ ; CMPEQ @null_balance ; IF { DROP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ ; + /* [ pair key mutez signature : map key_hash mutez : pair key mutez signature ] */ ; NONE @new_balance mutez - /* [ option mutez : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ } + /* [ option mutez : pair key mutez signature : map key_hash mutez + : pair key mutez signature ] */ } { SOME @new_balance - /* [ option mutez : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ } ; + /* [ option mutez : pair key mutez signature : map key_hash mutez + : pair key mutez signature ] */ } ; SWAP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) : option mutez - : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ ; + /* [ pair key mutez signature : option mutez : map key_hash mutez + : pair key mutez signature ] */ ; CAR %from - /* [ key : option mutez : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ ; + /* [ key : option mutez : map key_hash mutez : pair key mutez signature ] */ ; HASH_KEY @from_hash - /* [ key_hash : option mutez : map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ ; + /* [ key_hash : option mutez : map key_hash mutez : pair key mutez signature ] */ ; UPDATE - /* [ map key_hash mutez - : pair (key %from) (mutez %withdraw_amount) (signature %sig) ] */ ; + /* [ map key_hash mutez : pair key mutez signature ] */ ; SWAP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ pair key mutez signature : map key_hash mutez ] */ ; DUP - /* [ pair (key %from) (mutez %withdraw_amount) (signature %sig) - : pair (key %from) (mutez %withdraw_amount) (signature %sig) - : map key_hash mutez ] */ ; + /* [ pair key mutez signature : pair key mutez signature : map key_hash mutez ] */ ; CDAR %withdraw_amount ; DIP { CAR %from /* [ key : map key_hash mutez ] */ ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--cadr_annotation.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--cadr_annotation.tz].out index b2d40856bcb6d15698c4cd73e70b63a4c168e282..dac6731e01edc345a6b3f43408458a3e1a69a262 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--cadr_annotation.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--cadr_annotation.tz].out @@ -5,7 +5,7 @@ Gas remaining: 1039994.745 units remaining { parameter (pair (pair %p1 unit (string %no_name)) bool) ; storage unit ; code { CAR @param - /* [ pair (pair %p1 unit (string %no_name)) bool ] */ ; + /* [ pair (pair unit string) bool ] */ ; CADR @name %no_name ; DROP /* [] */ ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--reservoir.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--reservoir.tz].out index 10a29a45fa80459f72dabccea0ed972a0fa6b0e0..07f1f10d3eae31f7f16c441a055bf5370e5619c9 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--reservoir.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[attic--reservoir.tz].out @@ -5,89 +5,74 @@ Gas remaining: 1039963.237 units remaining { parameter unit ; storage (pair (pair (timestamp %T) (mutez %N)) (pair (address %A) (address %B))) ; code { CDR - /* [ pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ pair (pair timestamp mutez) address address ] */ ; DUP - /* [ pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ pair (pair timestamp mutez) address address + : pair (pair timestamp mutez) address address ] */ ; CAAR %T ; NOW - /* [ timestamp : timestamp - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ timestamp : timestamp : pair (pair timestamp mutez) address address ] */ ; COMPARE - /* [ int : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ int : pair (pair timestamp mutez) address address ] */ ; LE - /* [ bool : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ bool : pair (pair timestamp mutez) address address ] */ ; IF { DUP - /* [ pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ pair (pair timestamp mutez) address address + : pair (pair timestamp mutez) address address ] */ ; CADR %N ; BALANCE - /* [ mutez : mutez - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ mutez : mutez : pair (pair timestamp mutez) address address ] */ ; COMPARE - /* [ int : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ int : pair (pair timestamp mutez) address address ] */ ; LE - /* [ bool : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ bool : pair (pair timestamp mutez) address address ] */ ; IF { NIL operation - /* [ list operation - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ list operation : pair (pair timestamp mutez) address address ] */ ; PAIR - /* [ pair (list operation) (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ } + /* [ pair (list operation) (pair timestamp mutez) address address ] */ } { DUP - /* [ pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ pair (pair timestamp mutez) address address + : pair (pair timestamp mutez) address address ] */ ; CDDR %B ; CONTRACT unit - /* [ option (contract unit) - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ option (contract unit) : pair (pair timestamp mutez) address address ] */ ; ASSERT_SOME ; BALANCE - /* [ mutez : contract unit - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ mutez : contract unit : pair (pair timestamp mutez) address address ] */ ; UNIT /* [ unit : mutez : contract unit - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + : pair (pair timestamp mutez) address address ] */ ; TRANSFER_TOKENS - /* [ operation - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ operation : pair (pair timestamp mutez) address address ] */ ; NIL operation - /* [ list operation : operation - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ list operation : operation : pair (pair timestamp mutez) address address ] */ ; SWAP - /* [ operation : list operation - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ operation : list operation : pair (pair timestamp mutez) address address ] */ ; CONS - /* [ list operation - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ list operation : pair (pair timestamp mutez) address address ] */ ; PAIR - /* [ pair (list operation) (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ } } + /* [ pair (list operation) (pair timestamp mutez) address address ] */ } } { DUP - /* [ pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ pair (pair timestamp mutez) address address + : pair (pair timestamp mutez) address address ] */ ; CDAR %A ; CONTRACT unit - /* [ option (contract unit) - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ option (contract unit) : pair (pair timestamp mutez) address address ] */ ; ASSERT_SOME ; BALANCE - /* [ mutez : contract unit - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ mutez : contract unit : pair (pair timestamp mutez) address address ] */ ; UNIT /* [ unit : mutez : contract unit - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + : pair (pair timestamp mutez) address address ] */ ; TRANSFER_TOKENS - /* [ operation - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ operation : pair (pair timestamp mutez) address address ] */ ; NIL operation - /* [ list operation : operation - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ list operation : operation : pair (pair timestamp mutez) address address ] */ ; SWAP - /* [ operation : list operation - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ operation : list operation : pair (pair timestamp mutez) address address ] */ ; CONS - /* [ list operation - : pair (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ ; + /* [ list operation : pair (pair timestamp mutez) address address ] */ ; PAIR - /* [ pair (list operation) (pair (timestamp %T) (mutez %N)) (address %A) (address %B) ] */ } } } + /* [ pair (list operation) (pair timestamp mutez) address address ] */ } } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_get_add.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_get_add.tz].out index bc82e51f10196bf01d1e55898238447d492c9b0b..b267e0d74607e72bad890989639cc6765c541ad5 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_get_add.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--big_map_get_add.tz].out @@ -5,23 +5,15 @@ Gas remaining: 1039968.666 units remaining { parameter (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) ; storage (pair (big_map int int) unit) ; code { DUP - /* [ pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) - (big_map int int) - unit - : pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) - (big_map int int) - unit ] */ ; + /* [ pair (pair (pair int (option int)) int (option int)) (big_map int int) unit + : pair (pair (pair int (option int)) int (option int)) (big_map int int) unit ] */ ; DIP { CDAR } - /* [ pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) - (big_map int int) - unit : big_map int int ] */ ; + /* [ pair (pair (pair int (option int)) int (option int)) (big_map int int) unit + : big_map int int ] */ ; DUP - /* [ pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) - (big_map int int) - unit - : pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) - (big_map int int) - unit : big_map int int ] */ ; + /* [ pair (pair (pair int (option int)) int (option int)) (big_map int int) unit + : pair (pair (pair int (option int)) int (option int)) (big_map int int) unit + : big_map int int ] */ ; DIP { CADR ; DUP /* [ pair int (option int) : pair int (option int) : big_map int int ] */ ; @@ -33,9 +25,8 @@ Gas remaining: 1039968.666 units remaining /* [ big_map int int ] */ ; DUP /* [ big_map int int : big_map int int ] */ } - /* [ pair (pair (pair %set_pair int (option int)) (pair %check_pair int (option int))) - (big_map int int) - unit : big_map int int : big_map int int ] */ ; + /* [ pair (pair (pair int (option int)) int (option int)) (big_map int int) unit + : big_map int int : big_map int int ] */ ; CADR ; DUP /* [ pair int (option int) : pair int (option int) : big_map int int diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--macro_annotations.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--macro_annotations.tz].out index 2e73b3abe0db08de009067e381b23aac75c55cd9..c6896b36a7dc0be57ec64accc7781b71bcf020be 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--macro_annotations.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--macro_annotations.tz].out @@ -11,14 +11,14 @@ Gas remaining: 1039992.402 units remaining UNIT /* [ unit : unit ] */ ; PAIR %truc - /* [ pair (unit %truc) unit ] */ ; + /* [ pair unit unit ] */ ; UNIT - /* [ unit : pair (unit %truc) unit ] */ ; + /* [ unit : pair unit unit ] */ ; DUUP @new_storage - /* [ pair (unit %truc) unit : unit : pair (unit %truc) unit ] */ ; - DIP { DROP /* [ pair (unit %truc) unit ] */ ; DROP /* [] */ } - /* [ pair (unit %truc) unit ] */ ; + /* [ pair unit unit : unit : pair unit unit ] */ ; + DIP { DROP /* [ pair unit unit ] */ ; DROP /* [] */ } + /* [ pair unit unit ] */ ; NIL operation - /* [ list operation : pair (unit %truc) unit ] */ ; + /* [ list operation : pair unit unit ] */ ; PAIR - /* [ pair (list operation) (unit %truc) unit ] */ } } + /* [ pair (list operation) unit unit ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--map_caddaadr.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--map_caddaadr.tz].out index 2cd94487cb3a0e2745f686cdcb2132e6f7e6062e..a83c3b51b238a9eed224a5d298388a47ea9f31e5 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--map_caddaadr.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--map_caddaadr.tz].out @@ -6,13 +6,13 @@ Gas remaining: 1039964.206 units remaining storage (pair (pair nat (pair nat (pair (pair (pair (nat %p) (mutez %value)) nat) nat))) nat) ; code { MAP_CDADDAADR @new_storage %value { PUSH mutez 1000000 - /* [ mutez : mutez : pair (nat %p) (mutez %value) ] */ ; + /* [ mutez : mutez : pair nat mutez ] */ ; ADD - /* [ mutez : pair (nat %p) (mutez %value) ] */ } ; + /* [ mutez : pair nat mutez ] */ } ; NIL operation /* [ list operation - : pair unit (pair nat nat (pair (pair nat (mutez %value)) nat) nat) nat ] */ ; + : pair unit (pair nat nat (pair (pair nat mutez) nat) nat) nat ] */ ; SWAP - /* [ pair unit (pair nat nat (pair (pair nat (mutez %value)) nat) nat) nat + /* [ pair unit (pair nat nat (pair (pair nat mutez) nat) nat) nat : list operation ] */ ; SET_CAR } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--set_caddaadr.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--set_caddaadr.tz].out index ac30e8414c01ce77490d7f5596aab650ef9ca9ee..62a65bc59f8efe59fa35323728cfd717d94e0673 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--set_caddaadr.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[macros--set_caddaadr.tz].out @@ -5,20 +5,16 @@ Gas remaining: 1039968.110 units remaining { parameter mutez ; storage (pair (pair nat (pair nat (pair (pair (pair (nat %p) (mutez %value)) nat) nat))) nat) ; code { DUP - /* [ pair mutez (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat - : pair mutez (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat ] */ ; + /* [ pair mutez (pair nat nat (pair (pair nat mutez) nat) nat) nat + : pair mutez (pair nat nat (pair (pair nat mutez) nat) nat) nat ] */ ; CAR - /* [ mutez - : pair mutez (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat ] */ ; + /* [ mutez : pair mutez (pair nat nat (pair (pair nat mutez) nat) nat) nat ] */ ; SWAP - /* [ pair mutez (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat - : mutez ] */ ; + /* [ pair mutez (pair nat nat (pair (pair nat mutez) nat) nat) nat : mutez ] */ ; CDR - /* [ pair (pair nat nat (pair (pair (nat %p) (mutez %value)) nat) nat) nat - : mutez ] */ ; + /* [ pair (pair nat nat (pair (pair nat mutez) nat) nat) nat : mutez ] */ ; SET_CADDAADR @toplevel_pair_name %value ; NIL operation - /* [ list operation - : pair (pair nat nat (pair (pair nat (mutez %value)) nat) nat) nat ] */ ; + /* [ list operation : pair (pair nat nat (pair (pair nat mutez) nat) nat) nat ] */ ; PAIR - /* [ pair (list operation) (pair nat nat (pair (pair nat (mutez %value)) nat) nat) nat ] */ } } + /* [ pair (list operation) (pair nat nat (pair (pair nat mutez) nat) nat) nat ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--generic_multisig.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--generic_multisig.tz].out index ad864de134b2f24f3a54652fa9a594dff2008c2e..8a5ab4cef036358eed451e8441a1f9b9a1ded026 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--generic_multisig.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--generic_multisig.tz].out @@ -15,339 +15,260 @@ Gas remaining: 1039928.421 units remaining code { UNPAIR /* [ or (unit %default) (pair %main - (pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)))) - (list %sigs (option signature))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + (pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)))) + (list (option signature))) : pair nat nat (list key) ] */ ; IF_LEFT { DROP - /* [ pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ pair nat nat (list key) ] */ ; NIL operation - /* [ list operation - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ list operation : pair nat nat (list key) ] */ ; PAIR - /* [ pair (list operation) (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + /* [ pair (list operation) nat nat (list key) ] */ } { PUSH mutez 0 /* [ mutez - : pair (pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)))) - (list %sigs (option signature)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair (pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)))) + (list (option signature)) : pair nat nat (list key) ] */ ; AMOUNT /* [ mutez : mutez - : pair (pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)))) - (list %sigs (option signature)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair (pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)))) + (list (option signature)) : pair nat nat (list key) ] */ ; ASSERT_CMPEQ ; SWAP - /* [ pair (nat %stored_counter) (nat %threshold) (list %keys key) - : pair (pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)))) - (list %sigs (option signature)) ] */ ; + /* [ pair nat nat (list key) + : pair (pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)))) + (list (option signature)) ] */ ; DUP - /* [ pair (nat %stored_counter) (nat %threshold) (list %keys key) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) - : pair (pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)))) - (list %sigs (option signature)) ] */ ; + /* [ pair nat nat (list key) : pair nat nat (list key) + : pair (pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)))) + (list (option signature)) ] */ ; DIP { SWAP - /* [ pair (pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)))) - (list %sigs (option signature)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } - /* [ pair (nat %stored_counter) (nat %threshold) (list %keys key) - : pair (pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)))) - (list %sigs (option signature)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ pair (pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)))) + (list (option signature)) : pair nat nat (list key) ] */ } + /* [ pair nat nat (list key) + : pair (pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)))) + (list (option signature)) : pair nat nat (list key) ] */ ; DIP { UNPAIR - /* [ pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : list (option signature) : pair nat nat (list key) ] */ ; DUP - /* [ pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : list (option signature) : pair nat nat (list key) ] */ ; SELF /* [ contract unit - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : list (option signature) : pair nat nat (list key) ] */ ; ADDRESS /* [ address - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : list (option signature) : pair nat nat (list key) ] */ ; CHAIN_ID /* [ chain_id : address - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : list (option signature) : pair nat nat (list key) ] */ ; PAIR /* [ pair chain_id address - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : list (option signature) : pair nat nat (list key) ] */ ; PAIR /* [ pair (pair chain_id address) - (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : list (option signature) : pair nat nat (list key) ] */ ; PACK /* [ bytes - : pair (nat %counter) - (or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair nat + (or (lambda %operation unit (list operation)) (pair %change_keys nat (list key))) + : list (option signature) : pair nat nat (list key) ] */ ; DIP { UNPAIR @counter /* [ nat - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : list (option signature) : pair nat nat (list key) ] */ ; DIP { SWAP /* [ list (option signature) - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } /* [ nat : list (option signature) - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } /* [ bytes : nat : list (option signature) - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; SWAP /* [ nat : bytes : list (option signature) - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } - /* [ pair (nat %stored_counter) (nat %threshold) (list %keys key) : nat : bytes - : list (option signature) - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } + /* [ pair nat nat (list key) : nat : bytes : list (option signature) + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; UNPAIR @stored_counter - /* [ nat : pair (nat %threshold) (list %keys key) : nat : bytes - : list (option signature) - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ nat : pair nat (list key) : nat : bytes : list (option signature) + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; DIP { SWAP - /* [ nat : pair (nat %threshold) (list %keys key) : bytes - : list (option signature) - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } - /* [ nat : nat : pair (nat %threshold) (list %keys key) : bytes - : list (option signature) - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ nat : pair nat (list key) : bytes : list (option signature) + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } + /* [ nat : nat : pair nat (list key) : bytes : list (option signature) + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; ASSERT_CMPEQ ; DIP { SWAP /* [ list (option signature) : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } - /* [ pair (nat %threshold) (list %keys key) : list (option signature) : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } + /* [ pair nat (list key) : list (option signature) : bytes + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; UNPAIR @threshold @keys /* [ nat : list key : list (option signature) : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; DIP { PUSH @valid nat 0 /* [ nat : list key : list (option signature) : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; SWAP /* [ list key : nat : list (option signature) : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; ITER { DIP { SWAP /* [ list (option signature) : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } /* [ key : list (option signature) : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; SWAP /* [ list (option signature) : key : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; IF_CONS { IF_SOME { SWAP /* [ list (option signature) : signature : key : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; DIP { SWAP /* [ key : signature : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; DIIP { DUUP /* [ bytes : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } /* [ key : signature : bytes : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; { DUUUP /* [ bytes : key : signature : bytes : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; DIP { CHECK_SIGNATURE /* [ bool : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } /* [ bytes : bool : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; SWAP /* [ bool : bytes : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; IF { DROP /* [ nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } { FAILWITH /* [] */ } } ; PUSH nat 1 /* [ nat : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; ADD @valid /* [ nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } /* [ list (option signature) : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } { SWAP /* [ key : list (option signature) : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; DROP /* [ list (option signature) : nat : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } } { FAIL } ; SWAP /* [ nat : list (option signature) : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } /* [ nat : list (option signature) : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } /* [ nat : nat : list (option signature) : bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; ASSERT_CMPLE ; IF_CONS { FAIL } { /* [ bytes - : or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } ; + : or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ } ; DROP - /* [ or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; DIP { UNPAIR - /* [ nat : pair (nat %threshold) (list %keys key) ] */ ; + /* [ nat : pair nat (list key) ] */ ; PUSH nat 1 - /* [ nat : nat : pair (nat %threshold) (list %keys key) ] */ ; + /* [ nat : nat : pair nat (list key) ] */ ; ADD @new_counter - /* [ nat : pair (nat %threshold) (list %keys key) ] */ ; + /* [ nat : pair nat (list key) ] */ ; PAIR - /* [ pair nat (nat %threshold) (list %keys key) ] */ } - /* [ or (lambda %operation unit (list operation)) - (pair %change_keys (nat %threshold) (list %keys key)) - : pair nat (nat %threshold) (list %keys key) ] */ ; + /* [ pair nat nat (list key) ] */ } + /* [ or (lambda %operation unit (list operation)) (pair %change_keys nat (list key)) + : pair nat nat (list key) ] */ ; IF_LEFT { UNIT - /* [ unit : lambda unit (list operation) - : pair nat (nat %threshold) (list %keys key) ] */ ; + /* [ unit : lambda unit (list operation) : pair nat nat (list key) ] */ ; EXEC - /* [ list operation : pair nat (nat %threshold) (list %keys key) ] */ } + /* [ list operation : pair nat nat (list key) ] */ } { DIP { CAR /* [ nat ] */ } - /* [ pair (nat %threshold) (list %keys key) : nat ] */ ; + /* [ pair nat (list key) : nat ] */ ; SWAP - /* [ nat : pair (nat %threshold) (list %keys key) ] */ ; + /* [ nat : pair nat (list key) ] */ ; PAIR - /* [ pair nat (nat %threshold) (list %keys key) ] */ ; + /* [ pair nat nat (list key) ] */ ; NIL operation - /* [ list operation : pair nat (nat %threshold) (list %keys key) ] */ } ; + /* [ list operation : pair nat nat (list key) ] */ } ; PAIR - /* [ pair (list operation) nat (nat %threshold) (list %keys key) ] */ } } } + /* [ pair (list operation) nat nat (list key) ] */ } } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--groth16.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--groth16.tz].out index 8c9ddb0e95d6d77db6574c26b4b587c74e4f133b..c49ca5e6fe9e10d58e2b1d587fb0df25ebcbdac6 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--groth16.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--groth16.tz].out @@ -7,9 +7,7 @@ Gas remaining: 1039478.027 units remaining (pair (pair (bls12_381_fr %input_x) (bls12_381_fr %input_y)) (pair (pair (bls12_381_g1 %proof_a) (bls12_381_g2 %proof_b)) (bls12_381_g1 %proof_c))) ; code { CAR - /* [ pair (pair (bls12_381_fr %input_x) (bls12_381_fr %input_y)) - (pair (bls12_381_g1 %proof_a) (bls12_381_g2 %proof_b)) - (bls12_381_g1 %proof_c) ] */ ; + /* [ pair (pair bls12_381_fr bls12_381_fr) (pair bls12_381_g1 bls12_381_g2) bls12_381_g1 ] */ ; UNPPAIPPAIIR ; DIP 5 { PUSH @vk_gamma_c diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--legacy_multisig.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--legacy_multisig.tz].out index 35be1213a3847fab61467bf41efb42b18bd2dada..9b3a39e381441aebad3c10b326bf30cda52796f4 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--legacy_multisig.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--legacy_multisig.tz].out @@ -12,399 +12,321 @@ Gas remaining: 1039931.026 units remaining (list %sigs (option signature))) ; storage (pair (nat %stored_counter) (pair (nat %threshold) (list %keys key))) ; code { UNPAIR - /* [ pair (pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))))) - (list %sigs (option signature)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ pair (pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))))) + (list (option signature)) : pair nat nat (list key) ] */ ; SWAP - /* [ pair (nat %stored_counter) (nat %threshold) (list %keys key) - : pair (pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))))) - (list %sigs (option signature)) ] */ ; + /* [ pair nat nat (list key) + : pair (pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))))) + (list (option signature)) ] */ ; DUP - /* [ pair (nat %stored_counter) (nat %threshold) (list %keys key) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) - : pair (pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))))) - (list %sigs (option signature)) ] */ ; + /* [ pair nat nat (list key) : pair nat nat (list key) + : pair (pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))))) + (list (option signature)) ] */ ; DIP { SWAP - /* [ pair (pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))))) - (list %sigs (option signature)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } - /* [ pair (nat %stored_counter) (nat %threshold) (list %keys key) - : pair (pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))))) - (list %sigs (option signature)) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ pair (pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))))) + (list (option signature)) : pair nat nat (list key) ] */ } + /* [ pair nat nat (list key) + : pair (pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))))) + (list (option signature)) : pair nat nat (list key) ] */ ; DIP { UNPAIR - /* [ pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : list (option signature) : pair nat nat (list key) ] */ ; DUP - /* [ pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : list (option signature) : pair nat nat (list key) ] */ ; SELF /* [ contract - (pair (pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))))) - (list %sigs (option signature))) - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + (pair (pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))))) + (list (option signature))) + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : list (option signature) : pair nat nat (list key) ] */ ; ADDRESS /* [ address - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : list (option signature) : pair nat nat (list key) ] */ ; CHAIN_ID /* [ chain_id : address - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : list (option signature) : pair nat nat (list key) ] */ ; PAIR /* [ pair chain_id address - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : list (option signature) : pair nat nat (list key) ] */ ; PAIR /* [ pair (pair chain_id address) - (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : list (option signature) : pair nat nat (list key) ] */ ; PACK /* [ bytes - : pair (nat %counter) - (or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key)))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : pair nat + (or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key)))) + : list (option signature) : pair nat nat (list key) ] */ ; DIP { UNPAIR @counter /* [ nat - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : list (option signature) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : list (option signature) : pair nat nat (list key) ] */ ; DIP { SWAP /* [ list (option signature) - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } /* [ nat : list (option signature) - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } /* [ bytes : nat : list (option signature) - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; SWAP /* [ nat : bytes : list (option signature) - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } - /* [ pair (nat %stored_counter) (nat %threshold) (list %keys key) : nat : bytes - : list (option signature) - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } + /* [ pair nat nat (list key) : nat : bytes : list (option signature) + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; UNPAIR @stored_counter - /* [ nat : pair (nat %threshold) (list %keys key) : nat : bytes - : list (option signature) - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ nat : pair nat (list key) : nat : bytes : list (option signature) + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; DIP { SWAP - /* [ nat : pair (nat %threshold) (list %keys key) : bytes - : list (option signature) - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } - /* [ nat : nat : pair (nat %threshold) (list %keys key) : bytes - : list (option signature) - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ nat : pair nat (list key) : bytes : list (option signature) + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } + /* [ nat : nat : pair nat (list key) : bytes : list (option signature) + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; ASSERT_CMPEQ ; DIP { SWAP /* [ list (option signature) : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } - /* [ pair (nat %threshold) (list %keys key) : list (option signature) : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } + /* [ pair nat (list key) : list (option signature) : bytes + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; UNPAIR @threshold @keys /* [ nat : list key : list (option signature) : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; DIP { PUSH @valid nat 0 /* [ nat : list key : list (option signature) : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; SWAP /* [ list key : nat : list (option signature) : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; ITER { DIP { SWAP /* [ list (option signature) : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } /* [ key : list (option signature) : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; SWAP /* [ list (option signature) : key : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; IF_CONS { IF_SOME { SWAP /* [ list (option signature) : signature : key : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; DIP { SWAP /* [ key : signature : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; DIIP { DUUP /* [ bytes : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } /* [ key : signature : bytes : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; { DUUUP /* [ bytes : key : signature : bytes : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; DIP { CHECK_SIGNATURE /* [ bool : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } /* [ bytes : bool : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; SWAP /* [ bool : bytes : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; IF { DROP /* [ nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } { FAILWITH /* [] */ } } ; PUSH nat 1 /* [ nat : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; ADD @valid /* [ nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } /* [ list (option signature) : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } { SWAP /* [ key : list (option signature) : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; DROP /* [ list (option signature) : nat : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } } { FAIL } ; SWAP /* [ nat : list (option signature) : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } /* [ nat : list (option signature) : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ } + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ } /* [ nat : nat : list (option signature) : bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; ASSERT_CMPLE ; DROP /* [ bytes - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; DROP - /* [ or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair (nat %stored_counter) (nat %threshold) (list %keys key) ] */ ; + /* [ or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; DIP { UNPAIR - /* [ nat : pair (nat %threshold) (list %keys key) ] */ ; + /* [ nat : pair nat (list key) ] */ ; PUSH nat 1 - /* [ nat : nat : pair (nat %threshold) (list %keys key) ] */ ; + /* [ nat : nat : pair nat (list key) ] */ ; ADD @new_counter - /* [ nat : pair (nat %threshold) (list %keys key) ] */ ; + /* [ nat : pair nat (list key) ] */ ; PAIR - /* [ pair nat (nat %threshold) (list %keys key) ] */ } - /* [ or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair nat (nat %threshold) (list %keys key) ] */ ; + /* [ pair nat nat (list key) ] */ } + /* [ or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; NIL operation /* [ list operation - : or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : pair nat (nat %threshold) (list %keys key) ] */ ; + : or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : pair nat nat (list key) ] */ ; SWAP - /* [ or (pair (mutez %amount) (contract %dest unit)) - (or (option %delegate key_hash) - (pair %change_keys (nat %threshold) (list %keys key))) - : list operation : pair nat (nat %threshold) (list %keys key) ] */ ; + /* [ or (pair mutez (contract unit)) + (or (option %delegate key_hash) (pair %change_keys nat (list key))) + : list operation : pair nat nat (list key) ] */ ; IF_LEFT { UNPAIR - /* [ mutez : contract unit : list operation - : pair nat (nat %threshold) (list %keys key) ] */ ; + /* [ mutez : contract unit : list operation : pair nat nat (list key) ] */ ; UNIT - /* [ unit : mutez : contract unit : list operation - : pair nat (nat %threshold) (list %keys key) ] */ ; + /* [ unit : mutez : contract unit : list operation : pair nat nat (list key) ] */ ; TRANSFER_TOKENS - /* [ operation : list operation : pair nat (nat %threshold) (list %keys key) ] */ ; + /* [ operation : list operation : pair nat nat (list key) ] */ ; CONS - /* [ list operation : pair nat (nat %threshold) (list %keys key) ] */ } + /* [ list operation : pair nat nat (list key) ] */ } { IF_LEFT { SET_DELEGATE - /* [ operation : list operation : pair nat (nat %threshold) (list %keys key) ] */ ; + /* [ operation : list operation : pair nat nat (list key) ] */ ; CONS - /* [ list operation : pair nat (nat %threshold) (list %keys key) ] */ } + /* [ list operation : pair nat nat (list key) ] */ } { DIP { SWAP - /* [ pair nat (nat %threshold) (list %keys key) : list operation ] */ ; + /* [ pair nat nat (list key) : list operation ] */ ; CAR /* [ nat : list operation ] */ } - /* [ pair (nat %threshold) (list %keys key) : nat : list operation ] */ ; + /* [ pair nat (list key) : nat : list operation ] */ ; SWAP - /* [ nat : pair (nat %threshold) (list %keys key) : list operation ] */ ; + /* [ nat : pair nat (list key) : list operation ] */ ; PAIR - /* [ pair nat (nat %threshold) (list %keys key) : list operation ] */ ; + /* [ pair nat nat (list key) : list operation ] */ ; SWAP - /* [ list operation : pair nat (nat %threshold) (list %keys key) ] */ } } ; + /* [ list operation : pair nat nat (list key) ] */ } } ; PAIR - /* [ pair (list operation) nat (nat %threshold) (list %keys key) ] */ } } + /* [ pair (list operation) nat nat (list key) ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--lqt_fa12.mligo.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--lqt_fa12.mligo.tz].out index 473949c34bdc9d53d1273a28d4d5219bb4957994..d2d4586547b253c35271fb3191dbc95c420bcb16 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--lqt_fa12.mligo.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--lqt_fa12.mligo.tz].out @@ -16,2708 +16,1392 @@ Gas remaining: 1039662.882 units remaining (pair (big_map %allowances (pair (address %owner) (address %spender)) nat) (pair (address %admin) (nat %total_supply)))) ; code { DUP - /* [ pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat + : pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ ; CDR - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ ; PUSH mutez 0 /* [ mutez - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ ; AMOUNT /* [ mutez : mutez - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ ; COMPARE /* [ int - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ ; NEQ /* [ bool - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ ; IF { PUSH string "DontSendTez" /* [ string - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ ; FAILWITH /* [] */ } - { /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + { /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ } ; SWAP - /* [ pair (or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value)))) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat))) + (big_map address nat) + (big_map (pair address address) nat) + address + nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ or (or (or (pair %approve (address %spender) (nat %value)) - (pair %getAllowance - (pair %request (address %owner) (address %spender)) - (contract %callback nat))) - (or (pair %getBalance (address %owner) (contract %callback nat)) - (pair %getTotalSupply (unit %request) (contract %callback nat)))) - (or (pair %mintOrBurn (int %quantity) (address %target)) - (pair %transfer (address %from) (address %to) (nat %value))) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ or (or (or (pair %approve address nat) + (pair %getAllowance (pair address address) (contract nat))) + (or (pair %getBalance address (contract nat)) + (pair %getTotalSupply unit (contract nat)))) + (or (pair %mintOrBurn int address) (pair %transfer address address nat)) + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_LEFT { IF_LEFT { IF_LEFT { SWAP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %spender) (nat %value) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address nat ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %spender) (nat %value) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address nat ] */ ; DUG 2 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ pair (address %spender) (nat %value) - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %spender) (nat %value) : pair (address %spender) (nat %value) - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : pair address nat : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 2 - /* [ pair (address %spender) (nat %value) - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ address : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ address : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SENDER - /* [ address : address : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ address : address : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR - /* [ pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PUSH nat 0 - /* [ nat : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ pair (address %spender) (nat %value) : nat : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : nat : pair address address + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %spender) (nat %value) : pair (address %spender) (nat %value) - : nat : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : pair address nat : nat : pair address address + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 4 - /* [ pair (address %spender) (nat %value) : nat : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : nat : pair address address + : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ nat : nat : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; COMPARE - /* [ int : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; GT - /* [ bool : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ bool : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PUSH nat 0 - /* [ nat : bool : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : bool : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ big_map (pair (address %owner) (address %spender)) nat : nat : bool - : pair address address : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : nat : bool : pair address address + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ big_map (pair (address %owner) (address %spender)) nat - : big_map (pair (address %owner) (address %spender)) nat : nat : bool - : pair address address : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : big_map (pair address address) nat + : nat : bool : pair address address : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 4 - /* [ big_map (pair (address %owner) (address %spender)) nat : nat : bool - : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : nat : bool : pair address address + : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ pair address address - : big_map (pair (address %owner) (address %spender)) nat : nat : bool - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address : big_map (pair address address) nat : nat : bool + : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP /* [ pair address address : pair address address - : big_map (pair (address %owner) (address %spender)) nat : nat : bool - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : nat : bool + : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 4 - /* [ pair address address - : big_map (pair (address %owner) (address %spender)) nat : nat : bool - : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address : big_map (pair address address) nat : nat : bool + : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; GET /* [ option nat : nat : bool : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH nat 0 /* [ nat : nat : bool : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } { /* [ nat : nat : bool : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; COMPARE - /* [ int : bool : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : bool : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; GT - /* [ bool : bool : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ bool : bool : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; AND - /* [ bool : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ bool : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF { PUSH string "UnsafeAllowanceChange" - /* [ string : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ string : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; FAILWITH /* [] */ } - { /* [ pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + { /* [ pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; DIG 3 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address address : big_map (pair address address) nat + : pair address nat ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address address : big_map (pair address address) nat + : pair address nat ] */ ; DUG 4 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat + : pair address address : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %admin) (nat %total_supply) : pair address address - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : pair address address + : big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (address %spender) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : pair address nat + : pair address address : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ pair (address %spender) (nat %value) - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ nat : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PUSH nat 0 - /* [ nat : nat : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ nat : nat : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ nat : nat : nat : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 2 - /* [ nat : nat : nat : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; COMPARE - /* [ int : nat : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; EQ - /* [ bool : nat : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ bool : nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF { DROP - /* [ big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NONE nat - /* [ option nat : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + /* [ option nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } { SOME - /* [ option nat : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) : pair address address - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + /* [ option nat : big_map (pair address address) nat : pair address nat + : pair address address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; DIG 3 - /* [ pair address address : option nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address : option nat : big_map (pair address address) nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; UPDATE - /* [ big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR - /* [ pair (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map (pair address address) nat) address nat ] */ ; CAR /* [ big_map address nat - : pair (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map (pair address address) nat) address nat ] */ ; PAIR - /* [ pair (big_map address nat) - (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NIL operation /* [ list operation - : pair (big_map address nat) - (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR /* [ pair (list operation) (big_map address nat) - (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + (big_map (pair address address) nat) + address + nat ] */ } { SWAP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (pair address address) (contract nat) ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (pair address address) (contract nat) ] */ ; DIG 2 - /* [ pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (pair address address) (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NIL operation - /* [ list operation - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ list operation : pair (pair address address) (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (pair address address) (contract nat) : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (pair address address) (contract nat) + : pair (pair address address) (contract nat) : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 2 - /* [ pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : list operation - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (pair address address) (contract nat) : list operation + : pair (pair address address) (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ contract nat : list operation - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ contract nat : list operation : pair (pair address address) (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PUSH mutez 0 /* [ mutez : contract nat : list operation - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (pair address address) (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 4 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : mutez : contract nat : list operation - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : mutez : contract nat : list operation + : pair (pair address address) (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : mutez : contract nat : list operation - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat : mutez + : contract nat : list operation : pair (pair address address) (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ big_map (pair (address %owner) (address %spender)) nat : mutez - : contract nat : list operation - : pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : mutez : contract nat : list operation + : pair (pair address address) (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 4 - /* [ pair (pair %request (address %owner) (address %spender)) (contract %callback nat) - : big_map (pair (address %owner) (address %spender)) nat : mutez - : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (pair address address) (contract nat) + : big_map (pair address address) nat : mutez : contract nat : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ pair (address %owner) (address %spender) - : big_map (pair (address %owner) (address %spender)) nat : mutez + /* [ pair address address : big_map (pair address address) nat : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; GET /* [ option nat : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH nat 0 /* [ nat : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } { /* [ nat : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; TRANSFER_TOKENS /* [ operation : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CONS /* [ list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR /* [ pair (list operation) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } } + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ } } { IF_LEFT { SWAP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %owner) (contract %callback nat) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address (contract nat) ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %owner) (contract %callback nat) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address (contract nat) ] */ ; DIG 2 - /* [ pair (address %owner) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NIL operation - /* [ list operation : pair (address %owner) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ list operation : pair address (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ pair (address %owner) (contract %callback nat) : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address (contract nat) : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %owner) (contract %callback nat) - : pair (address %owner) (contract %callback nat) : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address (contract nat) : pair address (contract nat) : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 2 - /* [ pair (address %owner) (contract %callback nat) : list operation - : pair (address %owner) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address (contract nat) : list operation : pair address (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ contract nat : list operation - : pair (address %owner) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ contract nat : list operation : pair address (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PUSH mutez 0 - /* [ mutez : contract nat : list operation - : pair (address %owner) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ mutez : contract nat : list operation : pair address (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 4 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : mutez : contract nat : list operation - : pair (address %owner) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : mutez : contract nat : list operation : pair address (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR /* [ big_map address nat : mutez : contract nat : list operation - : pair (address %owner) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair address (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 4 - /* [ pair (address %owner) (contract %callback nat) : big_map address nat - : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address (contract nat) : big_map address nat : mutez : contract nat + : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR /* [ address : big_map address nat : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; GET /* [ option nat : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH nat 0 /* [ nat : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } { /* [ nat : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; TRANSFER_TOKENS /* [ operation : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CONS /* [ list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR /* [ pair (list operation) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ } { SWAP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (unit %request) (contract %callback nat) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair unit (contract nat) ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (unit %request) (contract %callback nat) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair unit (contract nat) ] */ ; DIG 2 - /* [ pair (unit %request) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair unit (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NIL operation - /* [ list operation : pair (unit %request) (contract %callback nat) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ list operation : pair unit (contract nat) + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ pair (unit %request) (contract %callback nat) : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair unit (contract nat) : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR /* [ contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PUSH mutez 0 /* [ mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : mutez : contract nat : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat : mutez + : contract nat : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %admin) (nat %total_supply) : mutez : contract nat - : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : mutez : contract nat : list operation + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR /* [ nat : mutez : contract nat : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; TRANSFER_TOKENS /* [ operation : list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CONS /* [ list operation - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR /* [ pair (list operation) - (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } } } + (big_map address nat) + (big_map (pair address address) nat) + address + nat ] */ } } } { IF_LEFT { SWAP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (int %quantity) (address %target) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair int address ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (int %quantity) (address %target) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair int address ] */ ; DUG 2 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %admin) (nat %total_supply) - : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ address : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ address : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SENDER - /* [ address : address : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ address : address : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; COMPARE - /* [ int : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NEQ - /* [ bool : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ bool : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF { PUSH string "OnlyAdmin" - /* [ string : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ string : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; FAILWITH /* [] */ } - { /* [ pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + { /* [ pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; DUP - /* [ pair (int %quantity) (address %target) - : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair int address : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ int : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : int : pair (int %quantity) (address %target) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : int : pair int address ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : int : pair (int %quantity) (address %target) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : int : pair int address ] */ ; DUG 3 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : int : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ big_map address nat : int : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ pair (int %quantity) (address %target) : big_map address nat : int - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair int address : big_map address nat : int + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (int %quantity) (address %target) - : pair (int %quantity) (address %target) : big_map address nat : int - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair int address : pair int address : big_map address nat : int + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 3 - /* [ pair (int %quantity) (address %target) : big_map address nat : int - : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair int address : big_map address nat : int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ address : big_map address nat : int - : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ address : big_map address nat : int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; GET - /* [ option nat : int : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ option nat : int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH nat 0 - /* [ nat : int : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } - { /* [ nat : int : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + /* [ nat : int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } + { /* [ nat : int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; ADD - /* [ int : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; ISNAT - /* [ option nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ option nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH string "Cannot burn more than the target's balance." - /* [ string : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ string : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; FAILWITH /* [] */ } - { /* [ nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + { /* [ nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; SWAP - /* [ pair (int %quantity) (address %target) : nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair int address : nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (int %quantity) (address %target) - : pair (int %quantity) (address %target) : nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair int address : pair int address : nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 2 - /* [ pair (int %quantity) (address %target) : nat - : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair int address : nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ int : nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : int : nat - : pair (int %quantity) (address %target) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : int : nat : pair int address ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : int : nat - : pair (int %quantity) (address %target) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : int : nat : pair int address ] */ ; DUG 4 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : int : nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : int : nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : int : nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat : int : nat + : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %admin) (nat %total_supply) : int : nat - : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : int : nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ nat : int : nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : int : nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; ADD - /* [ int : nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; ABS - /* [ nat : nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat - : pair (int %quantity) (address %target) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : nat : nat : pair int address ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat - : pair (int %quantity) (address %target) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : nat : nat : pair int address ] */ ; DUG 4 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : nat : nat : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat : pair (int %quantity) (address %target) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat : nat : nat + : pair int address + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 4 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat - : pair (int %quantity) (address %target) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map (pair address address) nat) address nat : nat : nat + : pair int address ] */ ; CAR - /* [ big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat - : pair (int %quantity) (address %target) ] */ ; + /* [ big_map address nat : pair (big_map (pair address address) nat) address nat + : nat : nat : pair int address ] */ ; PUSH nat 0 /* [ nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat - : pair (int %quantity) (address %target) ] */ ; + : pair (big_map (pair address address) nat) address nat : nat : nat + : pair int address ] */ ; DIG 4 /* [ nat : nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : pair (int %quantity) (address %target) ] */ ; + : pair (big_map (pair address address) nat) address nat : nat + : pair int address ] */ ; DUP /* [ nat : nat : nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : pair (int %quantity) (address %target) ] */ ; + : pair (big_map (pair address address) nat) address nat : nat + : pair int address ] */ ; DUG 5 /* [ nat : nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat - : pair (int %quantity) (address %target) ] */ ; + : pair (big_map (pair address address) nat) address nat : nat : nat + : pair int address ] */ ; COMPARE /* [ int : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat - : pair (int %quantity) (address %target) ] */ ; + : pair (big_map (pair address address) nat) address nat : nat : nat + : pair int address ] */ ; EQ /* [ bool : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : nat - : pair (int %quantity) (address %target) ] */ ; + : pair (big_map (pair address address) nat) address nat : nat : nat + : pair int address ] */ ; IF { DIG 3 /* [ nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : pair (int %quantity) (address %target) ] */ ; + : pair (big_map (pair address address) nat) address nat : nat + : pair int address ] */ ; DROP - /* [ big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : pair (int %quantity) (address %target) ] */ ; + /* [ big_map address nat : pair (big_map (pair address address) nat) address nat + : nat : pair int address ] */ ; NONE nat /* [ option nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : pair (int %quantity) (address %target) ] */ } + : pair (big_map (pair address address) nat) address nat : nat + : pair int address ] */ } { DIG 3 /* [ nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : pair (int %quantity) (address %target) ] */ ; + : pair (big_map (pair address address) nat) address nat : nat + : pair int address ] */ ; SOME /* [ option nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat : pair (int %quantity) (address %target) ] */ } ; + : pair (big_map (pair address address) nat) address nat : nat + : pair int address ] */ } ; DIG 4 - /* [ pair (int %quantity) (address %target) : option nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat ] */ ; + /* [ pair int address : option nat : big_map address nat + : pair (big_map (pair address address) nat) address nat : nat ] */ ; CDR /* [ address : option nat : big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat ] */ ; + : pair (big_map (pair address address) nat) address nat : nat ] */ ; UPDATE - /* [ big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat ] */ ; + /* [ big_map address nat : pair (big_map (pair address address) nat) address nat + : nat ] */ ; PAIR - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : nat ] */ ; DUP - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : nat ] */ ; DUG 2 - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : nat - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat : nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %admin) (nat %total_supply) : nat - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR /* [ address : nat - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR /* [ pair address nat - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair address nat ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address nat ] */ ; DUP - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair address nat ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address nat ] */ ; DUG 2 - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair address nat - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair address nat - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ big_map (pair (address %owner) (address %spender)) nat : pair address nat - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR - /* [ pair (big_map (pair (address %owner) (address %spender)) nat) address nat - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map (pair (address %owner) (address %spender)) nat) address nat ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map (pair address address) nat) address nat ] */ ; CAR /* [ big_map address nat - : pair (big_map (pair (address %owner) (address %spender)) nat) address nat ] */ ; + : pair (big_map (pair address address) nat) address nat ] */ ; PAIR - /* [ pair (big_map address nat) - (big_map (pair (address %owner) (address %spender)) nat) - address - nat ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NIL operation /* [ list operation - : pair (big_map address nat) - (big_map (pair (address %owner) (address %spender)) nat) - address - nat ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR /* [ pair (list operation) (big_map address nat) - (big_map (pair (address %owner) (address %spender)) nat) + (big_map (pair address address) nat) address nat ] */ } { SWAP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %from) (address %to) (nat %value) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address address nat ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %from) (address %to) (nat %value) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address address nat ] */ ; DUG 2 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : big_map (pair address address) nat : pair address address nat ] */ ; DUP - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : big_map (pair address address) nat : pair address address nat ] */ ; DUG 3 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ pair (address %from) (address %to) (nat %value) : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %from) (address %to) (nat %value) - : pair (address %from) (address %to) (nat %value) : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address nat : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 3 - /* [ pair (address %from) (address %to) (nat %value) : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : big_map address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ address : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SENDER /* [ address : address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; COMPARE - /* [ int : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; EQ - /* [ bool : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ bool : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF { SWAP - /* [ big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + /* [ big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } { SENDER - /* [ address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ address : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ pair (address %from) (address %to) (nat %value) : address - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : address : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %from) (address %to) (nat %value) - : pair (address %from) (address %to) (nat %value) : address - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address nat : address + : big_map address nat : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 4 - /* [ pair (address %from) (address %to) (nat %value) : address - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : address : big_map address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR /* [ address : address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR /* [ pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ pair (address %from) (address %to) (nat %value) : pair address address - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %from) (address %to) (nat %value) - : pair (address %from) (address %to) (nat %value) : pair address address - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address nat : pair address address + : big_map address nat : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 4 - /* [ pair (address %from) (address %to) (nat %value) : pair address address - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address : big_map address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %to) (nat %value) : pair address address - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : pair address address : big_map address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR /* [ nat : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 3 - /* [ big_map (pair (address %owner) (address %spender)) nat : nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ big_map (pair (address %owner) (address %spender)) nat - : big_map (pair (address %owner) (address %spender)) nat : nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : big_map (pair address address) nat + : nat : pair address address : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 4 - /* [ big_map (pair (address %owner) (address %spender)) nat : nat - : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : nat : pair address address + : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ pair address address - : big_map (pair (address %owner) (address %spender)) nat : nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address : big_map (pair address address) nat : nat + : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP /* [ pair address address : pair address address - : big_map (pair (address %owner) (address %spender)) nat : nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : nat : big_map address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 3 - /* [ pair address address - : big_map (pair (address %owner) (address %spender)) nat : nat + /* [ pair address address : big_map (pair address address) nat : nat : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; GET /* [ option nat : nat : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH nat 0 /* [ nat : nat : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } { /* [ nat : nat : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; SUB /* [ int : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; ISNAT /* [ option nat : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH string "NotEnoughAllowance" /* [ string : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; FAILWITH /* [] */ } { /* [ nat : pair address address : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; DIG 3 - /* [ big_map (pair (address %owner) (address %spender)) nat : nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PUSH nat 0 - /* [ nat : big_map (pair (address %owner) (address %spender)) nat : nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map (pair address address) nat : nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ nat : nat : big_map (pair (address %owner) (address %spender)) nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : big_map (pair address address) nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ nat : nat : nat : big_map (pair (address %owner) (address %spender)) nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : nat : big_map (pair address address) nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 3 - /* [ nat : nat : big_map (pair (address %owner) (address %spender)) nat : nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : big_map (pair address address) nat : nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; COMPARE - /* [ int : big_map (pair (address %owner) (address %spender)) nat : nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : big_map (pair address address) nat : nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; EQ - /* [ bool : big_map (pair (address %owner) (address %spender)) nat : nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ bool : big_map (pair address address) nat : nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF { SWAP - /* [ nat : big_map (pair (address %owner) (address %spender)) nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map (pair address address) nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DROP - /* [ big_map (pair (address %owner) (address %spender)) nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NONE nat - /* [ option nat : big_map (pair (address %owner) (address %spender)) nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + /* [ option nat : big_map (pair address address) nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } { SWAP - /* [ nat : big_map (pair (address %owner) (address %spender)) nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map (pair address address) nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SOME - /* [ option nat : big_map (pair (address %owner) (address %spender)) nat - : pair address address : big_map address nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + /* [ option nat : big_map (pair address address) nat : pair address address + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; DIG 2 - /* [ pair address address : option nat - : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address : option nat : big_map (pair address address) nat + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; UPDATE - /* [ big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + /* [ big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; DIG 2 - /* [ pair (address %from) (address %to) (nat %value) - : big_map (pair (address %owner) (address %spender)) nat + /* [ pair address address nat : big_map (pair address address) nat : big_map address nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %from) (address %to) (nat %value) - : pair (address %from) (address %to) (nat %value) - : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address nat + : big_map (pair address address) nat : big_map address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 3 - /* [ pair (address %from) (address %to) (nat %value) - : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : big_map (pair address address) nat + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %to) (nat %value) - : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ nat : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP /* [ big_map address nat : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 3 - /* [ big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : nat : big_map (pair address address) nat + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 4 - /* [ pair (address %from) (address %to) (nat %value) : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : big_map address nat : nat + : big_map (pair address address) nat : big_map address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %from) (address %to) (nat %value) - : pair (address %from) (address %to) (nat %value) : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address nat : big_map address nat + : nat : big_map (pair address address) nat : big_map address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 5 - /* [ pair (address %from) (address %to) (nat %value) : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : big_map address nat : nat + : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR - /* [ address : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ address : big_map address nat : nat : big_map (pair address address) nat + : big_map address nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; GET - /* [ option nat : nat : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ option nat : nat : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH nat 0 - /* [ nat : nat : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } - { /* [ nat : nat : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + /* [ nat : nat : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } + { /* [ nat : nat : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; SUB - /* [ int : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; ISNAT - /* [ option nat : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ option nat : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH string "NotEnoughBalance" - /* [ string : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ string : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; FAILWITH /* [] */ } - { /* [ nat : big_map (pair (address %owner) (address %spender)) nat - : big_map address nat : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + { /* [ nat : big_map (pair address address) nat : big_map address nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; DIG 2 - /* [ big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PUSH nat 0 - /* [ nat : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ nat : nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ nat : nat : nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 3 - /* [ nat : nat : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; COMPARE - /* [ int : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; EQ - /* [ bool : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ bool : big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF { SWAP - /* [ nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DROP - /* [ big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NONE nat - /* [ option nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + /* [ option nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } { SWAP - /* [ nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SOME - /* [ option nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + /* [ option nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; DIG 3 - /* [ pair (address %from) (address %to) (nat %value) : option nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : option nat : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %from) (address %to) (nat %value) - : pair (address %from) (address %to) (nat %value) : option nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address nat : option nat + : big_map address nat : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 4 - /* [ pair (address %from) (address %to) (nat %value) : option nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : option nat : big_map address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR /* [ address : option nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; UPDATE - /* [ big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ pair (address %from) (address %to) (nat %value) : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %from) (address %to) (nat %value) - : pair (address %from) (address %to) (nat %value) : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address nat : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 3 - /* [ pair (address %from) (address %to) (nat %value) : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : big_map address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %to) (nat %value) : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP /* [ big_map address nat : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 2 /* [ big_map address nat : nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 4 - /* [ pair (address %from) (address %to) (nat %value) : big_map address nat : nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : big_map address nat : nat : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ pair (address %from) (address %to) (nat %value) - : pair (address %from) (address %to) (nat %value) : big_map address nat : nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : pair address address nat : big_map address nat + : nat : big_map address nat : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 5 - /* [ pair (address %from) (address %to) (nat %value) : big_map address nat : nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : big_map address nat : nat : big_map address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %to) (nat %value) : big_map address nat : nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : big_map address nat : nat : big_map address nat + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR /* [ address : big_map address nat : nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; GET - /* [ option nat : nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ option nat : nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF_NONE { PUSH nat 0 - /* [ nat : nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } - { /* [ nat : nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + /* [ nat : nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } + { /* [ nat : nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; ADD - /* [ nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PUSH nat 0 - /* [ nat : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ nat : nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUP - /* [ nat : nat : nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DUG 3 - /* [ nat : nat : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : nat : big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; COMPARE - /* [ int : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ int : big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; EQ - /* [ bool : big_map address nat : nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ bool : big_map address nat : nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; IF { SWAP - /* [ nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DROP - /* [ big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NONE nat - /* [ option nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } + /* [ option nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } { SWAP - /* [ nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SOME - /* [ option nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (address %from) (address %to) (nat %value) - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } ; + /* [ option nat : big_map address nat : big_map (pair address address) nat + : pair address address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ } ; DIG 3 - /* [ pair (address %from) (address %to) (nat %value) : option nat - : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address address nat : option nat : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CDR - /* [ pair (address %to) (nat %value) : option nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair address nat : option nat : big_map address nat + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; CAR /* [ address : option nat : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; UPDATE - /* [ big_map address nat - : big_map (pair (address %owner) (address %spender)) nat - : pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map address nat : big_map (pair address address) nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; DIG 2 - /* [ pair (big_map %tokens address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : big_map address nat : big_map (pair address address) nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) : big_map address nat - : big_map (pair (address %owner) (address %spender)) nat ] */ ; + /* [ pair (big_map (pair address address) nat) address nat : big_map address nat + : big_map (pair address address) nat ] */ ; SWAP - /* [ big_map address nat - : pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : big_map (pair (address %owner) (address %spender)) nat ] */ ; + /* [ big_map address nat : pair (big_map (pair address address) nat) address nat + : big_map (pair address address) nat ] */ ; PAIR - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : big_map (pair (address %owner) (address %spender)) nat ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : big_map (pair address address) nat ] */ ; DUP - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : big_map (pair (address %owner) (address %spender)) nat ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : big_map (pair address address) nat ] */ ; CDR - /* [ pair (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : big_map (pair (address %owner) (address %spender)) nat ] */ ; + /* [ pair (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : big_map (pair address address) nat ] */ ; CDR - /* [ pair (address %admin) (nat %total_supply) - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : big_map (pair (address %owner) (address %spender)) nat ] */ ; + /* [ pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat + : big_map (pair address address) nat ] */ ; DIG 2 - /* [ big_map (pair (address %owner) (address %spender)) nat - : pair (address %admin) (nat %total_supply) - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ big_map (pair address address) nat : pair address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR - /* [ pair (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map (pair address address) nat) address nat + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; SWAP - /* [ pair (big_map address nat) - (big_map %allowances (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) - : pair (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat + : pair (big_map (pair address address) nat) address nat ] */ ; CAR /* [ big_map address nat - : pair (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map (pair address address) nat) address nat ] */ ; PAIR - /* [ pair (big_map address nat) - (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + /* [ pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; NIL operation /* [ list operation - : pair (big_map address nat) - (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ ; + : pair (big_map address nat) (big_map (pair address address) nat) address nat ] */ ; PAIR /* [ pair (list operation) (big_map address nat) - (big_map (pair (address %owner) (address %spender)) nat) - (address %admin) - (nat %total_supply) ] */ } } } } + (big_map (pair address address) nat) + address + nat ] */ } } } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_fungible.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_fungible.tz].out index ecbda13d58920f3d280357ffaea833df96cf4170..2a3ed74bf5f5d8d52dcfa147161752e015f5604e 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_fungible.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_fungible.tz].out @@ -8,19 +8,14 @@ Gas remaining: 1039973.685 units remaining storage address ; code { AMOUNT /* [ mutez - : pair (or (ticket %burn unit) - (pair %mint (contract %destination (ticket unit)) (nat %amount))) - address ] */ ; + : pair (or (ticket %burn unit) (pair %mint (contract (ticket unit)) nat)) address ] */ ; PUSH mutez 0 /* [ mutez : mutez - : pair (or (ticket %burn unit) - (pair %mint (contract %destination (ticket unit)) (nat %amount))) - address ] */ ; + : pair (or (ticket %burn unit) (pair %mint (contract (ticket unit)) nat)) address ] */ ; ASSERT_CMPEQ ; UNPAIR - /* [ or (ticket %burn unit) - (pair %mint (contract %destination (ticket unit)) (nat %amount)) + /* [ or (ticket %burn unit) (pair %mint (contract (ticket unit)) nat) : address ] */ ; IF_LEFT { READ_TICKET @@ -34,13 +29,10 @@ Gas remaining: 1039973.685 units remaining /* [ address ] */ ; NIL operation /* [ list operation : address ] */ } - { DUP @manager - 2 - /* [ address : pair (contract %destination (ticket unit)) (nat %amount) - : address ] */ ; + { DUP @manager 2 + /* [ address : pair (contract (ticket unit)) nat : address ] */ ; SENDER - /* [ address : address - : pair (contract %destination (ticket unit)) (nat %amount) : address ] */ ; + /* [ address : address : pair (contract (ticket unit)) nat : address ] */ ; ASSERT_CMPEQ ; UNPAIR /* [ contract (ticket unit) : nat : address ] */ ; diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_non_fungible.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_non_fungible.tz].out index 3eed07403e584d7591704314159528ba74187070..85b9d00439466807956896ef8efa12c2ca25f7c8 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_non_fungible.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_builder_non_fungible.tz].out @@ -6,15 +6,11 @@ Gas remaining: 1039970.718 units remaining storage (pair (address %manager) (nat %counter)) ; code { AMOUNT /* [ mutez - : pair (or (ticket %burn nat) (contract %mint_destination (ticket nat))) - (address %manager) - (nat %counter) ] */ ; + : pair (or (ticket %burn nat) (contract %mint_destination (ticket nat))) address nat ] */ ; PUSH mutez 0 /* [ mutez : mutez - : pair (or (ticket %burn nat) (contract %mint_destination (ticket nat))) - (address %manager) - (nat %counter) ] */ ; + : pair (or (ticket %burn nat) (contract %mint_destination (ticket nat))) address nat ] */ ; ASSERT_CMPEQ ; UNPAIR 3 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_fungible.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_fungible.tz].out index 2f781db90855f93e1048223fb7c97110c7eeb04d..7040c27ff83300c091d35f4918f92b969d6591c9 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_fungible.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_fungible.tz].out @@ -8,22 +8,19 @@ Gas remaining: 1039935.806 units remaining storage (pair (address %manager) (big_map %tickets address (ticket unit))) ; code { AMOUNT /* [ mutez - : pair (or (ticket %receive unit) - (pair %send (contract %destination (ticket unit)) (nat %amount) (address %ticketer))) - (address %manager) - (big_map %tickets address (ticket unit)) ] */ ; + : pair (or (ticket %receive unit) (pair %send (contract (ticket unit)) nat address)) + address + (big_map address (ticket unit)) ] */ ; PUSH mutez 0 /* [ mutez : mutez - : pair (or (ticket %receive unit) - (pair %send (contract %destination (ticket unit)) (nat %amount) (address %ticketer))) - (address %manager) - (big_map %tickets address (ticket unit)) ] */ ; + : pair (or (ticket %receive unit) (pair %send (contract (ticket unit)) nat address)) + address + (big_map address (ticket unit)) ] */ ; ASSERT_CMPEQ ; UNPAIR 3 - /* [ or (ticket %receive unit) - (pair %send (contract %destination (ticket unit)) (nat %amount) (address %ticketer)) + /* [ or (ticket %receive unit) (pair %send (contract (ticket unit)) nat address) : address : big_map address (ticket unit) ] */ ; IF_LEFT { READ_TICKET @@ -71,13 +68,11 @@ Gas remaining: 1039935.806 units remaining /* [ list operation : pair address (big_map address (ticket unit)) ] */ } { DUP @manager 2 - /* [ address - : pair (contract %destination (ticket unit)) (nat %amount) (address %ticketer) - : address : big_map address (ticket unit) ] */ ; + /* [ address : pair (contract (ticket unit)) nat address : address + : big_map address (ticket unit) ] */ ; SENDER - /* [ address : address - : pair (contract %destination (ticket unit)) (nat %amount) (address %ticketer) - : address : big_map address (ticket unit) ] */ ; + /* [ address : address : pair (contract (ticket unit)) nat address : address + : big_map address (ticket unit) ] */ ; ASSERT_CMPEQ ; UNPAIR 3 diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_non_fungible.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_non_fungible.tz].out index bc3624931db018fb05a5842a18f344e3f6395363..8a9b2c3f6aca8c9efd212a02866db6811063bbca 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_non_fungible.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--ticket_wallet_non_fungible.tz].out @@ -8,29 +8,26 @@ Gas remaining: 1039952.622 units remaining storage (pair (address %manager) (big_map %tickets (pair address nat) (ticket nat))) ; code { AMOUNT /* [ mutez - : pair (or (ticket %receive nat) - (pair %send (contract %destination (ticket nat)) (address %ticketer) (nat %id))) - (address %manager) - (big_map %tickets (pair address nat) (ticket nat)) ] */ ; + : pair (or (ticket %receive nat) (pair %send (contract (ticket nat)) address nat)) + address + (big_map (pair address nat) (ticket nat)) ] */ ; PUSH mutez 0 /* [ mutez : mutez - : pair (or (ticket %receive nat) - (pair %send (contract %destination (ticket nat)) (address %ticketer) (nat %id))) - (address %manager) - (big_map %tickets (pair address nat) (ticket nat)) ] */ ; + : pair (or (ticket %receive nat) (pair %send (contract (ticket nat)) address nat)) + address + (big_map (pair address nat) (ticket nat)) ] */ ; ASSERT_CMPEQ ; UNPAIR 3 - /* [ or (ticket %receive nat) - (pair %send (contract %destination (ticket nat)) (address %ticketer) (nat %id)) + /* [ or (ticket %receive nat) (pair %send (contract (ticket nat)) address nat) : address : big_map (pair address nat) (ticket nat) ] */ ; IF_LEFT { READ_TICKET /* [ pair address nat nat : ticket nat : address : big_map (pair address nat) (ticket nat) ] */ ; CAST (pair (address %ticketer) (nat %id) (nat %amount)) - /* [ pair (address %ticketer) (nat %id) (nat %amount) : ticket nat : address + /* [ pair address nat nat : ticket nat : address : big_map (pair address nat) (ticket nat) ] */ ; UNPAIR 3 @@ -64,25 +61,23 @@ Gas remaining: 1039952.622 units remaining /* [ list operation : pair address (big_map (pair address nat) (ticket nat)) ] */ } { DUP @manager 2 - /* [ address - : pair (contract %destination (ticket nat)) (address %ticketer) (nat %id) - : address : big_map (pair address nat) (ticket nat) ] */ ; + /* [ address : pair (contract (ticket nat)) address nat : address + : big_map (pair address nat) (ticket nat) ] */ ; SENDER - /* [ address : address - : pair (contract %destination (ticket nat)) (address %ticketer) (nat %id) - : address : big_map (pair address nat) (ticket nat) ] */ ; + /* [ address : address : pair (contract (ticket nat)) address nat : address + : big_map (pair address nat) (ticket nat) ] */ ; ASSERT_CMPEQ ; UNPAIR - /* [ contract (ticket nat) : pair (address %ticketer) (nat %id) : address + /* [ contract (ticket nat) : pair address nat : address : big_map (pair address nat) (ticket nat) ] */ ; DIG 3 /* [ big_map (pair address nat) (ticket nat) : contract (ticket nat) - : pair (address %ticketer) (nat %id) : address ] */ ; + : pair address nat : address ] */ ; NONE (ticket nat) /* [ option (ticket nat) : big_map (pair address nat) (ticket nat) - : contract (ticket nat) : pair (address %ticketer) (nat %id) : address ] */ ; + : contract (ticket nat) : pair address nat : address ] */ ; DIG 3 - /* [ pair (address %ticketer) (nat %id) : option (ticket nat) + /* [ pair address nat : option (ticket nat) : big_map (pair address nat) (ticket nat) : contract (ticket nat) : address ] */ ; GET_AND_UPDATE /* [ option (ticket nat) : big_map (pair address nat) (ticket nat) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--vote_for_delegate.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--vote_for_delegate.tz].out index 84cf87c812b52ccae13408999577bbd22653ce4f..c645ea6f7bd7f02c0dce15f2fab0340741088547 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--vote_for_delegate.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--vote_for_delegate.tz].out @@ -7,129 +7,108 @@ Gas remaining: 1039933.671 units remaining (pair (pair %mgr1 (address %addr) (option %key key_hash)) (pair %mgr2 (address %addr) (option %key key_hash))) ; code { DUP - /* [ pair (option key_hash) - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) - : pair (option key_hash) - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; + /* [ pair (option key_hash) (pair address (option key_hash)) address (option key_hash) + : pair (option key_hash) (pair address (option key_hash)) address (option key_hash) ] */ ; CDAAR %addr @% ; SENDER /* [ address : address - : pair (option key_hash) - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; + : pair (option key_hash) (pair address (option key_hash)) address (option key_hash) ] */ ; PAIR %@ %@ /* [ pair address address - : pair (option key_hash) - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; + : pair (option key_hash) (pair address (option key_hash)) address (option key_hash) ] */ ; UNPAIR /* [ address : address - : pair (option key_hash) - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; + : pair (option key_hash) (pair address (option key_hash)) address (option key_hash) ] */ ; IFCMPEQ { UNPAIR /* [ option key_hash - : pair (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; SWAP - /* [ pair (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) : option key_hash ] */ ; + /* [ pair (pair address (option key_hash)) address (option key_hash) + : option key_hash ] */ ; SET_CADR %key @changed_mgr1_key } { DUP - /* [ pair (option key_hash) - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) - : pair (option key_hash) - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; + /* [ pair (option key_hash) (pair address (option key_hash)) address (option key_hash) + : pair (option key_hash) (pair address (option key_hash)) address (option key_hash) ] */ ; CDDAR ; SENDER /* [ address : address - : pair (option key_hash) - (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; + : pair (option key_hash) (pair address (option key_hash)) address (option key_hash) ] */ ; IFCMPEQ { UNPAIR /* [ option key_hash - : pair (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; SWAP - /* [ pair (pair %mgr1 (address %addr) (option %key key_hash)) - (pair %mgr2 (address %addr) (option %key key_hash)) : option key_hash ] */ ; + /* [ pair (pair address (option key_hash)) address (option key_hash) + : option key_hash ] */ ; SET_CDDR %key } { FAIL } } ; DUP - /* [ pair (pair address (option %key key_hash)) address (option %key key_hash) - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + /* [ pair (pair address (option key_hash)) address (option key_hash) + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; CADR ; DIP { DUP - /* [ pair (pair address (option %key key_hash)) address (option %key key_hash) - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + /* [ pair (pair address (option key_hash)) address (option key_hash) + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; CDDR } /* [ option key_hash : option key_hash - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; IF_NONE { IF_NONE { NONE key_hash /* [ option key_hash - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; SET_DELEGATE /* [ operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; NIL operation /* [ list operation : operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; SWAP /* [ operation : list operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; CONS /* [ list operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ } + : pair (pair address (option key_hash)) address (option key_hash) ] */ } { DROP - /* [ pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + /* [ pair (pair address (option key_hash)) address (option key_hash) ] */ ; NIL operation /* [ list operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ } } + : pair (pair address (option key_hash)) address (option key_hash) ] */ } } { SWAP /* [ option key_hash : key_hash - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; IF_SOME { DIP { DUP /* [ key_hash : key_hash - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ } + : pair (pair address (option key_hash)) address (option key_hash) ] */ } /* [ key_hash : key_hash : key_hash - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; IFCMPEQ { SOME /* [ option key_hash - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; SET_DELEGATE /* [ operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; NIL operation /* [ list operation : operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; SWAP /* [ operation : list operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ ; CONS /* [ list operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ } + : pair (pair address (option key_hash)) address (option key_hash) ] */ } { DROP - /* [ pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + /* [ pair (pair address (option key_hash)) address (option key_hash) ] */ ; NIL operation /* [ list operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ } } + : pair (pair address (option key_hash)) address (option key_hash) ] */ } } { DROP - /* [ pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ ; + /* [ pair (pair address (option key_hash)) address (option key_hash) ] */ ; NIL operation /* [ list operation - : pair (pair address (option %key key_hash)) address (option %key key_hash) ] */ } } ; + : pair (pair address (option key_hash)) address (option key_hash) ] */ } } ; PAIR - /* [ pair (list operation) - (pair address (option %key key_hash)) - address - (option %key key_hash) ] */ } } + /* [ pair (list operation) (pair address (option key_hash)) address (option key_hash) ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--weather_insurance.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--weather_insurance.tz].out index 8532e62834e8b105325e1f34cb3e524d73e47ee5..38f9e1b140e5f9bb0526eba9cb7cfa8ff26494f3 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--weather_insurance.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--weather_insurance.tz].out @@ -7,218 +7,81 @@ Gas remaining: 1039960.200 units remaining (pair (pair (address %under_key) (address %over_key)) (pair (nat :rain %rain_level) (key %weather_service_key))) ; code { DUP - /* [ pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key ] */ ; DUP - /* [ pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key ] */ ; CAR - /* [ pair (signature %signed_weather_data) (nat %actual_level) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ pair signature nat + : pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key ] */ ; MAP_CDR { PACK - /* [ bytes : pair (signature %signed_weather_data) (nat %actual_level) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ bytes : pair signature nat + : pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key ] */ ; BLAKE2B - /* [ bytes : pair (signature %signed_weather_data) (nat %actual_level) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ } ; + /* [ bytes : pair signature nat + : pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key ] */ } ; SWAP - /* [ pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) : pair signature bytes - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ pair (pair signature nat) (pair address address) nat key + : pair signature bytes + : pair (pair signature nat) (pair address address) nat key ] */ ; CDDDR %weather_service_key ; DIP { UNPAIR /* [ signature : bytes - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ } + : pair (pair signature nat) (pair address address) nat key ] */ } /* [ key : signature : bytes - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + : pair (pair signature nat) (pair address address) nat key ] */ ; CHECK_SIGNATURE @sigok - /* [ bool - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ bool : pair (pair signature nat) (pair address address) nat key ] */ ; ASSERT ; DUP - /* [ pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key ] */ ; DUP - /* [ pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key ] */ ; DUP - /* [ pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key ] */ ; DIIIP - { CDR %storage - /* [ pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ } - /* [ pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + { CDR %storage /* [ pair (pair address address) nat key ] */ } + /* [ pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key + : pair (pair address address) nat key ] */ ; DIIP { CDAR } - /* [ pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) - : pair (address %under_key) (address %over_key) - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ pair (pair signature nat) (pair address address) nat key + : pair (pair signature nat) (pair address address) nat key + : pair address address : pair (pair address address) nat key ] */ ; DIP { CADR %actual_level } - /* [ pair (pair (signature %signed_weather_data) (nat %actual_level)) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) : nat - : pair (address %under_key) (address %over_key) - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ pair (pair signature nat) (pair address address) nat key : nat + : pair address address : pair (pair address address) nat key ] */ ; CDDAR %rain_level ; CMPLT ; - IF { CAR %under_key - /* [ address - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ } - { CDR %over_key - /* [ address - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ } ; - CONTRACT - unit - /* [ option (contract unit) - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + IF { CAR %under_key /* [ address : pair (pair address address) nat key ] */ } + { CDR %over_key /* [ address : pair (pair address address) nat key ] */ } ; + CONTRACT unit + /* [ option (contract unit) : pair (pair address address) nat key ] */ ; ASSERT_SOME ; BALANCE - /* [ mutez : contract unit - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ mutez : contract unit : pair (pair address address) nat key ] */ ; UNIT - /* [ unit : mutez : contract unit - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ unit : mutez : contract unit : pair (pair address address) nat key ] */ ; TRANSFER_TOKENS @trans.op - /* [ operation - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ operation : pair (pair address address) nat key ] */ ; NIL operation - /* [ list operation : operation - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ list operation : operation : pair (pair address address) nat key ] */ ; SWAP - /* [ operation : list operation - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ operation : list operation : pair (pair address address) nat key ] */ ; CONS - /* [ list operation - : pair (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ ; + /* [ list operation : pair (pair address address) nat key ] */ ; PAIR - /* [ pair (list operation) - (pair (address %under_key) (address %over_key)) - (nat %rain_level) - (key %weather_service_key) ] */ } } + /* [ pair (list operation) (pair address address) nat key ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--xcat_dapp.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--xcat_dapp.tz].out index 9be533d5196858a3125368ceffdf01b534202006..693e47deea5f36d3f3fa4134cec02793aff41444 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--xcat_dapp.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[mini_scenarios--xcat_dapp.tz].out @@ -16,295 +16,139 @@ Gas remaining: 1039911.852 units remaining code { NIL @operations operation /* [ list operation - : pair (or (pair %fund - (address %dest) - (pair %settings (bytes %target_hash) (timestamp %deadline))) + : pair (or (pair %fund address bytes timestamp) (or %claim_refund (bytes %preimage_claim) (bytes %refund_hash))) - (big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)))) + (big_map bytes (pair (pair address address) mutez timestamp)) unit ] */ ; SWAP - /* [ pair (or (pair %fund - (address %dest) - (pair %settings (bytes %target_hash) (timestamp %deadline))) + /* [ pair (or (pair %fund address bytes timestamp) (or %claim_refund (bytes %preimage_claim) (bytes %refund_hash))) - (big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)))) + (big_map bytes (pair (pair address address) mutez timestamp)) unit : list operation ] */ ; UNPAPAIR @% @% @% ; DIP { DUP - /* [ big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ } - /* [ or (pair %fund - (address %dest) - (pair %settings (bytes %target_hash) (timestamp %deadline))) + /* [ or (pair %fund address bytes timestamp) (or %claim_refund (bytes %preimage_claim) (bytes %refund_hash)) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; IF_LEFT { UNPAIR @% @% - /* [ address : pair (bytes %target_hash) (timestamp %deadline) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ address : pair bytes timestamp + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DUP - /* [ address : address : pair (bytes %target_hash) (timestamp %deadline) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ address : address : pair bytes timestamp + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; CONTRACT @dest unit - /* [ option (contract unit) : address - : pair (bytes %target_hash) (timestamp %deadline) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ option (contract unit) : address : pair bytes timestamp + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; ASSERT_SOME ; DROP - /* [ address : pair (bytes %target_hash) (timestamp %deadline) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ address : pair bytes timestamp + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; SWAP - /* [ pair (bytes %target_hash) (timestamp %deadline) : address - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ pair bytes timestamp : address + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; UNPAIR @% @% /* [ bytes : timestamp : address - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DIP { AMOUNT @amount /* [ mutez : timestamp : address - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; SENDER /* [ address : mutez : timestamp : address - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DUP /* [ address : address : mutez : timestamp : address - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; CONTRACT @from unit /* [ option (contract unit) : address : mutez : timestamp : address - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; ASSERT_SOME ; DROP /* [ address : mutez : timestamp : address - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DIP { PAIR /* [ pair mutez timestamp : address - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; SWAP /* [ address : pair mutez timestamp - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ } /* [ address : address : pair mutez timestamp - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; PAIR /* [ pair address address : pair mutez timestamp - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; PAIR /* [ pair (pair address address) mutez timestamp - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; SOME @xcat /* [ option (pair (pair address address) mutez timestamp) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; SWAP - /* [ big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) + /* [ big_map bytes (pair (pair address address) mutez timestamp) : option (pair (pair address address) mutez timestamp) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ } - /* [ bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) + /* [ bytes : big_map bytes (pair (pair address address) mutez timestamp) : option (pair (pair address address) mutez timestamp) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DUP - /* [ bytes : bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) + /* [ bytes : bytes : big_map bytes (pair (pair address address) mutez timestamp) : option (pair (pair address address) mutez timestamp) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DIP { MEM /* [ bool : option (pair (pair address address) mutez timestamp) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; NOT /* [ bool : option (pair (pair address address) mutez timestamp) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; ASSERT } /* [ bytes : option (pair (pair address address) mutez timestamp) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; UPDATE /* [ big_map bytes (pair (pair address address) mutez timestamp) : unit @@ -321,109 +165,53 @@ Gas remaining: 1039911.852 units remaining unit ] */ } { IF_LEFT { DUP - /* [ bytes : bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ bytes : bytes : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; SIZE - /* [ nat : bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ nat : bytes : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; PUSH nat 32 /* [ nat : nat : bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; ASSERT_CMPGE ; SHA256 @hash - /* [ bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ bytes : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DUP - /* [ bytes : bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ bytes : bytes : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DIP { SWAP - /* [ big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ big_map bytes (pair (pair address address) mutez timestamp) : bytes + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ } - /* [ bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ bytes : big_map bytes (pair (pair address address) mutez timestamp) : bytes + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DIIP { GET - /* [ option - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ option (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; ASSERT_SOME ; DUP - /* [ pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)) - : pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)) : unit - : list operation ] */ ; + /* [ pair (pair address address) mutez timestamp + : pair (pair address address) mutez timestamp : unit : list operation ] */ ; CADR @% ; CONTRACT @dest unit - /* [ option (contract unit) - : pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)) : unit + /* [ option (contract unit) : pair (pair address address) mutez timestamp : unit : list operation ] */ ; ASSERT_SOME ; SWAP - /* [ pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)) : contract unit - : unit : list operation ] */ ; - CDR @% - /* [ pair (mutez %amount) (timestamp %deadline) : contract unit : unit + /* [ pair (pair address address) mutez timestamp : contract unit : unit : list operation ] */ ; + CDR @% + /* [ pair mutez timestamp : contract unit : unit : list operation ] */ ; UNPAIR @% @% /* [ mutez : timestamp : contract unit : unit : list operation ] */ ; SWAP @@ -435,132 +223,70 @@ Gas remaining: 1039911.852 units remaining /* [ unit : mutez : contract unit : unit : list operation ] */ ; TRANSFER_TOKENS /* [ operation : unit : list operation ] */ } - /* [ bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : operation - : unit : list operation ] */ } + /* [ bytes : big_map bytes (pair (pair address address) mutez timestamp) + : operation : unit : list operation ] */ } { DUP - /* [ bytes : bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ bytes : bytes : big_map bytes (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; DIP { GET - /* [ option - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ option (pair (pair address address) mutez timestamp) + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; ASSERT_SOME ; DUP - /* [ pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)) - : pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ pair (pair address address) mutez timestamp + : pair (pair address address) mutez timestamp + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; CAAR @% ; CONTRACT @from unit - /* [ option (contract unit) - : pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ option (contract unit) : pair (pair address address) mutez timestamp + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; ASSERT_SOME ; SWAP - /* [ pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline)) : contract unit - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ pair (pair address address) mutez timestamp : contract unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; CDR - /* [ pair (mutez %amount) (timestamp %deadline) : contract unit - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + /* [ pair mutez timestamp : contract unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; UNPAIR @% @% /* [ mutez : timestamp : contract unit - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; SWAP /* [ timestamp : mutez : contract unit - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; NOW /* [ timestamp : timestamp : mutez : contract unit - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; ASSERT_CMPGE ; UNIT /* [ unit : mutez : contract unit - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit + : big_map bytes (pair (pair address address) mutez timestamp) : unit : list operation ] */ ; TRANSFER_TOKENS - /* [ operation - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : unit - : list operation ] */ ; + /* [ operation : big_map bytes (pair (pair address address) mutez timestamp) + : unit : list operation ] */ ; SWAP - /* [ big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : operation + /* [ big_map bytes (pair (pair address address) mutez timestamp) : operation : unit : list operation ] */ } - /* [ bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : operation - : unit : list operation ] */ } ; + /* [ bytes : big_map bytes (pair (pair address address) mutez timestamp) + : operation : unit : list operation ] */ } ; NONE @none (pair (pair address address) (pair mutez timestamp)) /* [ option (pair (pair address address) mutez timestamp) : bytes - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : operation + : big_map bytes (pair (pair address address) mutez timestamp) : operation : unit : list operation ] */ ; SWAP /* [ bytes : option (pair (pair address address) mutez timestamp) - : big_map - bytes - (pair (pair %recipients (address %from) (address %dest)) - (pair %settings (mutez %amount) (timestamp %deadline))) : operation + : big_map bytes (pair (pair address address) mutez timestamp) : operation : unit : list operation ] */ ; UPDATE @cleared_map /* [ big_map bytes (pair (pair address address) mutez timestamp) : operation diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--and.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--and.tz].out index 068b109a080cfb6809f3646deecf570d29f668fa..12f4855827ca810bf54a6bed86a5597033426139 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--and.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--and.tz].out @@ -5,7 +5,7 @@ Gas remaining: 1039994.393 units remaining { parameter (pair :param (bool %first) (bool %second)) ; storage (option bool) ; code { CAR - /* [ pair (bool %first) (bool %second) ] */ ; + /* [ pair bool bool ] */ ; UNPAIR /* [ bool : bool ] */ ; AND @and @@ -19,4 +19,4 @@ Gas remaining: 1039994.393 units remaining UNPAIR @x @y /* [ list operation : option bool ] */ ; PAIR %a %b - /* [ pair (list %a operation) (option %b bool) ] */ } } + /* [ pair (list operation) (option bool) ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_car.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_car.tz].out index 20f4e12e76d2ef0107425a0e2f5020f3d20366fd..0840adf76dfc9ca9acfcc3a5c8a1ddd349cff752 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_car.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_car.tz].out @@ -5,15 +5,15 @@ Gas remaining: 1039990.103 units remaining { parameter bool ; storage (pair (bool %b) (nat %n)) ; code { DUP - /* [ pair bool (bool %b) (nat %n) : pair bool (bool %b) (nat %n) ] */ ; + /* [ pair bool bool nat : pair bool bool nat ] */ ; CAR - /* [ bool : pair bool (bool %b) (nat %n) ] */ ; - DIP { CDR /* [ pair (bool %b) (nat %n) ] */ } - /* [ bool : pair (bool %b) (nat %n) ] */ ; + /* [ bool : pair bool bool nat ] */ ; + DIP { CDR /* [ pair bool nat ] */ } + /* [ bool : pair bool nat ] */ ; SWAP - /* [ pair (bool %b) (nat %n) : bool ] */ ; + /* [ pair bool nat : bool ] */ ; MAP_CAR @new_storage %b { AND /* [ bool ] */ } ; NIL operation - /* [ list operation : pair (bool %b) nat ] */ ; + /* [ list operation : pair bool nat ] */ ; PAIR - /* [ pair (list operation) (bool %b) nat ] */ } } + /* [ pair (list operation) bool nat ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_iter.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_iter.tz].out index f7f86bc73581c4ca9032d1e9ac900b02406d3e5d..3220e4b1e0b70620434e6dd2cfb8ab0636c987ca 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_iter.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--map_iter.tz].out @@ -11,13 +11,13 @@ Gas remaining: 1039985.509 units remaining PUSH @acc_k (int :k) 0 /* [ int : int : map int int ] */ ; PAIR % %r - /* [ pair int (int %r) : map int int ] */ ; + /* [ pair int int : map int int ] */ ; SWAP - /* [ map int int : pair int (int %r) ] */ ; + /* [ map int int : pair int int ] */ ; ITER { DIP { DUP - /* [ pair int (int %r) : pair int (int %r) ] */ ; + /* [ pair int int : pair int int ] */ ; CAR - /* [ int : pair int (int %r) ] */ ; + /* [ int : pair int int ] */ ; DIP { CDR /* [ int ] */ } /* [ int : int ] */ } /* [ pair int int : int : int ] */ ; @@ -30,9 +30,9 @@ Gas remaining: 1039985.509 units remaining DIP { CDR /* [ int : int ] */ ; ADD /* [ int ] */ } /* [ int : int ] */ ; PAIR % %r - /* [ pair int (int %r) ] */ } - /* [ pair int (int %r) ] */ ; + /* [ pair int int ] */ } + /* [ pair int int ] */ ; NIL operation - /* [ list operation : pair int (int %r) ] */ ; + /* [ list operation : pair int int ] */ ; PAIR - /* [ pair (list operation) int (int %r) ] */ } } + /* [ pair (list operation) int int ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--merge_comparable_pairs.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--merge_comparable_pairs.tz].out index 32eaeec5fcfea63a14edf448be8fa7ba1d989718..e2ae68ec761377bb402272100eb1333f9c2bb900 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--merge_comparable_pairs.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--merge_comparable_pairs.tz].out @@ -5,16 +5,16 @@ Gas remaining: 1039990.293 units remaining { parameter (set (pair (nat %n) (pair %p (string %s) (int %i)))) ; storage nat ; code { UNPAIR - /* [ set (pair (nat %n) (pair %p (string %s) (int %i))) : nat ] */ ; + /* [ set (pair nat string int) : nat ] */ ; SWAP - /* [ nat : set (pair (nat %n) (pair %p (string %s) (int %i))) ] */ ; + /* [ nat : set (pair nat string int) ] */ ; PUSH nat 3 - /* [ nat : nat : set (pair (nat %n) (pair %p (string %s) (int %i))) ] */ ; + /* [ nat : nat : set (pair nat string int) ] */ ; COMPARE - /* [ int : set (pair (nat %n) (pair %p (string %s) (int %i))) ] */ ; + /* [ int : set (pair nat string int) ] */ ; GT - /* [ bool : set (pair (nat %n) (pair %p (string %s) (int %i))) ] */ ; - IF { /* [ set (pair (nat %n) (pair %p (string %s) (int %i))) ] */ } + /* [ bool : set (pair nat string int) ] */ ; + IF { /* [ set (pair nat string int) ] */ } { DROP /* [] */ ; EMPTY_SET (pair nat (pair string int)) diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_car.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_car.tz].out index d670ca5e4784935d291fdb7b25e490ee0d67fdeb..c35a50514883db57ef74dad27086d8c03de02313 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_car.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_car.tz].out @@ -5,13 +5,13 @@ Gas remaining: 1039991.314 units remaining { parameter string ; storage (pair (string %s) (nat %n)) ; code { DUP - /* [ pair string (string %s) (nat %n) : pair string (string %s) (nat %n) ] */ ; + /* [ pair string string nat : pair string string nat ] */ ; CDR - /* [ pair (string %s) (nat %n) : pair string (string %s) (nat %n) ] */ ; + /* [ pair string nat : pair string string nat ] */ ; DIP { CAR /* [ string ] */ } - /* [ pair (string %s) (nat %n) : string ] */ ; + /* [ pair string nat : string ] */ ; SET_CAR %s ; NIL operation - /* [ list operation : pair (string %s) nat ] */ ; + /* [ list operation : pair string nat ] */ ; PAIR - /* [ pair (list operation) (string %s) nat ] */ } } + /* [ pair (list operation) string nat ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_cdr.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_cdr.tz].out index 6a964277b32e96bfa875757732b16b5ebb9d2fcc..8f0613744184af4f2354c5f503a73405cd254bf5 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_cdr.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--set_cdr.tz].out @@ -5,13 +5,13 @@ Gas remaining: 1039991.782 units remaining { parameter nat ; storage (pair (string %s) (nat %n)) ; code { DUP - /* [ pair nat (string %s) (nat %n) : pair nat (string %s) (nat %n) ] */ ; + /* [ pair nat string nat : pair nat string nat ] */ ; CDR - /* [ pair (string %s) (nat %n) : pair nat (string %s) (nat %n) ] */ ; + /* [ pair string nat : pair nat string nat ] */ ; DIP { CAR /* [ nat ] */ } - /* [ pair (string %s) (nat %n) : nat ] */ ; + /* [ pair string nat : nat ] */ ; SET_CDR %n ; NIL operation - /* [ list operation : pair string (nat %n) ] */ ; + /* [ list operation : pair string nat ] */ ; PAIR - /* [ pair (list operation) string (nat %n) ] */ } } + /* [ pair (list operation) string nat ] */ } } diff --git a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--unpair.tz].out b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--unpair.tz].out index 2cea990326ec64a1aa53f92ce8bb080486109321..8ffcdbce78d830feabb5274ea731090eaba53e95 100644 --- a/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--unpair.tz].out +++ b/tests_python/tests_alpha/_regtest_outputs/test_contract.TestTypecheck::test_typecheck[opcodes--unpair.tz].out @@ -111,79 +111,79 @@ Gas remaining: 1039903.879 units remaining UNIT @c /* [ unit : unit ] */ ; PAIR %a %b - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR % %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR %a % - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR % % - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR %a - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR % - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR %a %b @a @b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @a @b %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @a @% %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @% @% %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @% @b %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DROP /* [] */ ; UNIT @@ -191,79 +191,79 @@ Gas remaining: 1039903.879 units remaining UNIT /* [ unit : unit ] */ ; PAIR %a %b - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR % %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR %a % - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR % % - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR %a - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR % - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR %a %b @a @b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @a @b %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @a @% %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @% @% %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @% @b %a %b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DROP /* [] */ ; UNIT @@ -271,37 +271,37 @@ Gas remaining: 1039903.879 units remaining UNIT /* [ unit : unit ] */ ; PAIR %a %b @p - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @%% @b - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @a @%% - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @%% @%% - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @% @%% - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DUP - /* [ pair (unit %a) (unit %b) : pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit : pair unit unit ] */ ; UNPAIR @%% @% - /* [ unit : unit : pair (unit %a) (unit %b) ] */ ; + /* [ unit : unit : pair unit unit ] */ ; DROP 2 - /* [ pair (unit %a) (unit %b) ] */ ; + /* [ pair unit unit ] */ ; DROP /* [] */ ; UNIT @b diff --git a/tests_python/tests_alpha/test_contract.py b/tests_python/tests_alpha/test_contract.py index 61dd7a4b9cc8d5fdfb14c7a9c15942e641597ea2..d41dd0d0ba6eb33b47a413fe06392bef4e17b2f8 100644 --- a/tests_python/tests_alpha/test_contract.py +++ b/tests_python/tests_alpha/test_contract.py @@ -1411,7 +1411,7 @@ class TestMiniScenarios: def test_vote_for_delegate_wrong_identity1(self, client: Client): # We check failure of CHECK_SIGNATURE ; ASSERT in the script. - with utils.assert_run_failure("At line 15 characters 57 to 61"): + with utils.assert_run_failure("At line 14 characters 9 to 12"): client.transfer( 0, "bootstrap1", @@ -1421,7 +1421,7 @@ class TestMiniScenarios: def test_vote_for_delegate_wrong_identity2(self, client: Client): # We check failure of CHECK_SIGNATURE ; ASSERT in the script. - with utils.assert_run_failure("At line 15 characters 57 to 61"): + with utils.assert_run_failure("At line 14 characters 9 to 12"): client.transfer( 0, "bootstrap2",