diff --git a/src/base/Cashflow.ml b/src/base/Cashflow.ml index 4731c8dc0..cff234750 100644 --- a/src/base/Cashflow.ml +++ b/src/base/Cashflow.ml @@ -187,11 +187,12 @@ struct match s with | Load (x, y) -> CFSyntax.Load (add_noinfo_to_ident x, add_noinfo_to_ident y) - | RemoteLoad (x, adr, y) -> + | RemoteLoad (x, adr, y, mutability) -> CFSyntax.RemoteLoad ( add_noinfo_to_ident x, add_noinfo_to_ident adr, - add_noinfo_to_ident y ) + add_noinfo_to_ident y, + mutability) | Store (x, y) -> CFSyntax.Store (add_noinfo_to_ident x, add_noinfo_to_ident y) | Bind (x, e) -> CFSyntax.Bind (add_noinfo_to_ident x, cf_init_tag_expr e) @@ -208,11 +209,12 @@ struct add_noinfo_to_ident m, List.map ~f:add_noinfo_to_ident ks, retrieve ) - | RemoteMapGet (x, adr, m, ks, retrieve) -> + | RemoteMapGet (x, adr, m, mutability, ks, retrieve) -> CFSyntax.RemoteMapGet ( add_noinfo_to_ident x, add_noinfo_to_ident adr, add_noinfo_to_ident m, + mutability, List.map ~f:add_noinfo_to_ident ks, retrieve ) | MatchStmt (x, pss) -> @@ -1629,13 +1631,13 @@ struct (not @@ [%equal: ECFR.money_tag] (get_id_tag new_x) (get_id_tag x)) || not @@ [%equal: ECFR.money_tag] (get_id_tag new_f) (get_id_tag f) ) - | RemoteLoad (x, adr, f) -> + | RemoteLoad (x, adr, f, mutability) -> (* TODO - see Load case for inspiration *) (* x is no longer in scope, so remove from local_env *) let new_local_env = AssocDictionary.remove (CFIdentifier.as_string x) local_env in - ( RemoteLoad (x, adr, f), + ( RemoteLoad (x, adr, f, mutability), param_env, field_env, new_local_env, @@ -1767,13 +1769,13 @@ struct (not @@ [%equal: ECFR.money_tag] (get_id_tag x) new_x_tag) || (not @@ [%equal: ECFR.money_tag] (get_id_tag m) m_tag) || (not @@ [%equal: _] new_ks ks) ) - | RemoteMapGet (x, adr, m, ks, fetch) -> + | RemoteMapGet (x, adr, m, mutability, ks, fetch) -> (* TODO - see MapGet case for inspiration *) (* x is no longer in scope, so remove from local_env *) let new_local_env = AssocDictionary.remove (CFIdentifier.as_string x) local_env in - ( RemoteMapGet (x, adr, m, ks, fetch), + ( RemoteMapGet (x, adr, m, mutability, ks, fetch), param_env, field_env, new_local_env, diff --git a/src/base/DeadCodeDetector.ml b/src/base/DeadCodeDetector.ml index 225871dd5..480a637e0 100644 --- a/src/base/DeadCodeDetector.ml +++ b/src/base/DeadCodeDetector.ml @@ -366,7 +366,7 @@ module DeadCodeDetector (SR : Rep) (ER : Rep) = struct else ( warn "Unused load statement to: " x ER.get_loc; (lv, adts, ctrs)) - | RemoteLoad (x, addr, m) -> + | RemoteLoad (x, addr, m, _mutability) -> FieldsState.mark_field_read fs m; (* m is a field, thus we don't track its liveness *) if ERSet.mem lv x then @@ -397,7 +397,7 @@ module DeadCodeDetector (SR : Rep) (ER : Rep) = struct else ( warn "Unused map get statement to: " x ER.get_loc; (lv, adts, ctrs)) - | RemoteMapGet (x, addr, i, il, _) -> + | RemoteMapGet (x, addr, i, _mutability, il, _) -> (* i is a field, thus we don't track its liveness *) FieldsState.mark_field_read fs i; if ERSet.mem lv x then @@ -539,115 +539,171 @@ module DeadCodeDetector (SR : Rep) (ER : Rep) = struct Map.merge m1 m2 ~f:(fun ~key:_ -> function | `Both (s1, s2) -> Some (Set.union s1 s2) | `Left s | `Right s -> Some s) - (** Returns a list of fields with the contract address type from - [address_params] that are used in [s]. *) - let rec get_used_address_fields address_params (s, _annot) = + (** Returns maps of immutable and mutable fields with the contract address + type from [address_params] that are used in [s]. *) + let rec get_used_address_fields (s, _annot) = match s with - | RemoteLoad (_, addr, field) | RemoteMapGet (_, addr, field, _, _) -> - Map.set emp_idsmap ~key:(get_id addr) - ~data:(SCIdentifierSet.singleton (get_id field)) + | RemoteLoad (_, addr, field, Immutable) + | RemoteMapGet (_, addr, field, Immutable, _, _) -> + ( Map.set emp_idsmap ~key:(get_id addr) + ~data:(SCIdentifierSet.singleton (get_id field)), + emp_idsmap ) + | RemoteLoad (_, addr, field, Mutable) + | RemoteMapGet (_, addr, field, Mutable, _, _) -> + ( emp_idsmap, + Map.set emp_idsmap ~key:(get_id addr) + ~data:(SCIdentifierSet.singleton (get_id field)) ) | MatchStmt (_id, arms) -> - List.fold_left arms ~init:emp_idsmap ~f:(fun m (_pattern, stmts) -> - List.fold_left stmts ~init:emp_idsmap ~f:(fun m sa -> - get_used_address_fields address_params sa |> merge_id_maps m) - |> merge_id_maps m) + List.fold_left arms ~init:(emp_idsmap, emp_idsmap) + ~f:(fun (immut_m, mut_m) (_pattern, stmts) -> + let immut_m', mut_m' = + List.fold_left stmts ~init:(emp_idsmap, emp_idsmap) + ~f:(fun (immut_m', mut_m') sa -> + let immut_m'', mut_m'' = get_used_address_fields sa in + ( merge_id_maps immut_m' immut_m'', + merge_id_maps mut_m' mut_m'' )) + in + (merge_id_maps immut_m immut_m', merge_id_maps mut_m mut_m')) | Bind _ | Load _ | Store _ | MapUpdate _ | MapGet _ | ReadFromBC _ | TypeCast _ | AcceptPayment | Return _ | Iterate _ | SendMsgs _ | CreateEvnt _ | CallProc _ | Throw _ | GasStmt _ -> - emp_idsmap + (emp_idsmap, emp_idsmap) (** Returns a set of field names of the contract address type. *) - let get_addr_fields addr = - List.fold_left (SType.IdLoc_Comp.Map.keys addr) ~init:emp_idset + let get_addr_fields fields = + List.fold_left (SType.IdLoc_Comp.Map.keys fields) ~init:emp_idset ~f:(fun s id -> SCIdentifierSet.add s (get_id id)) - (** Updates a map of identifiers [m] iff [ty] has contract address type. - [m] has the following structure: [id |-> F] where [F] is a set of field - names used in the contract address type. *) - let update_contract_params_map m id ty = + (** Returns sets with names of immutable and mutable fields of the contract + address type [ty]. *) + let find_contract_type_fields ty = match ty with - | SType.Address (ContrAddr addr) -> - let data = get_addr_fields addr in - Map.set m ~key:(SCIdentifier.get_id id) ~data - | _ -> m - - (** Checks for unused fields in contract address types of [comp]'s - parameters. - Returns a set of ids of contract parameters used in this [comp]. *) - let check_contract_address_types_in_params used_contract_params - contract_params comp = - let address_params = - List.fold_left comp.comp_params ~init:contract_params - ~f:(fun m (id, ty) -> update_contract_params_map m id ty) + | SType.Address (ContrAddr (immutable_fields, mutable_fields)) -> + Some (get_addr_fields immutable_fields, get_addr_fields mutable_fields) + | _ -> None + + (** Takes the procedure/transition [comp] and looks for unused fields in its parameters. + Returns maps of immutable and mutable fields of the contract parameters used + in the body of [comp]. + Arguments: + - [contr_immut_used] and [contr_mut_used] are parameters of the + contract that are known as used. + - [contr_immut_fields] and [contr_mut_fields] are all the fields of the + contract. *) + let check_addresses_in_params (comp : component) contr_immut_used + contr_mut_used contr_immut_fields contr_mut_fields = + (* Collect fields of contract address types from parameters of the component *) + let immut_address_params, mut_address_params = + List.fold_left comp.comp_params + ~init:(contr_immut_fields, contr_mut_fields) + ~f:(fun (immut_m, mut_m) (id, ty) -> + find_contract_type_fields ty + |> Option.value_map ~default:(immut_m, mut_m) + ~f:(fun (immut_fields, mut_fields) -> + let update_map m data = + Map.set m ~key:(SCIdentifier.get_id id) ~data + in + (update_map immut_m immut_fields, update_map mut_m mut_fields))) in - let used_addresses = + (* Collect fields of contract address types used in the body of the component *) + let immut_used_addresses, mut_used_addresses = (* addr |-> set of used fields *) - List.fold_left comp.comp_body ~init:emp_idsmap ~f:(fun m s -> - get_used_address_fields address_params s |> merge_id_maps m) + List.fold_left comp.comp_body ~init:(emp_idsmap, emp_idsmap) + ~f:(fun (immut_m, mut_m) s -> + let immut_m', mut_m' = get_used_address_fields s in + (merge_id_maps immut_m immut_m', merge_id_maps mut_m mut_m')) in - (* Generate warnings for unused fields in component arguments. *) + (* Generate warnings for unused fields in component parameters *) List.iter comp.comp_params ~f:(fun (id, ty) -> - let name = get_id id in - match (Map.find address_params name, Map.find used_addresses name) with - | Some fields, Some used_fields - when not @@ phys_equal (Set.length fields) (Set.length used_fields) - -> ( - match ty with - | SType.Address (ContrAddr m) -> - List.iter (SType.IdLoc_Comp.Map.keys m) ~f:(fun id -> - let name = get_id id in - if Set.mem fields name && (not @@ Set.mem used_fields name) - then - warn1 - ("Unused field in contract address type: " - ^ as_error_string id) - warning_level_dead_code - (SType.TIdentifier.get_rep id)) - | _ -> ()) + match ty with + | SType.Address (ContrAddr (ims, ms)) -> + let name = get_id id in + let find_unused address_fields params used_params warn_name = + match (Map.find params name, Map.find used_params name) with + | Some fields, Some used_fields + when not + @@ phys_equal (Set.length fields) (Set.length used_fields) + -> + List.iter (SType.IdLoc_Comp.Map.keys address_fields) + ~f:(fun id -> + let name = get_id id in + if Set.mem fields name && (not @@ Set.mem used_fields name) + then + warn1 + ("Unused " ^ warn_name ^ " in contract address type: " + ^ as_error_string id) + warning_level_dead_code + (SType.TIdentifier.get_rep id)) + | _ -> () + in + (* Handle immutable fields *) + find_unused ims immut_address_params immut_used_addresses + "contract parameter"; + (* Handle mutable fields *) + find_unused ms mut_address_params mut_used_addresses "field" | _ -> ()); - (* Collect fields of the [cmod] contract with contract address types used + (* Collect fields of the contract with contract address types used in this component. *) - Map.keys used_addresses - |> List.fold_left ~init:used_contract_params ~f:(fun used_ids_map used_id -> - let used_fields = Map.find_exn used_addresses used_id in - match Map.find used_ids_map used_id with - | Some used_fields -> - let data = used_fields |> Set.union used_fields in - Map.set used_ids_map ~key:used_id ~data - | None -> Map.set used_ids_map ~key:used_id ~data:used_fields) + let collect contr_used comp_used = + Map.keys comp_used + |> List.fold_left ~init:contr_used ~f:(fun used_ids_map used_id -> + let used_fields = Map.find_exn comp_used used_id in + match Map.find used_ids_map used_id with + | Some used_fields -> + let data = used_fields |> Set.union used_fields in + Map.set used_ids_map ~key:used_id ~data + | None -> Map.set used_ids_map ~key:used_id ~data:used_fields) + in + ( collect contr_immut_used immut_used_addresses, + collect contr_mut_used mut_used_addresses ) (** Checks for unused fields in contract address types occurred in contract parameters and parameters of contract's components. *) let check_param_contract_address_types cmod = - let contract_params = - List.fold_left cmod.contr.cparams ~init:emp_idsmap ~f:(fun m (id, ty) -> - update_contract_params_map m id ty) + (* Collect names of fields in address types of contract params *) + let contr_immut, contr_mut = + List.fold_left cmod.contr.cparams ~init:(emp_idsmap, emp_idsmap) + ~f:(fun (immut_m, mut_m) (id, ty) -> + find_contract_type_fields ty + |> Option.value_map ~default:(immut_m, mut_m) + ~f:(fun (immut_fields', mut_fields') -> + let update_map m data = + Map.set m ~key:(SCIdentifier.get_id id) ~data + in + (update_map immut_m immut_fields', update_map mut_m mut_fields'))) in - let used_contract_params = - List.fold_left cmod.contr.ccomps ~init:emp_idsmap ~f:(fun used c -> - check_contract_address_types_in_params used contract_params c) + let contr_immut_used, contr_mut_used = + List.fold_left cmod.contr.ccomps ~init:(emp_idsmap, emp_idsmap) + ~f:(fun (immut_used, mut_used) comp -> + check_addresses_in_params comp immut_used mut_used contr_immut + contr_mut) in - (* Report unused contract parameters with contract address types. *) - Map.keys contract_params - |> List.iter ~f:(fun param -> - match Map.find used_contract_params param with - | Some used_fields -> - let all_fields = Map.find_exn contract_params param in - let unused_fields = Set.diff all_fields used_fields in - if not @@ Set.is_empty unused_fields then - List.iter cmod.contr.cparams ~f:(fun (id, _ty) -> - if SCIdentifier.Name.equal param (SCIdentifier.get_id id) - then - Set.iter unused_fields ~f:(fun f -> - warn1 - ("Unused field in contract address type: " - ^ SCIdentifier.Name.as_string f) - warning_level_dead_code - (ER.get_loc (SCIdentifier.get_rep id)))) - | None -> - (* All the fields of [param] are unused, so we don't report it. - It is an unused contract parameter.*) - ()) + (* Report unused contract parameters with contract address types *) + let check fields used warn_name = + Map.keys fields + |> List.iter ~f:(fun param -> + match Map.find used param with + | Some used_fields -> + let all_fields = Map.find_exn fields param in + let unused_fields = Set.diff all_fields used_fields in + if not @@ Set.is_empty unused_fields then + List.iter cmod.contr.cparams ~f:(fun (id, _ty) -> + if SCIdentifier.Name.equal param (SCIdentifier.get_id id) + then + Set.iter unused_fields ~f:(fun f -> + warn1 + ("Unused " ^ warn_name + ^ " in contract address type: " + ^ SCIdentifier.Name.as_string f) + warning_level_dead_code + (ER.get_loc (SCIdentifier.get_rep id)))) + | None -> + (* All the fields of [param] are unused, so we don't report it. + It is an unused contract parameter.*) + ()) + in + check contr_immut contr_immut_used "contract_parameter"; + check contr_mut contr_mut_used "field" type adts_ty = ( Name.t, @@ -680,8 +736,8 @@ module DeadCodeDetector (SR : Rep) (ER : Rep) = struct ~init:(Map.empty (module Int)) ~f: (fun i m -> function - | SType.Address (ContrAddr addr) -> - Map.set m ~key:i ~data:(get_addr_fields addr) + | SType.Address (ContrAddr (_im_addr, m_addr)) -> + Map.set m ~key:i ~data:(get_addr_fields m_addr) | _ -> m) in if Map.is_empty args_map then m @@ -778,7 +834,8 @@ module DeadCodeDetector (SR : Rep) (ER : Rep) = struct in ignore @@ Stack.pop env_stack; res)) - | RemoteLoad (_, addr, field) | RemoteMapGet (_, addr, field, _, _) -> ( + | RemoteLoad (_, addr, field, _) | RemoteMapGet (_, addr, field, _, _, _) + -> ( match env_find_bind (SCIdentifier.get_id addr) with | Some (ctr_name, ctr_arg_pos) when Map.mem adt_ctrs ctr_name -> let ctr_arg_pos_to_fields = diff --git a/src/base/Disambiguate.ml b/src/base/Disambiguate.ml index 5b5b5918e..56e52049b 100644 --- a/src/base/Disambiguate.ml +++ b/src/base/Disambiguate.ml @@ -219,8 +219,8 @@ module ScillaDisambiguation (SR : Rep) (ER : Rep) = struct | Address AnyAddr -> pure @@ PostDisType.Address AnyAddr | Address CodeAddr -> pure @@ PostDisType.Address CodeAddr | Address LibAddr -> pure @@ PostDisType.Address LibAddr - | Address (ContrAddr fts) -> - let%bind dis_fts = + | Address (ContrAddr (im_fts, m_fts)) -> + let fts_disambiguator fts = foldM (IdLoc_Comp.Map.to_alist fts) ~init:PostDisType.IdLoc_Comp.Map.empty ~f:(fun acc (id, t) -> let%bind dis_id = name_def_as_simple_global id in @@ -228,7 +228,9 @@ module ScillaDisambiguation (SR : Rep) (ER : Rep) = struct pure @@ PostDisType.IdLoc_Comp.Map.set acc ~key:dis_id ~data:dis_t) in - pure @@ PostDisType.Address (ContrAddr dis_fts) + let%bind dis_im_fts = fts_disambiguator im_fts in + let%bind dis_m_fts = fts_disambiguator m_fts in + pure @@ PostDisType.Address (ContrAddr (dis_im_fts, dis_m_fts)) in recurse t @@ -537,7 +539,7 @@ module ScillaDisambiguation (SR : Rep) (ER : Rep) = struct remove_local_id_from_dict var_dict_acc (as_string x) in pure @@ (PostDisSyntax.Load (dis_x, dis_f), new_var_dict) - | RemoteLoad (x, adr, f) -> + | RemoteLoad (x, adr, f, mutability) -> let%bind dis_x = name_def_as_simple_global x in (* adr may be defined anywhere, so must be disambiguated *) let%bind dis_adr = @@ -550,7 +552,7 @@ module ScillaDisambiguation (SR : Rep) (ER : Rep) = struct remove_local_id_from_dict var_dict_acc (as_string x) in pure - @@ (PostDisSyntax.RemoteLoad (dis_x, dis_adr, dis_f), new_var_dict) + @@ (PostDisSyntax.RemoteLoad (dis_x, dis_adr, dis_f, mutability), new_var_dict) | Store (f, x) -> (* f must be a locally defined field *) let%bind dis_f = name_def_as_simple_global f in @@ -598,7 +600,7 @@ module ScillaDisambiguation (SR : Rep) (ER : Rep) = struct in pure @@ (PostDisSyntax.MapGet (dis_x, dis_m, dis_ks, fetch), new_var_dict) - | RemoteMapGet (x, adr, m, ks, fetch) -> + | RemoteMapGet (x, adr, m, mutability, ks, fetch) -> let%bind dis_x = name_def_as_simple_global x in (* adr may be defined anywhere, so must be disambiguated *) let%bind dis_adr = @@ -617,7 +619,7 @@ module ScillaDisambiguation (SR : Rep) (ER : Rep) = struct in pure @@ ( PostDisSyntax.RemoteMapGet - (dis_x, dis_adr, dis_m, dis_ks, fetch), + (dis_x, dis_adr, dis_m, mutability, dis_ks, fetch), new_var_dict ) | MatchStmt (x, pss) -> let%bind dis_x = diff --git a/src/base/Gas.ml b/src/base/Gas.ml index b5820d4b5..cf9f15bf4 100644 --- a/src/base/Gas.ml +++ b/src/base/Gas.ml @@ -54,9 +54,9 @@ module ScillaGas (SR : Rep) (ER : Rep) = struct match t with | Address t' -> ( match t' with - | ContrAddr fts -> + | ContrAddr (im_fts, m_fts) -> (* look up _this_address and every listed field *) - 1 + IdLoc_Comp.Map.length fts + 1 + IdLoc_Comp.Map.length im_fts + IdLoc_Comp.Map.length m_fts | LibAddr | CodeAddr | AnyAddr -> 0) | _ -> 0 in @@ -187,7 +187,7 @@ module ScillaGas (SR : Rep) (ER : Rep) = struct | (s, srep) :: rem_stmts -> let%bind s' = match s with - | Load (x, _) | RemoteLoad (x, _, _) -> + | Load (x, _) | RemoteLoad (x, _, _, _) -> let g = GasStmt (GasGasCharge.SumOf @@ -219,7 +219,7 @@ module ScillaGas (SR : Rep) (ER : Rep) = struct | None -> n in pure @@ [ (GasStmt g, srep); (s, srep) ] - | MapGet (x, _, klist, _) | RemoteMapGet (x, _, _, klist, _) -> + | MapGet (x, _, klist, _) | RemoteMapGet (x, _, _, _, klist, _) -> let n = GasGasCharge.StaticCost (List.length klist) in let g = GasGasCharge.SumOf diff --git a/src/base/JSON.ml b/src/base/JSON.ml index 6de10a65b..b3c582f45 100644 --- a/src/base/JSON.ml +++ b/src/base/JSON.ml @@ -42,10 +42,10 @@ open JSONType open JSONLiteral type json_parsed_field = - (* A field belonging to this contract. *) + (* A mutable field belonging to this contract. *) | ThisContr of string * JSONType.t * JSONLiteral.t (* External contracts and their fields. *) - | ExtrContrs of (Bystrx.t * (string * JSONType.t * JSONLiteral.t) list) list + | ExtrContrs of (Bystrx.t * (string * field_mutability * JSONType.t * JSONLiteral.t) list) list (****************************************************************) (* Exception wrappers *) @@ -246,37 +246,42 @@ and json_to_lit_exn t v = in raise (exn ()) -let rec jobj_to_statevar json = - let n = member_exn "vname" json |> to_string_exn in - let v = member_exn "value" json in - if String.equal n "_external" then - (* We have a list of external addresses, each with their own fields. *) - let exts = v |> to_list_exn in - let exts' = - List.fold exts ~init:[] ~f:(fun acc ext -> - let addr = - member_exn "address" ext |> to_string_exn |> Bystrx.parse_hex - in - let state = member_exn "state" ext |> to_list_exn in - let state' = - List.map state ~f:(fun s -> - match jobj_to_statevar s with - | ThisContr (n, t, l) -> (n, t, l) - | _ -> - raise - @@ mk_invalid_json - ~kind: - "External contract fields cannot contain other \ - external fields" - ?inst:None) - in - (addr, state') :: acc) - in - ExtrContrs exts' - else - let tstring = member_exn "type" json |> to_string_exn in - let t = parse_typ_exn tstring in - ThisContr (n, t, json_to_lit_exn t v) +let jobj_to_statevar json = + let rec recurser json = + let n = member_exn "vname" json |> to_string_exn in + let v = member_exn "value" json in + if String.equal n "_external" then + (* We have a list of external addresses, each with their own fields. *) + let exts = v |> to_list_exn in + let exts' = + List.map exts ~f:(fun ext -> + let addr = + member_exn "address" ext |> to_string_exn |> Bystrx.parse_hex + in + let cparams = member_exn "cparams" ext |> to_list_exn in + let cparams' = List.map cparams ~f:(recurser_mapper Immutable) in + let state = member_exn "state" ext |> to_list_exn in + let all_fields = List.rev_map_append state cparams' ~f:(recurser_mapper Mutable) + in + (addr, all_fields)) + in + ExtrContrs exts' + else + let tstring = member_exn "type" json |> to_string_exn in + let t = parse_typ_exn tstring in + ThisContr (n, t, json_to_lit_exn t v) + and recurser_mapper mutability json = + match recurser json with + | ThisContr (n, t, l) -> (n, mutability, t, l) + | _ -> + raise + @@ mk_invalid_json + ~kind: + "External contract fields cannot contain other \ + external fields" + ?inst:None + in + recurser json (****************************************************************) (* JSON printing *) diff --git a/src/base/ParserFaults.messages b/src/base/ParserFaults.messages index 54aa38de0..1c259912a 100644 --- a/src/base/ParserFaults.messages +++ b/src/base/ParserFaults.messages @@ -16,6 +16,9 @@ #@ WARNING: #@ The following comment has been copied from "src/base/ParserFaults.messages". #@ It may need to be proofread, updated, moved, or removed. +#@ WARNING: +#@ The following comment has been copied from "src/base/ParserFaults.messages". +#@ It may need to be proofread, updated, moved, or removed. # This file is part of scilla. # # Copyright (c) 2018 - present Zilliqa Research Pvt. Ltd. @@ -237,7 +240,7 @@ type_term: MAP CID UNDERSCORE ## address_typ -> CID . WITH CONTRACT loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## address_typ -> CID . WITH LIBRARY END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## address_typ -> CID . WITH SPID END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] -## address_typ -> CID . WITH CONTRACT LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] +## address_typ -> CID . WITH CONTRACT LPAREN separated_nonempty_list(COMMA,param_pair) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## scid -> CID . [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## scid -> CID . PERIOD CID [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## @@ -310,7 +313,7 @@ type_term: CID WITH EOF ## address_typ -> CID WITH . CONTRACT loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## address_typ -> CID WITH . LIBRARY END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## address_typ -> CID WITH . SPID END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] -## address_typ -> CID WITH . CONTRACT LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] +## address_typ -> CID WITH . CONTRACT LPAREN separated_nonempty_list(COMMA,param_pair) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## ## The known suffix of the stack is as follows: ## CID WITH @@ -321,7 +324,7 @@ Invalid or incomplete type. type_term: TID WITH ## -## Ends in an error in state: 376. +## Ends in an error in state: 383. ## ## typ -> typ . TARROW typ [ TARROW EOF ] ## type_term -> typ . EOF [ # ] @@ -335,7 +338,7 @@ This is an invalid type term, the ADT constructor arguments are likely incorrect type_term: WITH ## -## Ends in an error in state: 374. +## Ends in an error in state: 381. ## ## type_term' -> . type_term [ # ] ## @@ -348,7 +351,7 @@ This is an invalid type term. stmts_term: ACCEPT WITH ## -## Ends in an error in state: 322. +## Ends in an error in state: 329. ## ## separated_nonempty_list(SEMICOLON,stmt) -> stmt . [ EOF END BAR ] ## separated_nonempty_list(SEMICOLON,stmt) -> stmt . SEMICOLON separated_nonempty_list(SEMICOLON,stmt) [ EOF END BAR ] @@ -363,7 +366,7 @@ This is likely an improperly terminated statement (lacking the semicolon). stmts_term: CID WITH ## -## Ends in an error in state: 326. +## Ends in an error in state: 333. ## ## stmt -> component_id . list(sident) [ SEMICOLON EOF END BAR ] ## @@ -376,7 +379,7 @@ This is an invalid statements term. stmts_term: DELETE ID WITH ## -## Ends in an error in state: 319. +## Ends in an error in state: 326. ## ## stmt -> DELETE ID . nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## @@ -389,7 +392,7 @@ This is an invalid delete statement, it lacks the keys to delete. stmts_term: DELETE WITH ## -## Ends in an error in state: 318. +## Ends in an error in state: 325. ## ## stmt -> DELETE . ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## @@ -402,7 +405,7 @@ This is an invalid delete statement, it lacks a map to delete from. stmts_term: EVENT WITH ## -## Ends in an error in state: 316. +## Ends in an error in state: 323. ## ## stmt -> EVENT . sid [ SEMICOLON EOF END BAR ] ## @@ -415,7 +418,7 @@ This is an invalid event statement, it lacks a separated identifier for the even stmts_term: ID ASSIGN WITH ## -## Ends in an error in state: 308. +## Ends in an error in state: 315. ## ## stmt -> ID ASSIGN . sid [ SEMICOLON EOF END BAR ] ## @@ -432,9 +435,10 @@ stmts_term: ID FETCH AND WITH ## ## remote_fetch_stmt -> ID FETCH AND . ID PERIOD sident [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH AND . SPID PERIOD SPID [ SEMICOLON EOF END BAR ] -## remote_fetch_stmt -> ID FETCH AND . ID PERIOD LPAREN sident RPAREN [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH AND . ID PERIOD LPAREN sident RPAREN list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH AND . ID PERIOD ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH AND . EXISTS ID PERIOD ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH AND . EXISTS ID PERIOD LPAREN ID RPAREN nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH AND . sident AS address_typ [ SEMICOLON EOF END BAR ] ## stmt -> ID FETCH AND . CID option(bcfetch_args) [ SEMICOLON EOF END BAR ] ## @@ -491,9 +495,10 @@ stmts_term: ID FETCH WITH ## ## remote_fetch_stmt -> ID FETCH . AND ID PERIOD sident [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH . AND SPID PERIOD SPID [ SEMICOLON EOF END BAR ] -## remote_fetch_stmt -> ID FETCH . AND ID PERIOD LPAREN sident RPAREN [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH . AND ID PERIOD LPAREN sident RPAREN list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH . AND ID PERIOD ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH . AND EXISTS ID PERIOD ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH . AND EXISTS ID PERIOD LPAREN ID RPAREN nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH . AND sident AS address_typ [ SEMICOLON EOF END BAR ] ## stmt -> ID FETCH . sid [ SEMICOLON EOF END BAR ] ## stmt -> ID FETCH . AND CID option(bcfetch_args) [ SEMICOLON EOF END BAR ] @@ -509,7 +514,7 @@ This is an invalid bind statement, the bind can be followed by '&', 'exists' or stmts_term: ID EQ WITH ## -## Ends in an error in state: 306. +## Ends in an error in state: 313. ## ## stmt -> ID EQ . exp [ SEMICOLON EOF END BAR ] ## @@ -522,7 +527,7 @@ This is an invalid equal statement, it is lacking a valid expression on the righ stmts_term: ID LSQB SPID RSQB ASSIGN WITH ## -## Ends in an error in state: 311. +## Ends in an error in state: 318. ## ## stmt -> ID nonempty_list(map_access) ASSIGN . sid [ SEMICOLON EOF END BAR ] ## @@ -535,7 +540,7 @@ The map key must be assigned to some separated identifier. stmts_term: ID LSQB SPID RSQB SEMICOLON ## -## Ends in an error in state: 310. +## Ends in an error in state: 317. ## ## stmt -> ID nonempty_list(map_access) . ASSIGN sid [ SEMICOLON EOF END BAR ] ## @@ -594,7 +599,7 @@ This is an invalid statements term. The map access list is malformed. stmts_term: ID SPID WITH ## -## Ends in an error in state: 199. +## Ends in an error in state: 198. ## ## list(sident) -> sident . list(sident) [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -612,9 +617,10 @@ stmts_term: ID WITH ## component_id -> ID . [ SPID SEMICOLON ID EOF END CID BAR ] ## remote_fetch_stmt -> ID . FETCH AND ID PERIOD sident [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID . FETCH AND SPID PERIOD SPID [ SEMICOLON EOF END BAR ] -## remote_fetch_stmt -> ID . FETCH AND ID PERIOD LPAREN sident RPAREN [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID . FETCH AND ID PERIOD LPAREN sident RPAREN list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID . FETCH AND ID PERIOD ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID . FETCH AND EXISTS ID PERIOD ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID . FETCH AND EXISTS ID PERIOD LPAREN ID RPAREN nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID . FETCH AND sident AS address_typ [ SEMICOLON EOF END BAR ] ## stmt -> ID . FETCH sid [ SEMICOLON EOF END BAR ] ## stmt -> ID . ASSIGN sid [ SEMICOLON EOF END BAR ] @@ -646,7 +652,7 @@ This is an invalid match statement, 'with' is expected after what is specified t stmts_term: MATCH SPID WITH BAR UNDERSCORE ARROW ACCEPT EOF ## -## Ends in an error in state: 330. +## Ends in an error in state: 337. ## ## list(stmt_pm_clause) -> stmt_pm_clause . list(stmt_pm_clause) [ END ] ## @@ -657,9 +663,9 @@ stmts_term: MATCH SPID WITH BAR UNDERSCORE ARROW ACCEPT EOF ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 322, spurious reduction of production separated_nonempty_list(SEMICOLON,stmt) -> stmt -## In state 328, spurious reduction of production loption(separated_nonempty_list(SEMICOLON,stmt)) -> separated_nonempty_list(SEMICOLON,stmt) -## In state 329, spurious reduction of production stmt_pm_clause -> BAR pattern ARROW loption(separated_nonempty_list(SEMICOLON,stmt)) +## In state 329, spurious reduction of production separated_nonempty_list(SEMICOLON,stmt) -> stmt +## In state 335, spurious reduction of production loption(separated_nonempty_list(SEMICOLON,stmt)) -> separated_nonempty_list(SEMICOLON,stmt) +## In state 336, spurious reduction of production stmt_pm_clause -> BAR pattern ARROW loption(separated_nonempty_list(SEMICOLON,stmt)) ## # see tests/parser/bad/stmts_t-match-spid-with-bar-underscore-arrow-accept-eof.scilla @@ -732,7 +738,7 @@ In a match statement, the parser expects a separated identifier to match with. stmts_term: SEND CID PERIOD WITH ## -## Ends in an error in state: 126. +## Ends in an error in state: 125. ## ## sid -> CID PERIOD . ID [ WITH TID SEMICOLON RBRACE MAP LPAREN HEXLIT EOF END COLON CID BAR ] ## @@ -745,7 +751,7 @@ This is an invalid send statement, the identifier is incorrect. After the period stmts_term: SEND CID WITH ## -## Ends in an error in state: 125. +## Ends in an error in state: 124. ## ## sid -> CID . PERIOD ID [ WITH TID SEMICOLON MAP LPAREN HEXLIT EOF END COLON CID BAR ] ## @@ -771,7 +777,7 @@ It is expected to send to a separated identifier. stmts_term: THROW END ## -## Ends in an error in state: 372. +## Ends in an error in state: 379. ## ## stmts_term -> stmts . EOF [ # ] ## @@ -784,9 +790,9 @@ stmts_term: THROW END ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 249, spurious reduction of production option(sid) -> ## In state 251, spurious reduction of production stmt -> THROW option(sid) -## In state 322, spurious reduction of production separated_nonempty_list(SEMICOLON,stmt) -> stmt -## In state 328, spurious reduction of production loption(separated_nonempty_list(SEMICOLON,stmt)) -> separated_nonempty_list(SEMICOLON,stmt) -## In state 336, spurious reduction of production stmts -> loption(separated_nonempty_list(SEMICOLON,stmt)) +## In state 329, spurious reduction of production separated_nonempty_list(SEMICOLON,stmt) -> stmt +## In state 335, spurious reduction of production loption(separated_nonempty_list(SEMICOLON,stmt)) -> separated_nonempty_list(SEMICOLON,stmt) +## In state 343, spurious reduction of production stmts -> loption(separated_nonempty_list(SEMICOLON,stmt)) ## # special case, only via stmts_term entry point should never happen # throw itself is a valid statement term and a procedure or transition @@ -796,7 +802,7 @@ This is an invalid statements term, bad throw. stmts_term: THROW SEMICOLON WITH ## -## Ends in an error in state: 323. +## Ends in an error in state: 330. ## ## separated_nonempty_list(SEMICOLON,stmt) -> stmt SEMICOLON . separated_nonempty_list(SEMICOLON,stmt) [ EOF END BAR ] ## @@ -824,7 +830,7 @@ This throw does not throw a valid exception or is not properly terminated. stmts_term: WITH ## -## Ends in an error in state: 370. +## Ends in an error in state: 377. ## ## stmts_term' -> . stmts_term [ # ] ## @@ -877,7 +883,7 @@ To import another library mention the new library name directly after the previo lmodule: SCILLA_VERSION NUMLIT IMPORT CONTRACT ## -## Ends in an error in state: 366. +## Ends in an error in state: 373. ## ## lmodule -> SCILLA_VERSION NUMLIT imports . library EOF [ # ] ## @@ -910,7 +916,7 @@ If import is mentioned there must be one or more imported libraries with capital lmodule: SCILLA_VERSION NUMLIT LIBRARY CID CONTRACT ## -## Ends in an error in state: 367. +## Ends in an error in state: 374. ## ## lmodule -> SCILLA_VERSION NUMLIT imports library . EOF [ # ] ## @@ -922,7 +928,7 @@ lmodule: SCILLA_VERSION NUMLIT LIBRARY CID CONTRACT ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 12, spurious reduction of production list(libentry) -> -## In state 223, spurious reduction of production library -> LIBRARY CID list(libentry) +## In state 222, spurious reduction of production library -> LIBRARY CID list(libentry) ## # see tests/parser/bad/lib/lmodule-library-cid-contract.scillib @@ -930,7 +936,7 @@ When writing solely Scilla libraries, there is no need for a contract. lmodule: SCILLA_VERSION NUMLIT LIBRARY CID LET ID COLON TID EQ WITH ## -## Ends in an error in state: 221. +## Ends in an error in state: 220. ## ## libentry -> LET ID type_annot EQ . exp [ TYPE LET EOF CONTRACT ] ## @@ -943,7 +949,7 @@ This (type-annotated) let expression is missing an expression to assign to an id lmodule: SCILLA_VERSION NUMLIT LIBRARY CID LET ID EQ HEXLIT WITH ## -## Ends in an error in state: 165. +## Ends in an error in state: 164. ## ## lit -> HEXLIT . [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## scid -> HEXLIT . PERIOD CID [ TYPE TRANSITION SPID SEMICOLON PROCEDURE LET LBRACE IN ID FIELD EOF END CONTRACT CID BAR ARROW ] @@ -957,7 +963,7 @@ Invalid module. A module entry (a type or variable definition for libraries, a f lmodule: SCILLA_VERSION NUMLIT LIBRARY CID LET ID EQ WITH ## -## Ends in an error in state: 117. +## Ends in an error in state: 116. ## ## libentry -> LET ID EQ . exp [ TYPE LET EOF CONTRACT ] ## @@ -970,7 +976,7 @@ This library let expression is missing a valid expression to assign to the ident lmodule: SCILLA_VERSION NUMLIT LIBRARY CID LET ID WITH ## -## Ends in an error in state: 116. +## Ends in an error in state: 115. ## ## libentry -> LET ID . EQ exp [ TYPE LET EOF CONTRACT ] ## libentry -> LET ID . type_annot EQ exp [ TYPE LET EOF CONTRACT ] @@ -984,7 +990,7 @@ This library let expression is missing an equals, '='. lmodule: SCILLA_VERSION NUMLIT LIBRARY CID LET WITH ## -## Ends in an error in state: 115. +## Ends in an error in state: 114. ## ## libentry -> LET . ID EQ exp [ TYPE LET EOF CONTRACT ] ## libentry -> LET . ID type_annot EQ exp [ TYPE LET EOF CONTRACT ] @@ -998,7 +1004,7 @@ The let expression is missing an identifier to assign an expression to. lmodule: SCILLA_VERSION NUMLIT LIBRARY CID TYPE CID EQ BAR CID OF CID TRANSITION ## -## Ends in an error in state: 112. +## Ends in an error in state: 111. ## ## nonempty_list(tconstr) -> tconstr . [ TYPE LET EOF CONTRACT ] ## nonempty_list(tconstr) -> tconstr . nonempty_list(tconstr) [ TYPE LET EOF CONTRACT ] @@ -1012,8 +1018,8 @@ lmodule: SCILLA_VERSION NUMLIT LIBRARY CID TYPE CID EQ BAR CID OF CID TRANSITION ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 25, spurious reduction of production scid -> CID ## In state 78, spurious reduction of production targ -> scid -## In state 109, spurious reduction of production nonempty_list(targ) -> targ -## In state 111, spurious reduction of production tconstr -> BAR CID OF nonempty_list(targ) +## In state 108, spurious reduction of production nonempty_list(targ) -> targ +## In state 110, spurious reduction of production tconstr -> BAR CID OF nonempty_list(targ) ## # see tests/parser/bad/lib/lmodule-library-cid-type-cid-eq-bar-cid-of-cid-transition.scillib @@ -1129,7 +1135,7 @@ This is an invalid library module because it lacks a capital identifier for a na lmodule: SCILLA_VERSION NUMLIT WITH ## -## Ends in an error in state: 365. +## Ends in an error in state: 372. ## ## lmodule -> SCILLA_VERSION NUMLIT . imports library EOF [ # ] ## @@ -1142,7 +1148,7 @@ This is an invalid library module, Scilla version must be followed by 'library' lmodule: WITH ## -## Ends in an error in state: 363. +## Ends in an error in state: 370. ## ## lmodule' -> . lmodule [ # ] ## @@ -1155,7 +1161,7 @@ Scilla version number unspecified. exp_term: AT SPID TID WITH ## -## Ends in an error in state: 109. +## Ends in an error in state: 108. ## ## nonempty_list(targ) -> targ . [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## nonempty_list(targ) -> targ . nonempty_list(targ) [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] @@ -1169,7 +1175,7 @@ The type application is wrong. The list of types is problematic. exp_term: AT SPID WITH ## -## Ends in an error in state: 192. +## Ends in an error in state: 191. ## ## simple_exp -> AT sid . nonempty_list(targ) [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1182,7 +1188,7 @@ The type application is wrong. The parser expects a non-empty list of type argum exp_term: AT WITH ## -## Ends in an error in state: 191. +## Ends in an error in state: 190. ## ## simple_exp -> AT . sid nonempty_list(targ) [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1195,7 +1201,7 @@ This type application is wrong. A separated identifier is expected to apply type exp_term: BUILTIN ID LPAREN WITH ## -## Ends in an error in state: 180. +## Ends in an error in state: 179. ## ## builtin_args -> LPAREN . RPAREN [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1208,7 +1214,7 @@ Builtin functions only take a pair of brackets when of unit input type (e.g. "() exp_term: BUILTIN ID WITH ## -## Ends in an error in state: 174. +## Ends in an error in state: 173. ## ## simple_exp -> BUILTIN ID . option(ctargs) builtin_args [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1221,7 +1227,7 @@ The usage of the builtin function is incorrect. exp_term: BUILTIN WITH ## -## Ends in an error in state: 173. +## Ends in an error in state: 172. ## ## simple_exp -> BUILTIN . ID option(ctargs) builtin_args [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1234,7 +1240,7 @@ This expression is incorrect because it does not specify a specific builtin func exp_term: CID LBRACE TID EQ ## -## Ends in an error in state: 176. +## Ends in an error in state: 175. ## ## ctargs -> LBRACE list(targ) . RBRACE [ TYPE TRANSITION SPID SEMICOLON PROCEDURE LPAREN LET IN ID FIELD EOF END CONTRACT CID BAR ARROW ] ## @@ -1254,7 +1260,7 @@ The data constructor, list of type arguments is incorrect. The parser expects an exp_term: CID LBRACE WITH ## -## Ends in an error in state: 175. +## Ends in an error in state: 174. ## ## ctargs -> LBRACE . list(targ) RBRACE [ TYPE TRANSITION SPID SEMICOLON PROCEDURE LPAREN LET IN ID FIELD EOF END CONTRACT CID BAR ARROW ] ## @@ -1267,7 +1273,7 @@ The data constructor, list of type arguments is incorrect. The parser expects a exp_term: CID PERIOD CID WITH ## -## Ends in an error in state: 197. +## Ends in an error in state: 196. ## ## simple_exp -> scid . option(ctargs) list(sident) [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1280,7 +1286,7 @@ This is an invalid expression, most likely the data constructor is missing argum exp_term: CID PERIOD WITH ## -## Ends in an error in state: 172. +## Ends in an error in state: 171. ## ## scid -> CID PERIOD . CID [ TYPE TRANSITION SPID SEMICOLON PROCEDURE LET LBRACE IN ID FIELD EOF END CONTRACT CID BAR ARROW ] ## sid -> CID PERIOD . ID [ TYPE TRANSITION SPID SEMICOLON PROCEDURE LET IN ID FIELD EOF END CONTRACT CID BAR ARROW ] @@ -1294,7 +1300,7 @@ This is an invalid expression, most likely the data constructor name is unfinish exp_term: CID WITH ## -## Ends in an error in state: 171. +## Ends in an error in state: 170. ## ## lit -> CID . NUMLIT [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## scid -> CID . [ TYPE TRANSITION SPID SEMICOLON PROCEDURE LET LBRACE IN ID FIELD EOF END CONTRACT CID BAR ARROW ] @@ -1310,7 +1316,7 @@ This is a malformed expression, it may be an incorrect data constructor usage. exp_term: EMP WITH ## -## Ends in an error in state: 152. +## Ends in an error in state: 151. ## ## lit -> EMP . t_map_key t_map_value [ TYPE TRANSITION SEMICOLON RBRACE PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1323,7 +1329,7 @@ The empty map has invalid key type (capitalised identifier). exp_term: FUN LPAREN ID COLON TID RPAREN ARROW WITH ## -## Ends in an error in state: 170. +## Ends in an error in state: 169. ## ## simple_exp -> FUN LPAREN id_with_typ RPAREN ARROW . exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1336,7 +1342,7 @@ This function is lacking a valid result expression. exp_term: FUN LPAREN ID COLON TID RPAREN WITH ## -## Ends in an error in state: 169. +## Ends in an error in state: 168. ## ## simple_exp -> FUN LPAREN id_with_typ RPAREN . ARROW exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1389,7 +1395,7 @@ Missing type annotation (a colon followed by a legal type). exp_term: FUN LPAREN WITH ## -## Ends in an error in state: 167. +## Ends in an error in state: 166. ## ## simple_exp -> FUN LPAREN . id_with_typ RPAREN ARROW exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1402,7 +1408,7 @@ This function is missing a valid argument identifier, beginning with a lower cas exp_term: FUN WITH ## -## Ends in an error in state: 166. +## Ends in an error in state: 165. ## ## simple_exp -> FUN . LPAREN id_with_typ RPAREN ARROW exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1415,7 +1421,7 @@ This function needs brackets for the argument. exp_term: LBRACE SPID COLON CID WITH ## -## Ends in an error in state: 155. +## Ends in an error in state: 154. ## ## lit -> CID . NUMLIT [ SEMICOLON RBRACE ] ## sid -> CID . PERIOD ID [ SEMICOLON RBRACE ] @@ -1429,7 +1435,7 @@ This is an invalid message construction. The parser expects another message entr exp_term: LBRACE SPID COLON HEXLIT SEMICOLON WITH ## -## Ends in an error in state: 161. +## Ends in an error in state: 160. ## ## separated_nonempty_list(SEMICOLON,msg_entry) -> msg_entry SEMICOLON . separated_nonempty_list(SEMICOLON,msg_entry) [ RBRACE ] ## @@ -1442,7 +1448,7 @@ This is an invalid message construction. The parser after a semicolon expects an exp_term: LBRACE SPID COLON HEXLIT WITH ## -## Ends in an error in state: 160. +## Ends in an error in state: 159. ## ## separated_nonempty_list(SEMICOLON,msg_entry) -> msg_entry . [ RBRACE ] ## separated_nonempty_list(SEMICOLON,msg_entry) -> msg_entry . SEMICOLON separated_nonempty_list(SEMICOLON,msg_entry) [ RBRACE ] @@ -1456,7 +1462,7 @@ This is likely an invalid message construction. The parser expects another messa exp_term: LBRACE SPID COLON WITH ## -## Ends in an error in state: 150. +## Ends in an error in state: 149. ## ## msg_entry -> sid COLON . lit [ SEMICOLON RBRACE ] ## msg_entry -> sid COLON . sid [ SEMICOLON RBRACE ] @@ -1470,7 +1476,7 @@ This is an invalid message construction. Following the colon, a literal or separ exp_term: LBRACE SPID WITH ## -## Ends in an error in state: 149. +## Ends in an error in state: 148. ## ## msg_entry -> sid . COLON lit [ SEMICOLON RBRACE ] ## msg_entry -> sid . COLON sid [ SEMICOLON RBRACE ] @@ -1484,7 +1490,7 @@ This is an invalid message construction. With a message entry, the parser expect exp_term: LBRACE WITH ## -## Ends in an error in state: 148. +## Ends in an error in state: 147. ## ## simple_exp -> LBRACE . loption(separated_nonempty_list(SEMICOLON,msg_entry)) RBRACE [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1498,7 +1504,7 @@ This is an invalid message construction. The parser expects a semi-colon separat exp_term: LET ID COLON TID EQ STRING IN WITH ## -## Ends in an error in state: 211. +## Ends in an error in state: 210. ## ## simple_exp -> LET ID type_annot EQ simple_exp IN . exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1511,7 +1517,7 @@ This let expression (type-annotated) is likely missing an expression to substitu exp_term: LET ID EQ STRING IN WITH ## -## Ends in an error in state: 206. +## Ends in an error in state: 205. ## ## simple_exp -> LET ID EQ simple_exp IN . exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1524,7 +1530,7 @@ This let expression likely does not substitute a variable into a valid expressio exp_term: LET ID EQ STRING WITH ## -## Ends in an error in state: 205. +## Ends in an error in state: 204. ## ## simple_exp -> LET ID EQ simple_exp . IN exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1537,7 +1543,7 @@ This let expression is likely missing an 'in'. exp_term: LET ID EQ WITH ## -## Ends in an error in state: 147. +## Ends in an error in state: 146. ## ## simple_exp -> LET ID EQ . simple_exp IN exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1550,7 +1556,7 @@ This let expression is missing an expression to substitute a variable in. exp_term: LET ID WITH ## -## Ends in an error in state: 146. +## Ends in an error in state: 145. ## ## simple_exp -> LET ID . EQ simple_exp IN exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## simple_exp -> LET ID . type_annot EQ simple_exp IN exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] @@ -1564,7 +1570,7 @@ This let expression is missing an equals ('=') or type annotation, directly afte exp_term: LET WITH ## -## Ends in an error in state: 145. +## Ends in an error in state: 144. ## ## simple_exp -> LET . ID EQ simple_exp IN exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## simple_exp -> LET . ID type_annot EQ simple_exp IN exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] @@ -1579,7 +1585,7 @@ This let expression is missing an identifier for the variable. exp_term: MATCH SPID UNDERSCORE ## -## Ends in an error in state: 128. +## Ends in an error in state: 127. ## ## simple_exp -> MATCH sid . WITH list(exp_pm_clause) END [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1592,7 +1598,7 @@ This match expression is missing 'with'. exp_term: MATCH SPID WITH BAR CID LPAREN UNDERSCORE WITH ## -## Ends in an error in state: 136. +## Ends in an error in state: 135. ## ## arg_pattern -> LPAREN pattern . RPAREN [ UNDERSCORE RPAREN LPAREN ID HEXLIT CID ARROW ] ## @@ -1605,7 +1611,7 @@ This is an invalid match expression, possibly unterminated brackets for pattern exp_term: MATCH SPID WITH BAR CID LPAREN WITH ## -## Ends in an error in state: 135. +## Ends in an error in state: 134. ## ## arg_pattern -> LPAREN . pattern RPAREN [ UNDERSCORE RPAREN LPAREN ID HEXLIT CID ARROW ] ## @@ -1618,7 +1624,7 @@ This match expression has invalid pattern arguments, in the brackets we expect a exp_term: MATCH SPID WITH BAR CID UNDERSCORE WITH ## -## Ends in an error in state: 141. +## Ends in an error in state: 140. ## ## list(arg_pattern) -> arg_pattern . list(arg_pattern) [ RPAREN ARROW ] ## @@ -1631,7 +1637,7 @@ In this match expression, following the pattern the parser expects an arrow (e.g exp_term: MATCH SPID WITH BAR UNDERSCORE ARROW WITH ## -## Ends in an error in state: 144. +## Ends in an error in state: 143. ## ## exp_pm_clause -> BAR pattern ARROW . exp [ END BAR ] ## @@ -1644,7 +1650,7 @@ This is an invalid match expression. Following an arrow we expect a valid expres exp_term: MATCH SPID WITH BAR UNDERSCORE WITH ## -## Ends in an error in state: 143. +## Ends in an error in state: 142. ## ## exp_pm_clause -> BAR pattern . ARROW exp [ END BAR ] ## @@ -1657,7 +1663,7 @@ This is in an invalid match expression. Following a pattern, we expect an arrow exp_term: MATCH SPID WITH BAR WITH ## -## Ends in an error in state: 130. +## Ends in an error in state: 129. ## ## exp_pm_clause -> BAR . pattern ARROW exp [ END BAR ] ## @@ -1670,7 +1676,7 @@ This is an invalid match expression. In a pattern matching clause following the exp_term: MATCH SPID WITH WITH ## -## Ends in an error in state: 129. +## Ends in an error in state: 128. ## ## simple_exp -> MATCH sid WITH . list(exp_pm_clause) END [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1683,7 +1689,7 @@ This is an invalid match expression, a pattern matching clause is necessary (pos exp_term: MATCH WITH ## -## Ends in an error in state: 123. +## Ends in an error in state: 122. ## ## simple_exp -> MATCH . sid WITH list(exp_pm_clause) END [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1696,7 +1702,7 @@ This is an invalid match expression, it is lacking a valid identifier to match w exp_term: SPID CID PERIOD WITH ## -## Ends in an error in state: 184. +## Ends in an error in state: 183. ## ## sident -> CID PERIOD . ID [ TYPE TRANSITION SPID SEMICOLON RSQB RPAREN PROCEDURE LET IN ID FIELD EOF END CONTRACT COMMA CID BAR AS ARROW ] ## @@ -1709,7 +1715,7 @@ This is an invalid expression, the identifier is incomplete or erroneous. exp_term: SPID CID WITH ## -## Ends in an error in state: 183. +## Ends in an error in state: 182. ## ## sident -> CID . PERIOD ID [ TYPE TRANSITION SPID SEMICOLON RSQB RPAREN PROCEDURE LET IN ID FIELD EOF END CONTRACT COMMA CID BAR ARROW ] ## @@ -1722,7 +1728,7 @@ This may be a type application missing '@' or an incorrect function application exp_term: SPID SPID WITH ## -## Ends in an error in state: 186. +## Ends in an error in state: 185. ## ## nonempty_list(sident) -> sident . [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## nonempty_list(sident) -> sident . nonempty_list(sident) [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] @@ -1738,7 +1744,7 @@ If this is an application of a function, it is necessary to supply a list of val exp_term: SPID WITH ## -## Ends in an error in state: 195. +## Ends in an error in state: 194. ## ## atomic_exp -> sid . [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## simple_exp -> sid . nonempty_list(sident) [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] @@ -1752,7 +1758,7 @@ This is an invalid expression. If it is an application of a function, it is nece exp_term: STRING WITH ## -## Ends in an error in state: 361. +## Ends in an error in state: 368. ## ## exp_term -> exp . EOF [ # ] ## @@ -1765,7 +1771,7 @@ This is not a valid expression, possible bad literal. exp_term: TFUN TID ARROW WITH ## -## Ends in an error in state: 120. +## Ends in an error in state: 119. ## ## simple_exp -> TFUN TID ARROW . exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1778,7 +1784,7 @@ Type functions expect a valid expression after the arrow. exp_term: TFUN TID WITH ## -## Ends in an error in state: 119. +## Ends in an error in state: 118. ## ## simple_exp -> TFUN TID . ARROW exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1791,7 +1797,7 @@ Type functions following the type id expect an arrow (e.g. '=>'). exp_term: TFUN WITH ## -## Ends in an error in state: 118. +## Ends in an error in state: 117. ## ## simple_exp -> TFUN . TID ARROW exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -1804,7 +1810,7 @@ Type functions expect a type id (e.g. 'A). exp_term: WITH ## -## Ends in an error in state: 359. +## Ends in an error in state: 366. ## ## exp_term' -> . exp_term [ # ] ## @@ -1817,7 +1823,7 @@ This is an invalid expression term, possibly avoid unnecessary brackets. cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN ID COLON CID COMMA WITH ## -## Ends in an error in state: 88. +## Ends in an error in state: 97. ## ## separated_nonempty_list(COMMA,param_pair) -> param_pair COMMA . separated_nonempty_list(COMMA,param_pair) [ RPAREN ] ## @@ -1845,7 +1851,7 @@ For a mutable field declaration, the parser expects a valid lower case beginning cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN PROCEDURE ID LPAREN RPAREN WITH ## -## Ends in an error in state: 340. +## Ends in an error in state: 347. ## ## procedure -> PROCEDURE component_id component_params . option(return_type) component_body [ TRANSITION PROCEDURE EOF ] ## @@ -1858,7 +1864,7 @@ In the transition body the parser expects a list of semi-colon separated stateme cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN PROCEDURE ID WITH ## -## Ends in an error in state: 339. +## Ends in an error in state: 346. ## ## procedure -> PROCEDURE component_id . component_params option(return_type) component_body [ TRANSITION PROCEDURE EOF ] ## @@ -1872,7 +1878,7 @@ be a left parenthesis. cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN PROCEDURE WITH ## -## Ends in an error in state: 338. +## Ends in an error in state: 345. ## ## procedure -> PROCEDURE . component_id component_params option(return_type) component_body [ TRANSITION PROCEDURE EOF ] ## @@ -1885,7 +1891,7 @@ A procedure requires a valid name. cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN TRANSITION ID LPAREN RPAREN END WITH ## -## Ends in an error in state: 349. +## Ends in an error in state: 356. ## ## list(component) -> component . list(component) [ EOF ] ## @@ -1898,7 +1904,7 @@ Following a transition definition, the parser expects a transition or a procedur cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN TRANSITION ID LPAREN RPAREN THROW BAR ## -## Ends in an error in state: 334. +## Ends in an error in state: 341. ## ## component_body -> stmts . END [ TRANSITION PROCEDURE EOF ] ## @@ -1911,9 +1917,9 @@ cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN TRANSITION ID LPAREN R ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 249, spurious reduction of production option(sid) -> ## In state 251, spurious reduction of production stmt -> THROW option(sid) -## In state 322, spurious reduction of production separated_nonempty_list(SEMICOLON,stmt) -> stmt -## In state 328, spurious reduction of production loption(separated_nonempty_list(SEMICOLON,stmt)) -> separated_nonempty_list(SEMICOLON,stmt) -## In state 336, spurious reduction of production stmts -> loption(separated_nonempty_list(SEMICOLON,stmt)) +## In state 329, spurious reduction of production separated_nonempty_list(SEMICOLON,stmt) -> stmt +## In state 335, spurious reduction of production loption(separated_nonempty_list(SEMICOLON,stmt)) -> separated_nonempty_list(SEMICOLON,stmt) +## In state 343, spurious reduction of production stmts -> loption(separated_nonempty_list(SEMICOLON,stmt)) ## # see tests/parser/cmodule-transition-id-lparen-rparen-throw-bar.scilla @@ -1988,7 +1994,7 @@ After the definition of the immutable fields, either a contract constraint, the cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN WITH ## -## Ends in an error in state: 229. +## Ends in an error in state: 228. ## ## contract -> CONTRACT CID LPAREN . loption(separated_nonempty_list(COMMA,param_pair)) RPAREN list(field) list(component) [ EOF ] ## contract -> CONTRACT CID LPAREN . loption(separated_nonempty_list(COMMA,param_pair)) RPAREN with_constraint list(field) list(component) [ EOF ] @@ -2003,7 +2009,7 @@ The name of an immutable field should begin with a lower case letter ('a' - 'z') cmodule: SCILLA_VERSION NUMLIT CONTRACT CID WITH ## -## Ends in an error in state: 228. +## Ends in an error in state: 227. ## ## contract -> CONTRACT CID . LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN list(field) list(component) [ EOF ] ## contract -> CONTRACT CID . LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN with_constraint list(field) list(component) [ EOF ] @@ -2017,7 +2023,7 @@ The declaration of zero or more immutable fields in brackets is expected. cmodule: SCILLA_VERSION NUMLIT CONTRACT WITH ## -## Ends in an error in state: 227. +## Ends in an error in state: 226. ## ## contract -> CONTRACT . CID LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN list(field) list(component) [ EOF ] ## contract -> CONTRACT . CID LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN with_constraint list(field) list(component) [ EOF ] @@ -2031,7 +2037,7 @@ When a contract is being defined a valid identifier is expected. cmodule: SCILLA_VERSION NUMLIT LIBRARY CID EOF ## -## Ends in an error in state: 226. +## Ends in an error in state: 225. ## ## cmodule -> SCILLA_VERSION NUMLIT imports option(library) . contract EOF [ # ] ## @@ -2043,8 +2049,8 @@ cmodule: SCILLA_VERSION NUMLIT LIBRARY CID EOF ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 12, spurious reduction of production list(libentry) -> -## In state 223, spurious reduction of production library -> LIBRARY CID list(libentry) -## In state 357, spurious reduction of production option(library) -> library +## In state 222, spurious reduction of production library -> LIBRARY CID list(libentry) +## In state 364, spurious reduction of production option(library) -> library ## # see tests/parser/bad/cmodule-version-number-library-name @@ -2091,7 +2097,7 @@ Scilla version number unspecified. exp_term: CID LBRACE RBRACE AT ## -## Ends in an error in state: 198. +## Ends in an error in state: 197. ## ## simple_exp -> scid option(ctargs) . list(sident) [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -2104,7 +2110,7 @@ In a data constructor application, the parser expects valid separated uncapitali exp_term: LET ID COLON TID EQ STRING WITH ## -## Ends in an error in state: 210. +## Ends in an error in state: 209. ## ## simple_exp -> LET ID type_annot EQ simple_exp . IN exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -2117,7 +2123,7 @@ This typed let expression does not have a well placed 'in'. exp_term: LET ID COLON TID EQ WITH ## -## Ends in an error in state: 209. +## Ends in an error in state: 208. ## ## simple_exp -> LET ID type_annot EQ . simple_exp IN exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -2130,7 +2136,7 @@ This typed let expression does not have a valid expression to use for the substi type_term: CID MAP CID TYPE ## -## Ends in an error in state: 107. +## Ends in an error in state: 106. ## ## targ -> MAP t_map_key . t_map_value [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## @@ -2167,7 +2173,7 @@ Ends in an error in state: 66. type_term: CID WITH CONTRACT FIELD ID COLON TID COMMA WITH ## -## Ends in an error in state: 99. +## Ends in an error in state: 94. ## ## separated_nonempty_list(COMMA,address_type_field) -> address_type_field COMMA . separated_nonempty_list(COMMA,address_type_field) [ END ] ## @@ -2179,7 +2185,7 @@ Ends in an error in state: 93. type_term: CID WITH CONTRACT FIELD ID COLON TID RPAREN ## -## Ends in an error in state: 98. +## Ends in an error in state: 93. ## ## separated_nonempty_list(COMMA,address_type_field) -> address_type_field . [ END ] ## separated_nonempty_list(COMMA,address_type_field) -> address_type_field . COMMA separated_nonempty_list(COMMA,address_type_field) [ END ] @@ -2193,14 +2199,14 @@ type_term: CID WITH CONTRACT FIELD ID COLON TID RPAREN ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 84, spurious reduction of production type_annot -> COLON typ ## In state 85, spurious reduction of production id_with_typ -> ID type_annot -## In state 94, spurious reduction of production address_type_field -> FIELD id_with_typ +## In state 89, spurious reduction of production address_type_field -> FIELD id_with_typ ## Ends in an error in state: 92. type_term: CID WITH CONTRACT FIELD WITH ## -## Ends in an error in state: 93. +## Ends in an error in state: 88. ## ## address_type_field -> FIELD . id_with_typ [ END COMMA ] ## @@ -2212,7 +2218,7 @@ Contract fields are not allowed to start with underscore. type_term: CID WITH CONTRACT LPAREN ID COLON TID EQ ## -## Ends in an error in state: 87. +## Ends in an error in state: 96. ## ## separated_nonempty_list(COMMA,param_pair) -> param_pair . [ RPAREN ] ## separated_nonempty_list(COMMA,param_pair) -> param_pair . COMMA separated_nonempty_list(COMMA,param_pair) [ RPAREN ] @@ -2226,28 +2232,16 @@ type_term: CID WITH CONTRACT LPAREN ID COLON TID EQ ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 84, spurious reduction of production type_annot -> COLON typ ## In state 85, spurious reduction of production id_with_typ -> ID type_annot -## In state 90, spurious reduction of production param_pair -> id_with_typ +## In state 99, spurious reduction of production param_pair -> id_with_typ ## Ends in an error in state: 81. -type_term: CID WITH CONTRACT LPAREN RPAREN WITH -## -## Ends in an error in state: 92. -## -## address_typ -> CID WITH CONTRACT LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN . loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] -## -## The known suffix of the stack is as follows: -## CID WITH CONTRACT LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN -## - -Ends in an error in state: 86. - type_term: CID WITH CONTRACT LPAREN WITH ## ## Ends in an error in state: 33. ## -## address_typ -> CID WITH CONTRACT LPAREN . loption(separated_nonempty_list(COMMA,param_pair)) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] +## address_typ -> CID WITH CONTRACT LPAREN . separated_nonempty_list(COMMA,param_pair) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## ## The known suffix of the stack is as follows: ## CID WITH CONTRACT LPAREN @@ -2260,7 +2254,7 @@ type_term: CID WITH CONTRACT WITH ## Ends in an error in state: 32. ## ## address_typ -> CID WITH CONTRACT . loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] -## address_typ -> CID WITH CONTRACT . LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] +## address_typ -> CID WITH CONTRACT . LPAREN separated_nonempty_list(COMMA,param_pair) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] ## ## The known suffix of the stack is as follows: ## CID WITH CONTRACT @@ -2320,7 +2314,7 @@ Likely an incorrect map value type: arrow types, forall-types and type variables type_term: MAP LPAREN CID TYPE ## -## Ends in an error in state: 103. +## Ends in an error in state: 102. ## ## t_map_key -> LPAREN scid . RPAREN [ MAP LPAREN HEXLIT CID ] ## @@ -2338,7 +2332,7 @@ Likely an incorrect map key type: only primitive types are supported. type_term: MAP LPAREN CID WITH END WITH ## -## Ends in an error in state: 105. +## Ends in an error in state: 104. ## ## t_map_key -> LPAREN address_typ . RPAREN [ MAP LPAREN HEXLIT CID ] ## @@ -2350,7 +2344,7 @@ Ends in an error in state: 99. stmts_term: FORALL SPID WITH ## -## Ends in an error in state: 314. +## Ends in an error in state: 321. ## ## stmt -> FORALL sident . component_id [ SEMICOLON EOF END BAR ] ## @@ -2362,7 +2356,7 @@ Ends in an error in state: 297. stmts_term: FORALL WITH ## -## Ends in an error in state: 313. +## Ends in an error in state: 320. ## ## stmt -> FORALL . sident component_id [ SEMICOLON EOF END BAR ] ## @@ -2374,7 +2368,7 @@ Ends in an error in state: 296. stmts_term: ID FETCH AND CID PERIOD ID WITH ## -## Ends in an error in state: 301. +## Ends in an error in state: 308. ## ## remote_fetch_stmt -> ID FETCH AND sident . AS address_typ [ SEMICOLON EOF END BAR ] ## @@ -2386,7 +2380,7 @@ Remote reads are not allowed to use namespaces. stmts_term: ID FETCH AND CID WITH ## -## Ends in an error in state: 292. +## Ends in an error in state: 299. ## ## sident -> CID . PERIOD ID [ AS ] ## stmt -> ID FETCH AND CID . option(bcfetch_args) [ SEMICOLON EOF END BAR ] @@ -2399,7 +2393,7 @@ Ends in an error in state: 283. stmts_term: ID FETCH AND EXISTS ID PERIOD ID WITH ## -## Ends in an error in state: 290. +## Ends in an error in state: 297. ## ## remote_fetch_stmt -> ID FETCH AND EXISTS ID PERIOD ID . nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## @@ -2411,9 +2405,10 @@ Ends in an error in state: 281. stmts_term: ID FETCH AND EXISTS ID PERIOD WITH ## -## Ends in an error in state: 289. +## Ends in an error in state: 292. ## ## remote_fetch_stmt -> ID FETCH AND EXISTS ID PERIOD . ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH AND EXISTS ID PERIOD . LPAREN ID RPAREN nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## ## The known suffix of the stack is as follows: ## ID FETCH AND EXISTS ID PERIOD @@ -2423,9 +2418,10 @@ Ends in an error in state: 280. stmts_term: ID FETCH AND EXISTS ID WITH ## -## Ends in an error in state: 288. +## Ends in an error in state: 291. ## ## remote_fetch_stmt -> ID FETCH AND EXISTS ID . PERIOD ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH AND EXISTS ID . PERIOD LPAREN ID RPAREN nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## ## The known suffix of the stack is as follows: ## ID FETCH AND EXISTS ID @@ -2435,9 +2431,10 @@ Ends in an error in state: 279. stmts_term: ID FETCH AND EXISTS WITH ## -## Ends in an error in state: 287. +## Ends in an error in state: 290. ## ## remote_fetch_stmt -> ID FETCH AND EXISTS . ID PERIOD ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH AND EXISTS . ID PERIOD LPAREN ID RPAREN nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## ## The known suffix of the stack is as follows: ## ID FETCH AND EXISTS @@ -2447,7 +2444,7 @@ Ends in an error in state: 278. stmts_term: ID FETCH AND ID PERIOD ID WITH ## -## Ends in an error in state: 284. +## Ends in an error in state: 287. ## ## remote_fetch_stmt -> ID FETCH AND ID PERIOD ID . nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## sident -> ID . [ SEMICOLON EOF END BAR ] @@ -2462,7 +2459,7 @@ stmts_term: ID FETCH AND ID PERIOD LPAREN SPID WITH ## ## Ends in an error in state: 282. ## -## remote_fetch_stmt -> ID FETCH AND ID PERIOD LPAREN sident . RPAREN [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH AND ID PERIOD LPAREN sident . RPAREN list(map_access) [ SEMICOLON EOF END BAR ] ## ## The known suffix of the stack is as follows: ## ID FETCH AND ID PERIOD LPAREN sident @@ -2474,7 +2471,7 @@ stmts_term: ID FETCH AND ID PERIOD LPAREN WITH ## ## Ends in an error in state: 281. ## -## remote_fetch_stmt -> ID FETCH AND ID PERIOD LPAREN . sident RPAREN [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH AND ID PERIOD LPAREN . sident RPAREN list(map_access) [ SEMICOLON EOF END BAR ] ## ## The known suffix of the stack is as follows: ## ID FETCH AND ID PERIOD LPAREN @@ -2487,7 +2484,7 @@ stmts_term: ID FETCH AND ID PERIOD WITH ## Ends in an error in state: 280. ## ## remote_fetch_stmt -> ID FETCH AND ID PERIOD . sident [ SEMICOLON EOF END BAR ] -## remote_fetch_stmt -> ID FETCH AND ID PERIOD . LPAREN sident RPAREN [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH AND ID PERIOD . LPAREN sident RPAREN list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH AND ID PERIOD . ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## ## The known suffix of the stack is as follows: @@ -2501,7 +2498,7 @@ stmts_term: ID FETCH AND ID WITH ## Ends in an error in state: 279. ## ## remote_fetch_stmt -> ID FETCH AND ID . PERIOD sident [ SEMICOLON EOF END BAR ] -## remote_fetch_stmt -> ID FETCH AND ID . PERIOD LPAREN sident RPAREN [ SEMICOLON EOF END BAR ] +## remote_fetch_stmt -> ID FETCH AND ID . PERIOD LPAREN sident RPAREN list(map_access) [ SEMICOLON EOF END BAR ] ## remote_fetch_stmt -> ID FETCH AND ID . PERIOD ID nonempty_list(map_access) [ SEMICOLON EOF END BAR ] ## sident -> ID . [ AS ] ## @@ -2513,13 +2510,13 @@ Either blockchain state variable or remote field read expected. stmts_term: ID FETCH AND SPID AS CID UNDERSCORE ## -## Ends in an error in state: 303. +## Ends in an error in state: 310. ## ## address_typ -> CID . WITH END [ SEMICOLON EOF END BAR ] ## address_typ -> CID . WITH CONTRACT loption(separated_nonempty_list(COMMA,address_type_field)) END [ SEMICOLON EOF END BAR ] ## address_typ -> CID . WITH LIBRARY END [ SEMICOLON EOF END BAR ] ## address_typ -> CID . WITH SPID END [ SEMICOLON EOF END BAR ] -## address_typ -> CID . WITH CONTRACT LPAREN loption(separated_nonempty_list(COMMA,param_pair)) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ SEMICOLON EOF END BAR ] +## address_typ -> CID . WITH CONTRACT LPAREN separated_nonempty_list(COMMA,param_pair) RPAREN loption(separated_nonempty_list(COMMA,address_type_field)) END [ SEMICOLON EOF END BAR ] ## ## The known suffix of the stack is as follows: ## CID @@ -2529,7 +2526,7 @@ Casts to non-ByStr20 types are not allowed. stmts_term: ID FETCH AND SPID AS WITH ## -## Ends in an error in state: 302. +## Ends in an error in state: 309. ## ## remote_fetch_stmt -> ID FETCH AND sident AS . address_typ [ SEMICOLON EOF END BAR ] ## @@ -2566,7 +2563,7 @@ Ends in an error in state: 267. lmodule: SCILLA_VERSION WITH ## -## Ends in an error in state: 364. +## Ends in an error in state: 371. ## ## lmodule -> SCILLA_VERSION . NUMLIT imports library EOF [ # ] ## @@ -2578,7 +2575,7 @@ Ends in an error in state: 343. exp_term: BUILTIN ID LBRACE RBRACE CATCH ## -## Ends in an error in state: 178. +## Ends in an error in state: 177. ## ## simple_exp -> BUILTIN ID option(ctargs) . builtin_args [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -2590,7 +2587,7 @@ Ends in an error in state: 172. exp_term: EMP CID TYPE ## -## Ends in an error in state: 153. +## Ends in an error in state: 152. ## ## lit -> EMP t_map_key . t_map_value [ TYPE TRANSITION SEMICOLON RBRACE PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -2609,7 +2606,7 @@ Ends in an error in state: 147. exp_term: FUN LPAREN ID COLON TID EQ ## -## Ends in an error in state: 168. +## Ends in an error in state: 167. ## ## simple_exp -> FUN LPAREN id_with_typ . RPAREN ARROW exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -2640,7 +2637,7 @@ Ends in an error in state: 23. exp_term: LET ID COLON CID RPAREN ## -## Ends in an error in state: 208. +## Ends in an error in state: 207. ## ## simple_exp -> LET ID type_annot . EQ simple_exp IN exp [ TYPE TRANSITION SEMICOLON PROCEDURE LET IN FIELD EOF END CONTRACT BAR ARROW ] ## @@ -2661,7 +2658,7 @@ Ends in an error in state: 202. exp_term: MATCH SPID WITH BAR UNDERSCORE ARROW STRING WITH ## -## Ends in an error in state: 216. +## Ends in an error in state: 215. ## ## list(exp_pm_clause) -> exp_pm_clause . list(exp_pm_clause) [ END ] ## @@ -2673,7 +2670,7 @@ match-expression is probably missing `end` keyword. cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN FIELD ID COLON TID EQ STRING WITH ## -## Ends in an error in state: 351. +## Ends in an error in state: 358. ## ## list(field) -> field . list(field) [ TRANSITION PROCEDURE EOF ] ## @@ -2752,7 +2749,7 @@ Ends in an error in state: 226. cmodule: SCILLA_VERSION NUMLIT LIBRARY CID LET ID COLON CID RPAREN ## -## Ends in an error in state: 220. +## Ends in an error in state: 219. ## ## libentry -> LET ID type_annot . EQ exp [ TYPE LET EOF CONTRACT ] ## @@ -2773,7 +2770,7 @@ Ends in an error in state: 214. cmodule: SCILLA_VERSION NUMLIT LIBRARY CID LET ID EQ STRING WITH ## -## Ends in an error in state: 224. +## Ends in an error in state: 223. ## ## list(libentry) -> libentry . list(libentry) [ EOF CONTRACT ] ## @@ -2916,7 +2913,7 @@ This is an invalid map type, the map value type is likely incorrect. The map typ exp_term: MATCH SPID WITH BAR CID MAP ## -## Ends in an error in state: 133. +## Ends in an error in state: 132. ## ## pattern -> scid . list(arg_pattern) [ RPAREN ARROW ] ## @@ -2959,7 +2956,7 @@ Ends in an error in state: 29. Please report your example at https://github.com/ stmts_term: ID FETCH AND CID LPAREN WITH ## -## Ends in an error in state: 293. +## Ends in an error in state: 300. ## ## bcfetch_args -> LPAREN . separated_nonempty_list(COMMA,sident) RPAREN [ SEMICOLON EOF END BAR ] ## @@ -2971,7 +2968,7 @@ Ends in an error in state: 290. Please report your example at https://github.com stmts_term: ID FETCH AND CID LPAREN ID WITH ## -## Ends in an error in state: 294. +## Ends in an error in state: 301. ## ## separated_nonempty_list(COMMA,sident) -> sident . [ RPAREN ] ## separated_nonempty_list(COMMA,sident) -> sident . COMMA separated_nonempty_list(COMMA,sident) [ RPAREN ] @@ -2984,7 +2981,7 @@ Ends in an error in state: 291. Please report your example at https://github.com stmts_term: ID FETCH AND CID LPAREN ID COMMA WITH ## -## Ends in an error in state: 295. +## Ends in an error in state: 302. ## ## separated_nonempty_list(COMMA,sident) -> sident COMMA . separated_nonempty_list(COMMA,sident) [ RPAREN ] ## @@ -3020,7 +3017,7 @@ stmts_term: SPID ASSIGN WITH cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN PROCEDURE CID LPAREN RPAREN COLON WITH ## -## Ends in an error in state: 341. +## Ends in an error in state: 348. ## ## return_type -> COLON . typ [ THROW SPID SEND MATCH ID FORALL EVENT END DELETE CID ACCEPT ] ## @@ -3032,7 +3029,7 @@ cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN PROCEDURE CID LPAREN R cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN PROCEDURE CID LPAREN RPAREN COLON CID RPAREN ## -## Ends in an error in state: 342. +## Ends in an error in state: 349. ## ## return_type -> COLON typ . [ THROW SPID SEND MATCH ID FORALL EVENT END DELETE CID ACCEPT ] ## typ -> typ . TARROW typ [ THROW TARROW SPID SEND MATCH ID FORALL EVENT END DELETE CID ACCEPT ] @@ -3050,3 +3047,75 @@ cmodule: SCILLA_VERSION NUMLIT CONTRACT CID LPAREN RPAREN PROCEDURE CID LPAREN R ## + +type_term: CID WITH CONTRACT LPAREN ID COLON CID RPAREN WITH +## +## Ends in an error in state: 87. +## +## address_typ -> CID WITH CONTRACT LPAREN separated_nonempty_list(COMMA,param_pair) RPAREN . loption(separated_nonempty_list(COMMA,address_type_field)) END [ TYPE TRANSITION TID THROW TARROW SPID SEND SEMICOLON RPAREN RBRACE PROCEDURE MATCH MAP LPAREN LET IN ID HEXLIT FORALL FIELD EVENT EQ EOF END DELETE CONTRACT COMMA CID BAR ARROW ACCEPT ] +## +## The known suffix of the stack is as follows: +## CID WITH CONTRACT LPAREN separated_nonempty_list(COMMA,param_pair) RPAREN +## + + + +stmts_term: ID FETCH AND ID PERIOD LPAREN ID RPAREN WITH +## +## Ends in an error in state: 283. +## +## remote_fetch_stmt -> ID FETCH AND ID PERIOD LPAREN sident RPAREN . list(map_access) [ SEMICOLON EOF END BAR ] +## +## The known suffix of the stack is as follows: +## ID FETCH AND ID PERIOD LPAREN sident RPAREN +## + + + +stmts_term: ID FETCH AND ID PERIOD LPAREN ID RPAREN LSQB ID RSQB WITH +## +## Ends in an error in state: 284. +## +## list(map_access) -> map_access . list(map_access) [ SEMICOLON EOF END BAR ] +## +## The known suffix of the stack is as follows: +## map_access +## + + + +stmts_term: ID FETCH AND EXISTS ID PERIOD LPAREN WITH +## +## Ends in an error in state: 293. +## +## remote_fetch_stmt -> ID FETCH AND EXISTS ID PERIOD LPAREN . ID RPAREN nonempty_list(map_access) [ SEMICOLON EOF END BAR ] +## +## The known suffix of the stack is as follows: +## ID FETCH AND EXISTS ID PERIOD LPAREN +## + + + +stmts_term: ID FETCH AND EXISTS ID PERIOD LPAREN ID WITH +## +## Ends in an error in state: 294. +## +## remote_fetch_stmt -> ID FETCH AND EXISTS ID PERIOD LPAREN ID . RPAREN nonempty_list(map_access) [ SEMICOLON EOF END BAR ] +## +## The known suffix of the stack is as follows: +## ID FETCH AND EXISTS ID PERIOD LPAREN ID +## + + + +stmts_term: ID FETCH AND EXISTS ID PERIOD LPAREN ID RPAREN WITH +## +## Ends in an error in state: 295. +## +## remote_fetch_stmt -> ID FETCH AND EXISTS ID PERIOD LPAREN ID RPAREN . nonempty_list(map_access) [ SEMICOLON EOF END BAR ] +## +## The known suffix of the stack is as follows: +## ID FETCH AND EXISTS ID PERIOD LPAREN ID RPAREN +## + + diff --git a/src/base/ParserUtil.ml b/src/base/ParserUtil.ml index c6be810a1..98bad7a09 100644 --- a/src/base/ParserUtil.ml +++ b/src/base/ParserUtil.ml @@ -107,6 +107,7 @@ module type Syn = sig ParserRep.rep SIdentifier.t * ParserRep.rep SIdentifier.t * ParserRep.rep SIdentifier.t + * field_mutability | Store of ParserRep.rep SIdentifier.t * ParserRep.rep SIdentifier.t | Bind of ParserRep.rep SIdentifier.t * expr_annot (* m[k1][k2][..] := v OR delete m[k1][k2][...] *) @@ -126,6 +127,7 @@ module type Syn = sig ParserRep.rep SIdentifier.t * ParserRep.rep SIdentifier.t * ParserRep.rep SIdentifier.t + * field_mutability * ParserRep.rep SIdentifier.t list * bool | MatchStmt of diff --git a/src/base/PatternChecker.ml b/src/base/PatternChecker.ml index ac0deffe4..d6a0a7fc1 100644 --- a/src/base/PatternChecker.ml +++ b/src/base/PatternChecker.ml @@ -249,16 +249,16 @@ struct let%bind checked_s = match s with | Load (i, x) -> pure @@ (CheckedPatternSyntax.Load (i, x), rep) - | RemoteLoad (i, adr, x) -> - pure @@ (CheckedPatternSyntax.RemoteLoad (i, adr, x), rep) + | RemoteLoad (i, adr, x, mutability) -> + pure @@ (CheckedPatternSyntax.RemoteLoad (i, adr, x, mutability), rep) | Store (i, x) -> pure @@ (CheckedPatternSyntax.Store (i, x), rep) | MapUpdate (m, klist, v) -> pure @@ (CheckedPatternSyntax.MapUpdate (m, klist, v), rep) | MapGet (v, m, klist, valfetch) -> pure @@ (CheckedPatternSyntax.MapGet (v, m, klist, valfetch), rep) - | RemoteMapGet (v, adr, m, klist, valfetch) -> + | RemoteMapGet (v, adr, m, mutability, klist, valfetch) -> pure - @@ ( CheckedPatternSyntax.RemoteMapGet (v, adr, m, klist, valfetch), + @@ ( CheckedPatternSyntax.RemoteMapGet (v, adr, m, mutability, klist, valfetch), rep ) | Bind (i, e) -> wrap_pmcheck_serr srep diff --git a/src/base/Recursion.ml b/src/base/Recursion.ml index 9e7365bbe..ed8b6922c 100644 --- a/src/base/Recursion.ml +++ b/src/base/Recursion.ml @@ -73,8 +73,9 @@ module ScillaRecursion (SR : Rep) (ER : Rep) = struct forallM ~f:walk targs | PolyFun (_, t) -> walk t | Address AnyAddr | Address CodeAddr | Address LibAddr -> pure () - | Address (ContrAddr fts) -> - forallM (IdLoc_Comp.Map.to_alist fts) ~f:(fun (_, t) -> walk t) + | Address (ContrAddr (im_fts, m_fts)) -> + let%bind () = forallM (IdLoc_Comp.Map.to_alist im_fts) ~f:(fun (_, t) -> walk t) in + forallM (IdLoc_Comp.Map.to_alist m_fts) ~f:(fun (_, t) -> walk t) in walk t @@ -188,8 +189,8 @@ module ScillaRecursion (SR : Rep) (ER : Rep) = struct let%bind new_s = match s with | Load (x, f) -> pure @@ RecursionSyntax.Load (x, f) - | RemoteLoad (x, adr, f) -> - pure @@ RecursionSyntax.RemoteLoad (x, adr, f) + | RemoteLoad (x, adr, f, mutability) -> + pure @@ RecursionSyntax.RemoteLoad (x, adr, f, mutability) | Store (f, x) -> pure @@ RecursionSyntax.Store (f, x) | Bind (x, e) -> let%bind new_e = rec_exp e in @@ -198,8 +199,8 @@ module ScillaRecursion (SR : Rep) (ER : Rep) = struct pure @@ RecursionSyntax.MapUpdate (m, is, vopt) | MapGet (x, m, is, del) -> pure @@ RecursionSyntax.MapGet (x, m, is, del) - | RemoteMapGet (x, adr, m, is, del) -> - pure @@ RecursionSyntax.RemoteMapGet (x, adr, m, is, del) + | RemoteMapGet (x, adr, m, mutability, is, del) -> + pure @@ RecursionSyntax.RemoteMapGet (x, adr, m, mutability, is, del) | MatchStmt (x, pss) -> let%bind new_pss = mapM @@ -301,8 +302,9 @@ module ScillaRecursion (SR : Rep) (ER : Rep) = struct fail1 ~kind:"Type variables not allowed in type definitions" ?inst:None error_loc | Address AnyAddr | Address CodeAddr | Address LibAddr -> pure () - | Address (ContrAddr fts) -> - forallM (IdLoc_Comp.Map.to_alist fts) ~f:(fun (_, t) -> walk t) + | Address (ContrAddr (im_fts, m_fts)) -> + let%bind () = forallM (IdLoc_Comp.Map.to_alist im_fts) ~f:(fun (_, t) -> walk t) in + forallM (IdLoc_Comp.Map.to_alist m_fts) ~f:(fun (_, t) -> walk t) in walk t diff --git a/src/base/SanityChecker.ml b/src/base/SanityChecker.ml index 3f6577595..b16b52073 100644 --- a/src/base/SanityChecker.ml +++ b/src/base/SanityChecker.ml @@ -379,9 +379,9 @@ struct foldM stmts ~init:stmt_defs ~f:(fun acc_stmt_defs (s, _) -> match s with | Load (x, _) - | RemoteLoad (x, _, _) + | RemoteLoad (x, _, _, _) | MapGet (x, _, _, _) - | RemoteMapGet (x, _, _, _, _) + | RemoteMapGet (x, _, _, _, _, _) | ReadFromBC (x, _) | TypeCast (x, _, _) -> check_warn_redef cparams cfields pnames stmt_defs x; @@ -804,7 +804,7 @@ struct let collect_variables_from_map_get (s, _annot) = match s with - | MapGet (v, _, _, true) | RemoteMapGet (v, _, _, _, true) -> [ v ] + | MapGet (v, _, _, true) | RemoteMapGet (v, _, _, _, _, true) -> [ v ] | MapGet _ | RemoteMapGet _ | Load _ | RemoteLoad _ | Store _ | Bind _ | MapUpdate _ | MatchStmt _ | ReadFromBC _ | TypeCast _ | AcceptPayment | Return _ | Iterate _ | SendMsgs _ | CreateEvnt _ | CallProc _ | Throw _ diff --git a/src/base/ScillaParser.mly b/src/base/ScillaParser.mly index 70a528d1d..9059d1bf9 100644 --- a/src/base/ScillaParser.mly +++ b/src/base/ScillaParser.mly @@ -66,6 +66,17 @@ | t -> PrimType t with | _ -> raise (exn ()) + let mk_contract_address_typ immutables mutables = + let open SType in + let mk_fs fs field_kind = List.fold_left (fun acc (id, t) -> + match IdLoc_Comp.Map.add acc ~key:id ~data:t with + | `Ok new_map -> new_map + | `Duplicate -> + raise (SyntaxError (("Duplicate " ^ field_kind ^ " name " ^ (ParserIdentifier.as_string id) ^ " in address type"), ParserIdentifier.get_rep id))) + IdLoc_Comp.Map.empty fs + in + Address (ContrAddr (mk_fs immutables "contract parameter", mk_fs mutables "field")) + let build_prim_literal_exn t v loc = match SLiteral.build_prim_literal t v with | Some l -> l @@ -243,22 +254,14 @@ t_map_value_allow_targs : | t = t_map_value { t } -address_typ : +address_typ: | d = CID; WITH; END; { if d = "ByStr20" then Address AnyAddr else raise (SyntaxError ("Invalid type", toLoc $startpos(d))) } | d = CID; WITH; CONTRACT; fs = separated_list(COMMA, address_type_field); END; { if d = "ByStr20" - then - let fs' = List.fold_left (fun acc (id, t) -> - match SType.IdLoc_Comp.Map.add acc ~key:id ~data:t with - | `Ok new_map -> new_map - | `Duplicate -> - raise (SyntaxError (Printf.sprintf "Duplicate field name %s in address type" (ParserIdentifier.as_string id), toLoc $startpos(d)))) - SType.IdLoc_Comp.Map.empty fs - in - Address (ContrAddr fs') + then mk_contract_address_typ [] fs else raise (SyntaxError ("Invalid type", toLoc $startpos(d))) } | d = CID; WITH; LIBRARY; END; { if d = "ByStr20" @@ -269,9 +272,9 @@ address_typ : then Address CodeAddr else raise (SyntaxError ("Invalid type", toLoc $startpos(d))) } | (* Adding this production in preparation for contract parameters *) - d = CID; WITH; CONTRACT; LPAREN; _ps = separated_list(COMMA, param_pair); RPAREN; _fs = separated_list(COMMA, address_type_field); END; + d = CID; WITH; CONTRACT; LPAREN; ps = separated_nonempty_list(COMMA, param_pair); RPAREN; fs = separated_list(COMMA, address_type_field); END; { if d = "ByStr20" - then raise (SyntaxError ("Contract parameters in address types not yet supported", toLoc $startpos(d))) + then mk_contract_address_typ ps fs else raise (SyntaxError ("Invalid type", toLoc $startpos(d))) } typ : @@ -450,19 +453,24 @@ stmt: remote_fetch_stmt: | l = ID; FETCH; AND; adr = ID; PERIOD; r = sident - { RemoteLoad (to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), r), toLoc $startpos } + { RemoteLoad (to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), r, Mutable), toLoc $startpos } | (* Reading _sender._balance or _origin._balance *) l = ID; FETCH; AND; adr = SPID; PERIOD; r = SPID - { RemoteLoad (to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r))), toLoc $startpos } -| (* Adding this production in preparation for remote reads of contract parameters *) - _l = ID; FETCH; AND; _adr = ID; PERIOD; LPAREN; _r = sident; RPAREN; - { raise (SyntaxError ("Remote fetch of contract parameters not yet supported", toLoc $startpos(_adr))) } + { RemoteLoad (to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), Mutable), toLoc $startpos } +| (* Reading immutable fields *) + l = ID; FETCH; AND; adr = ID; PERIOD; LPAREN; r = sident; RPAREN; keys = list(map_access) + { + match keys with + | [] -> RemoteLoad (to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), r, Immutable), toLoc $startpos + | _ -> RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), r, Immutable, keys, true), toLoc $startpos + } | l = ID; FETCH; AND; adr = ID; PERIOD; r = ID; keys = nonempty_list(map_access) - { RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), keys, true), toLoc $startpos } + { RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), Mutable, keys, true), toLoc $startpos } | l = ID; FETCH; AND; EXISTS; adr = ID; PERIOD; r = ID; keys = nonempty_list(map_access) - { RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), keys, false), toLoc $startpos } -| (* Adding this production in preparation for address type casts *) - l = ID; FETCH; AND; adr = sident; AS; t = address_typ + { RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), Mutable, keys, false), toLoc $startpos } +| l = ID; FETCH; AND; EXISTS; adr = ID; PERIOD; LPAREN; r = ID; RPAREN; keys = nonempty_list(map_access) + { RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), Immutable, keys, false), toLoc $startpos } +| l = ID; FETCH; AND; adr = sident; AS; t = address_typ { TypeCast(to_loc_id l (toLoc $startpos(l)), adr, t), toLoc $startpos } stmt_pm_clause: diff --git a/src/base/Syntax.ml b/src/base/Syntax.ml index bb5b35702..6102a0183 100644 --- a/src/base/Syntax.ml +++ b/src/base/Syntax.ml @@ -205,6 +205,14 @@ type component_type = CompTrans | CompProc [@@deriving sexp, to_yojson] let component_type_to_string ctp = match ctp with CompTrans -> "transition" | CompProc -> "procedure" +(*******************************************************) +(* Field mutability (for remote reads) *) +(*******************************************************) + +type field_mutability = Mutable | Immutable [@@deriving sexp, to_yojson] + +let is_mutable = function Mutable -> true | Immutable -> false + (*******************************************************) (* Annotations *) (*******************************************************) @@ -318,8 +326,12 @@ module ScillaSyntax (SR : Rep) (ER : Rep) (Lit : ScillaLiteral) = struct | Load of ER.rep SIdentifier.t * ER.rep SIdentifier.t (** [Load(I1, I2)] represents: [I1 <- I2] *) | RemoteLoad of - ER.rep SIdentifier.t * ER.rep SIdentifier.t * ER.rep SIdentifier.t - (** [RemoteLoad(I1, I2, I3)] represents: [I1 <- & I2.I3] *) + ER.rep SIdentifier.t + * ER.rep SIdentifier.t + * ER.rep SIdentifier.t + * field_mutability + (** [RemoteLoad(I1, I2, I3, Mutable)] represents: [I1 <- & I2.I3] (reading a contract state field) + * [RemoteLoad(I1, I2, I3, Immutable)] represents: [I1 <- & I2.(I3)] (reading a contract parameter) *) | Store of ER.rep SIdentifier.t * ER.rep SIdentifier.t (** [Store(I1, I2)] represents: [I1 := I2] *) | Bind of ER.rep SIdentifier.t * expr_annot @@ -343,11 +355,14 @@ module ScillaSyntax (SR : Rep) (ER : Rep) (Lit : ScillaLiteral) = struct ER.rep SIdentifier.t * ER.rep SIdentifier.t * ER.rep SIdentifier.t + * field_mutability * ER.rep SIdentifier.t list * bool - (** [RemoteMapGet(V, Adr, M, [K1; ...; Kn], Retrieve)] represents: - * [V <- & Adr.M[K1]...[Kn]] if [Retrieve] is [true] - * [V <- & exists Adr.M[K1]...[Kn]] if [Retrieve] is [false] *) + (** [RemoteMapGet(V, Adr, M, IsMutable, [K1; ...; Kn], Retrieve)] represents: + * [V <- & Adr.(M)[K1]...[Kn]] if [IsMutable] is [Immutable] and [Retrieve] is [true] + * [V <- & exists Adr.(M)[K1]...[Kn]] if [IsMutable] is [Immutable] and [Retrieve] is [false] + * [V <- & Adr.M[K1]...[Kn]] if [IsMutable] is [Mutable] and [Retrieve] is [true] + * [V <- & exists Adr.M[K1]...[Kn]] if [IsMutable] is [Mutable] and [Retrieve] is [false] *) | MatchStmt of ER.rep SIdentifier.t * (pattern * stmt_annot list) list (** [MatchStmt(I, [(P1; S1); ...; (Pn; Sn)])] represents: [match I with @@ -609,9 +624,13 @@ module ScillaSyntax (SR : Rep) (ER : Rep) (Lit : ScillaLiteral) = struct | Load (x, f) -> sprintf "Type error in reading value of `%s` into `%s`:\n %s" (as_error_string f) (as_error_string x) phase - | RemoteLoad (x, adr, f) -> - sprintf "Type error in reading value of `%s.%s` into `%s`:\n %s" - (as_error_string adr) (as_error_string f) (as_error_string x) phase + | RemoteLoad (x, adr, f, mutability) -> + sprintf "Type error in reading value of `%s.%s%s%s` into `%s`:\n %s" + (as_error_string adr) + (if is_mutable mutability then "" else "(") + (as_error_string f) + (if is_mutable mutability then "" else ")") + (as_error_string x) phase | Store (f, r) -> sprintf "Type error in storing value of `%s` into the field `%s`:\n" (as_error_string r) (as_error_string f) @@ -623,9 +642,12 @@ module ScillaSyntax (SR : Rep) (ER : Rep) (Lit : ScillaLiteral) = struct ^ List.fold keys ~init:"" ~f:(fun acc k -> acc ^ "[" ^ as_error_string k ^ "]") ^ "\n" - | RemoteMapGet (_, adr, m, keys, _) -> - sprintf "Type error in getting map value %s.%s" (as_error_string adr) + | RemoteMapGet (_, adr, m, mutability, keys, _) -> + sprintf "Type error in getting map value %s.%s%s%s" + (as_error_string adr) + (if is_mutable mutability then "" else "(") (as_error_string m) + (if is_mutable mutability then "" else ")") ^ List.fold keys ~init:"" ~f:(fun acc k -> acc ^ "[" ^ as_error_string k ^ "]") ^ "\n" diff --git a/src/base/SyntaxAnnotMapper.ml b/src/base/SyntaxAnnotMapper.ml index 65ebc1a9c..14c079dfe 100644 --- a/src/base/SyntaxAnnotMapper.ml +++ b/src/base/SyntaxAnnotMapper.ml @@ -75,14 +75,10 @@ struct let open MType in match kind with | AnyAddr | CodeAddr | LibAddr -> kind - | ContrAddr fields_map -> - let mapped_keys = - IdLoc_Comp.Map.map_keys_exn fields_map ~f:(fun f -> map_id fl f) - in - let mapped_values = - IdLoc_Comp.Map.map mapped_keys ~f:(fun ty -> map_type ty ~fl) - in - ContrAddr mapped_values + | ContrAddr (im_fields_map, m_fields_map) -> + let key_mapper fields_map = IdLoc_Comp.Map.map_keys_exn fields_map ~f:(map_id fl) in + let value_mapper fields_map = IdLoc_Comp.Map.map (key_mapper fields_map) ~f:(fun ty -> map_type ty ~fl) in + ContrAddr (value_mapper im_fields_map, value_mapper m_fields_map) let literal lit ~fl = let rec walk lit = @@ -180,8 +176,8 @@ struct let rec statement stmt ~fe ~fl ~fs = match stmt with | Load (id, field) -> OutputSyntax.Load (map_id fe id, map_id fe field) - | RemoteLoad (id, addr, field) -> - OutputSyntax.RemoteLoad (map_id fe id, map_id fe addr, map_id fe field) + | RemoteLoad (id, addr, field, mutability) -> + OutputSyntax.RemoteLoad (map_id fe id, map_id fe addr, map_id fe field, mutability) | Store (field, value) -> OutputSyntax.Store (map_id fe field, map_id fe value) | Bind (id, e) -> OutputSyntax.Bind (map_id fe id, expr_annot e ~fe ~fl ~fs) @@ -196,11 +192,12 @@ struct map_id fe map, List.map keys ~f:(fun k -> map_id fe k), mode ) - | RemoteMapGet (value, addr, map, keys, mode) -> + | RemoteMapGet (value, addr, map, mutability, keys, mode) -> OutputSyntax.RemoteMapGet ( map_id fe value, map_id fe addr, map_id fe map, + mutability, List.map keys ~f:(fun k -> map_id fe k), mode ) | MatchStmt (matchee, branches) -> diff --git a/src/base/Type.ml b/src/base/Type.ml index 1cb68397f..2a36c18b6 100644 --- a/src/base/Type.ml +++ b/src/base/Type.ml @@ -87,13 +87,11 @@ module PrimType = struct end module TIdentifier_Loc (TIdentifier : ScillaIdentifier) = struct - type t = loc TIdentifier.t + type t = loc TIdentifier.t [@@deriving sexp] let show = TIdentifier.as_string let compare (a : t) (b : t) = TIdentifier.compare a b let equal (a : t) (b : t) = TIdentifier.equal a b - let sexp_of_t = TIdentifier.sexp_of_t (fun l -> sexp_of_loc l) - let t_of_sexp = TIdentifier.t_of_sexp (fun s -> loc_of_sexp s) end module IdLoc_Comp (TIdentifier : ScillaIdentifier) = struct @@ -124,8 +122,8 @@ module type ScillaType = sig | CodeAddr (* Address containing a library. *) | LibAddr - (* Address containing a contract. *) - | ContrAddr of 'a IdLoc_Comp.Map.t + (* Address containing a contract - immutable and mutable fields. *) + | ContrAddr of 'a IdLoc_Comp.Map.t * 'a IdLoc_Comp.Map.t [@@deriving sexp] type t = @@ -212,8 +210,8 @@ module MkType (I : ScillaIdentifier) = struct | CodeAddr (* Address containing a library. *) | LibAddr - (* Address containing a contract. *) - | ContrAddr of 'a IdLoc_Comp.Map.t + (* Address containing a contract - immutable and mutable fields. *) + | ContrAddr of 'a IdLoc_Comp.Map.t * 'a IdLoc_Comp.Map.t [@@deriving sexp] type t = @@ -245,17 +243,20 @@ module MkType (I : ScillaIdentifier) = struct | Address AnyAddr -> "ByStr20 with end" | Address CodeAddr -> "ByStr20 with _codehash end" | Address LibAddr -> "ByStr20 with library end" - | Address (ContrAddr fts) -> - let elems = - List.map (IdLoc_Comp.Map.to_alist fts) ~f:(fun (f, t) -> - sprintf "field %s : %s" - (if is_error then TIdentifier.as_error_string f - else TIdentifier.as_string f) - (recurser t)) - |> String.concat ~sep:", " + | Address (ContrAddr (im_fts, m_fts)) -> + let f_t_strs fts = List.map (IdLoc_Comp.Map.to_alist fts) ~f:(fun (f, t) -> + sprintf "%s : %s" + (if is_error then TIdentifier.as_error_string f + else TIdentifier.as_string f) + (recurser t)) in - sprintf "ByStr20 with contract %s%send" elems - (if IdLoc_Comp.Map.is_empty fts then "" else " ") + let immutables_str = + if IdLoc_Comp.Map.is_empty im_fts then "" + else sprintf " (%s)" (String.concat ~sep:", " (f_t_strs im_fts)) in + let mutables_str = if IdLoc_Comp.Map.is_empty m_fts then "" + else String.concat ~sep:"," (List.map (f_t_strs m_fts) ~f:(fun f_t_str -> sprintf " field %s" f_t_str)) in + sprintf "ByStr20 with contract%s%s end" immutables_str mutables_str + and with_paren t = match t with | FunType _ | PolyFun _ -> sprintf "(%s)" (recurser t) @@ -286,9 +287,10 @@ module MkType (I : ScillaIdentifier) = struct let acc' = go bt acc in rem acc' arg | Address AnyAddr | Address LibAddr | Address CodeAddr -> acc - | Address (ContrAddr fts) -> - IdLoc_Comp.Map.fold fts ~init:acc ~f:(fun ~key:_ ~data acc -> - go data acc) + | Address (ContrAddr (im_fts, m_fts)) -> + let mapper ~key:_ ~data acc = go data acc in + let immuts_acc = IdLoc_Comp.Map.fold im_fts ~init:acc ~f:mapper in + IdLoc_Comp.Map.fold m_fts ~init:immuts_acc ~f:mapper in go tp [] @@ -322,9 +324,11 @@ module MkType (I : ScillaIdentifier) = struct if String.(tvar = arg) then tm else PolyFun (arg, subst_type_in_type tvar tp t) | Address AnyAddr | Address LibAddr | Address CodeAddr -> tm - | Address (ContrAddr fts) -> + | Address (ContrAddr (im_fts, m_fts)) -> Address - (ContrAddr (IdLoc_Comp.Map.map fts ~f:(subst_type_in_type tvar tp))) + (ContrAddr + (IdLoc_Comp.Map.map im_fts ~f:(subst_type_in_type tvar tp), + IdLoc_Comp.Map.map m_fts ~f:(subst_type_in_type tvar tp))) (* note: this is sequential substitution of multiple variables, _not_ simultaneous substitution *) @@ -348,9 +352,11 @@ module MkType (I : ScillaIdentifier) = struct let bt2 = recursor bt1 (update_taken arg' taken) in PolyFun (arg', bt2) | Address AnyAddr | Address LibAddr | Address CodeAddr -> t - | Address (ContrAddr fts) -> + | Address (ContrAddr (im_fts, m_fts)) -> Address - (ContrAddr (IdLoc_Comp.Map.map fts ~f:(fun t -> recursor t taken))) + (ContrAddr + (IdLoc_Comp.Map.map im_fts ~f:(fun t -> recursor t taken), + IdLoc_Comp.Map.map m_fts ~f:(fun t -> recursor t taken))) in recursor @@ -382,8 +388,9 @@ module MkType (I : ScillaIdentifier) = struct | Address LibAddr, Address LibAddr | Address CodeAddr, Address CodeAddr -> true - | Address (ContrAddr fts1), Address (ContrAddr fts2) -> - IdLoc_Comp.Map.equal equiv fts1 fts2 + | Address (ContrAddr (im_fts1, m_fts1)), Address (ContrAddr (im_fts2, m_fts2)) -> + IdLoc_Comp.Map.equal equiv im_fts1 im_fts2 && + IdLoc_Comp.Map.equal equiv m_fts1 m_fts2 | _ -> false in equiv t1 t2 @@ -408,16 +415,22 @@ module MkType (I : ScillaIdentifier) = struct | Address CodeAddr, Address (ContrAddr _) -> (* Any address containing code, library or contract is a code address. *) true - | Address (ContrAddr tfts), Address (ContrAddr ffts) -> - (* Check that tfts is a subset of ffts, and that types are assignable/equivalent. *) - IdLoc_Comp.Map.for_alli tfts ~f:(fun ~key:tf ~data:tft -> - match IdLoc_Comp.Map.find ffts tf with - | None -> - (* to field does not appear in from type *) - false - | Some fft -> - (* Matching field name. Types must be assignable. *) - assignable tft fft) + | Address (ContrAddr (to_im_fts, to_m_fts)), Address (ContrAddr (fr_im_fts, fr_m_fts)) -> + (* Check that + - to_im_fts is a subset of fr_im_fts, + - to_m_fts is a subset of fr_m_fts, and that + - all common fields have assignable/equivalent types. *) + let map_checker tfts ffts = + IdLoc_Comp.Map.for_alli tfts ~f:(fun ~key:tf ~data:tft -> + match IdLoc_Comp.Map.find ffts tf with + | None -> + (* to field does not appear in from type *) + false + | Some fft -> + (* Matching field name. Types must be assignable. *) + assignable tft fft) + in + map_checker to_im_fts fr_im_fts && map_checker to_m_fts fr_m_fts | PrimType (Bystrx_typ len), Address _ when len = address_length -> (* Any address is assignable to ByStr20. *) true diff --git a/src/base/TypeChecker.ml b/src/base/TypeChecker.ml index b0adcbe68..84eaef6a1 100644 --- a/src/base/TypeChecker.ml +++ b/src/base/TypeChecker.ml @@ -151,9 +151,10 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct | ADT (_, ts) -> List.fold_left ts ~init:1 ~f:(fun acc t -> acc + type_size t) | Address AnyAddr | Address CodeAddr | Address LibAddr -> 1 - | Address (ContrAddr fts) -> - IdLoc_Comp.Map.fold fts ~init:1 ~f:(fun ~key:_ ~data:t acc -> - acc + type_size t) + | Address (ContrAddr (im_fts, m_fts)) -> + let mapper ~key:_ ~data:t acc = acc + type_size t in + let im_acc = IdLoc_Comp.Map.fold im_fts ~init:1 ~f:mapper in + IdLoc_Comp.Map.fold m_fts ~init:im_acc ~f:mapper in let subst_type_cost tvar tm tp_size = @@ -167,10 +168,10 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct 1 | TypeVar n -> if String.(n = tvar) then tp_size else 1 | Address AnyAddr | Address LibAddr | Address CodeAddr -> 1 - | Address (ContrAddr fts) -> + | Address (ContrAddr (im_fts, m_fts)) -> + let mapper fts = IdLoc_Comp.Map.fold fts ~init:0 ~f:(fun ~key:_ ~data:t acc -> acc + cost t) in max 1 - (IdLoc_Comp.Map.fold fts ~init:0 ~f:(fun ~key:_ ~data:t acc -> - acc + cost t)) + (mapper im_fts + mapper m_fts) in cost tm in @@ -202,14 +203,16 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct let%bind res = recurser t' in pure (PolyFun (arg, res)) | Address AnyAddr | Address LibAddr | Address CodeAddr -> pure t - | Address (ContrAddr fts) -> - let%bind fts_res = + | Address (ContrAddr (im_fts, m_fts)) -> + let fts_mapper fts = foldM (IdLoc_Comp.Map.to_alist fts) ~init:IdLoc_Comp.Map.empty ~f:(fun acc (key, t) -> - let%bind dis_t = recurser t in - pure @@ IdLoc_Comp.Map.set acc ~key ~data:dis_t) + let%bind dis_t = recurser t in + pure @@ IdLoc_Comp.Map.set acc ~key ~data:dis_t) in - pure (Address (ContrAddr fts_res)) + let%bind im_fts_res = fts_mapper im_fts in + let%bind m_fts_res = fts_mapper m_fts in + pure (Address (ContrAddr (im_fts_res, m_fts_res))) in checkwrap_op thunk gas_cost (GasError, out_of_gas_err) in @@ -600,13 +603,13 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct let typed_m = add_type_to_ident m (rr_typ m_type) in pure (typed_m, typed_keys, res) - let type_remote_map_access env adr m keys = + let type_remote_map_access env adr m is_mutable keys = let lc = get_rep adr in let%bind adr_type = fromR_TE @@ TEnv.resolveT env.pure (get_id adr) ~lopt:(Some lc) in let%bind m_type = - fromR_TE @@ address_field_type (ER.get_loc lc) m (rr_typ adr_type).tp + fromR_TE @@ address_field_type (ER.get_loc lc) m (rr_typ adr_type).tp is_mutable in let%bind typed_keys, res = type_map_access_helper env m_type keys in let typed_m = add_type_to_ident m (mk_qual_tp m_type) in @@ -643,7 +646,7 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct @@ add_stmt_to_stmts_env_gas (TypedSyntax.Load (typed_x, typed_f), rep) checked_stmts - | RemoteLoad (x, adr, f) -> + | RemoteLoad (x, adr, f, mutability) -> let lc = get_rep adr in let%bind pure', adr_type, ident_type = let%bind adr_typ = @@ -651,7 +654,7 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct in let%bind fr = fromR_TE - @@ address_field_type (ER.get_loc lc) f (rr_typ adr_typ).tp + @@ address_field_type (ER.get_loc lc) f (rr_typ adr_typ).tp (is_mutable mutability) in pure @@ ((x, fr), rr_typ adr_typ, mk_qual_tp fr) in @@ -664,7 +667,7 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct let typed_f = add_type_to_ident f ident_type in pure @@ add_stmt_to_stmts_env_gas - (TypedSyntax.RemoteLoad (typed_x, typed_adr, typed_f), rep) + (TypedSyntax.RemoteLoad (typed_x, typed_adr, typed_f, mutability), rep) checked_stmts | Store (f, r) -> if List.mem ~equal:[%equal: TCName.t] no_store_fields (get_id f) @@ -771,10 +774,10 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct ( TypedSyntax.MapGet (typed_v, typed_m, typed_klist, valfetch), rep ) checked_stmts - | RemoteMapGet (v, adr, m, klist, valfetch) -> + | RemoteMapGet (v, adr, m, mutability, klist, valfetch) -> let%bind typed_adr, typed_m, typed_klist, v_type = let%bind typed_adr, typed_m, typed_klist, v_type = - type_remote_map_access env adr m klist + type_remote_map_access env adr m (is_mutable mutability) klist in pure @@ (typed_adr, typed_m, typed_klist, v_type) in @@ -792,7 +795,7 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct pure @@ add_stmt_to_stmts_env_gas ( TypedSyntax.RemoteMapGet - (typed_v, typed_adr, typed_m, typed_klist, valfetch), + (typed_v, typed_adr, typed_m, mutability, typed_klist, valfetch), rep ) checked_stmts | ReadFromBC (x, bf) -> @@ -817,7 +820,7 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct match%bind type_actuals env.pure [ addr; iparams ] with | [ targ_addr; targ_iparams ], [ addr'; iparams' ] -> let contr_typ = - address_typ (ContrAddr IdLoc_Comp.Map.empty) + address_typ (ContrAddr (IdLoc_Comp.Map.empty, IdLoc_Comp.Map.empty)) in let%bind () = fromR_TE diff --git a/src/base/TypeInfo.ml b/src/base/TypeInfo.ml index c24891824..9e4c072e9 100644 --- a/src/base/TypeInfo.ml +++ b/src/base/TypeInfo.ml @@ -100,7 +100,7 @@ struct List.fold_right stmts ~init:[] ~f:(fun (stmt, _srep) acc -> (match stmt with | Load (x, f) | Store (f, x) -> [ calc_ident_locs x; calc_ident_locs f ] - | RemoteLoad (x, adr, f) -> + | RemoteLoad (x, adr, f, _mutability) -> [ calc_ident_locs x; calc_ident_locs adr; calc_ident_locs f ] | Bind (x, e) -> calc_ident_locs x :: type_info_expr e (* m[k1][k2][..] := v OR delete m[k1][k2][...] *) @@ -112,7 +112,7 @@ struct | MapGet (x, m, il, _) -> [ calc_ident_locs x; calc_ident_locs m ] @ List.map il ~f:calc_ident_locs - | RemoteMapGet (x, adr, m, il, _) -> + | RemoteMapGet (x, adr, m, _mutability, il, _) -> [ calc_ident_locs x; calc_ident_locs adr; calc_ident_locs m ] @ List.map il ~f:calc_ident_locs | MatchStmt (o, clauses) -> diff --git a/src/base/TypeUtil.ml b/src/base/TypeUtil.ml index 7574438a9..d7fe5f468 100644 --- a/src/base/TypeUtil.ml +++ b/src/base/TypeUtil.ml @@ -240,9 +240,10 @@ functor ~inst:a | PolyFun (arg, bt) -> is_wf_typ' bt (arg :: tb) | Address AnyAddr | Address CodeAddr | Address LibAddr -> pure () - | Address (ContrAddr fts) -> - foldM (IdLoc_Comp.Map.to_alist fts) ~init:() ~f:(fun _ (_, t) -> - is_wf_typ' t tb) + | Address (ContrAddr (im_fts, m_fts)) -> + let is_wf_typ'_wrapper _ (_, t) = is_wf_typ' t tb in + let%bind () = foldM (IdLoc_Comp.Map.to_alist im_fts) ~init:() ~f:is_wf_typ'_wrapper in + foldM (IdLoc_Comp.Map.to_alist m_fts) ~init:() ~f:is_wf_typ'_wrapper in is_wf_typ' t [] @@ -370,12 +371,12 @@ module TypeUtilities = struct (* Messages and Events are considered primitive types *) allow_messages_events || TUType.( - (not @@ [%equal: TUType.t] t msg_typ) - || [%equal: TUType.t] t event_typ) + (not @@ [%equal: TUType.t] t msg_typ) + || [%equal: TUType.t] t event_typ) | ADT (tname, ts) -> ( let open DataTypeDictionary in if List.mem seen_adts tname ~equal:TUIdentifier.equal then true - (* Inductive ADT - ignore this branch *) + (* Inductive ADT - ignore this branch *) else (* Check that ADT is serializable *) match lookup_name ~sloc:(get_rep tname) (get_id tname) with @@ -389,11 +390,13 @@ module TypeUtilities = struct in adt_serializable && List.for_all ts ~f:(fun t -> recurser t seen_adts seen_tvars) - ) - | Address (ContrAddr fts) when check_addresses -> + ) + | Address (ContrAddr (im_fts, m_fts)) when check_addresses -> (* If check_addresses is true, then all field types in the address type should be legal field types. No need to check for serialisability or storability, since addresses are stored and passed as ByStr20. *) - IdLoc_Comp.Map.for_all fts ~f:(fun t -> + IdLoc_Comp.Map.for_all im_fts ~f:(fun t -> + is_legal_contract_parameter_type_helper t seen_adts seen_tvars) && + IdLoc_Comp.Map.for_all m_fts ~f:(fun t -> is_legal_field_type_helper t seen_adts seen_tvars) | Address _ -> true in @@ -405,6 +408,14 @@ module TypeUtilities = struct ~allow_closures:false ~allow_polymorphism:false ~allow_unit:false ~check_addresses:true t seen_adts seen_tvars + and is_legal_contract_parameter_type_helper t seen_adts seen_tvars = + (* Like transitions parameters, except maps are allowed because a + bug was exploited before it had been fixed. Address values + should be checked for storable field types. *) + is_legal_type_helper ~allow_maps:true ~allow_messages_events:false + ~allow_closures:false ~allow_polymorphism:false ~allow_unit:false + ~check_addresses:true t seen_adts seen_tvars + let is_legal_message_field_type t = (* Maps are not allowed. Address values are considered ByStr20 when used as message field value. *) is_legal_type_helper ~allow_maps:false ~allow_messages_events:false @@ -424,12 +435,8 @@ module TypeUtilities = struct ~allow_closures:false ~allow_polymorphism:false ~allow_unit:false ~check_addresses:true t [] [] - let is_legal_contract_parameter_type t = - (* Like transitions parameters, except maps are allowed (due to an exploited bug). Address values should be checked for storable field types. *) - is_legal_type_helper ~allow_maps:true ~allow_messages_events:false - ~allow_closures:false ~allow_polymorphism:false ~allow_unit:false - ~check_addresses:true t [] [] - + let is_legal_contract_parameter_type t = is_legal_contract_parameter_type_helper t [] [] + let is_legal_field_type t = is_legal_field_type_helper t [] [] let is_legal_hash_argument_type t = @@ -471,7 +478,7 @@ module TypeUtilities = struct let rec map_depth mt = match mt with MapType (_, vt) -> 1 + map_depth vt | _ -> 0 - let address_field_type loc f t = + let address_field_type loc f t is_mutable = let preknown_field_type = if [%equal: TUName.t] (get_id f) ContractUtil.balance_label then Some ContractUtil.balance_type @@ -492,14 +499,9 @@ module TypeUtilities = struct | (Address LibAddr | Address CodeAddr | Address (ContrAddr _)) when Option.is_some preknown_field_type -> pure @@ Option.value_exn preknown_field_type - | Address (ContrAddr fts) -> ( - let loc_removed = - List.map (IdLoc_Comp.Map.to_alist fts) ~f:(fun (f, t) -> - (get_id f, t)) - in - match - List.Assoc.find loc_removed (get_id f) ~equal:[%equal: TUName.t] - with + | Address (ContrAddr (im_fts, m_fts)) -> ( + let fts = if is_mutable then m_fts else im_fts in + match IdLoc_Comp.Map.find fts (mk_id (get_id f) dummy_loc) with | Some ft -> pure ft | None -> not_declared ()) | _ -> diff --git a/src/base/TypeUtil.mli b/src/base/TypeUtil.mli index 27a711a61..d3aa5d892 100644 --- a/src/base/TypeUtil.mli +++ b/src/base/TypeUtil.mli @@ -150,7 +150,7 @@ module TypeUtilities : sig val map_depth : TUType.t -> int val address_field_type : - loc -> 'a TUIdentifier.t -> TUType.t -> (TUType.t, scilla_error list) result + loc -> 'a TUIdentifier.t -> TUType.t -> bool -> (TUType.t, scilla_error list) result (****************************************************************) (* Utility function for matching types *) diff --git a/src/eval/Disambiguator.ml b/src/eval/Disambiguator.ml index f14242069..12835f47d 100644 --- a/src/eval/Disambiguator.ml +++ b/src/eval/Disambiguator.ml @@ -822,6 +822,7 @@ module InputStateService = struct let q = { name = InputIdentifier.as_string fname; + is_mutable = true; mapdepth = TypeUtil.TypeUtilities.map_depth tp; indices = []; (* indices are not needed, as we are only fetching entire states *) @@ -926,7 +927,8 @@ let run_with_args args = if String.is_empty args.ipc_address then (* Use the provided state json. *) (* We control the state files, so we can assume the type info is correct *) - parse_json args.input_state this_address + parse_json args.input_state this_address |> + List.map ~f:(fun (n, t, v) -> (n, t, v)) else (* Use IPC *) (* Fetch state from IPC server *) @@ -1027,7 +1029,7 @@ let run_with_args args = (* state_to_json maps name * literal to a vname * type * value json, which is the format for both init and state jsons *) ( JSON.ContractState.state_to_json init, - JSON.ContractState.state_to_json state ) + JSON.ContractState.state_to_json state) let output_to_string = Yojson.Basic.pretty_to_string diff --git a/src/eval/Eval.ml b/src/eval/Eval.ml index 3fffd86b7..564f242a6 100644 --- a/src/eval/Eval.ml +++ b/src/eval/Eval.ml @@ -372,11 +372,11 @@ let rec stmt_eval conf stmts = let%bind l = Configuration.load conf r in let conf' = Configuration.bind conf (get_id x) l in stmt_eval conf' sts - | RemoteLoad (x, adr, r) -> ( + | RemoteLoad (x, adr, r, mutability) -> ( let%bind a = fromR @@ Configuration.lookup conf adr in match a with | ByStrX s' when Bystrx.width s' = Type.address_length -> - let%bind l = Configuration.remote_load conf s' r in + let%bind l = Configuration.remote_load conf s' r (is_mutable mutability) in let conf' = Configuration.bind conf (get_id x) l in stmt_eval conf' sts | _ -> @@ -410,7 +410,7 @@ let rec stmt_eval conf stmts = let%bind l = Configuration.map_get conf m klist' fetchval in let conf' = Configuration.bind conf (get_id x) l in stmt_eval conf' sts - | RemoteMapGet (x, adr, m, klist, fetchval) -> ( + | RemoteMapGet (x, adr, m, mutability, klist, fetchval) -> ( let%bind a = fromR @@ Configuration.lookup conf adr in match a with | ByStrX abystr when Bystrx.width abystr = Type.address_length -> @@ -418,7 +418,7 @@ let rec stmt_eval conf stmts = mapM ~f:(fun k -> fromR @@ Configuration.lookup conf k) klist in let%bind l = - Configuration.remote_map_get abystr m klist' fetchval + Configuration.remote_map_get abystr m (is_mutable mutability) klist' fetchval in let conf' = Configuration.bind conf (get_id x) l in stmt_eval conf' sts diff --git a/src/eval/EvalUtil.ml b/src/eval/EvalUtil.ml index 808562f67..417f32347 100644 --- a/src/eval/EvalUtil.ml +++ b/src/eval/EvalUtil.ml @@ -193,10 +193,10 @@ module Configuration = struct ~inst:(EvalName.as_error_string i) (ER.get_loc (get_rep k)) - let remote_load st caddr k = + let remote_load st caddr k is_mutable = let%bind fval = fromR - @@ StateService.external_fetch ~caddr ~fname:k ~keys:[] ~ignoreval:false + @@ StateService.external_fetch ~caddr ~fname:k ~is_mutable ~keys:[] ~ignoreval:false in match fval with | Some v, _ -> @@ -229,10 +229,10 @@ module Configuration = struct ~inst:(EvalName.as_error_string (get_id k)) (ER.get_loc (get_rep k)) - let remote_field_type caddr k = + let remote_field_type caddr k is_mutable = let%bind fval = fromR - @@ StateService.external_fetch ~caddr ~fname:k ~keys:[] ~ignoreval:true + @@ StateService.external_fetch ~caddr ~fname:k ~is_mutable ~keys:[] ~ignoreval:true in match fval with | _, Some ty -> pure ty @@ -272,23 +272,23 @@ module Configuration = struct (ER.get_loc (get_rep m)) else let%bind is_member = - fromR @@ StateService.is_member ~fname:m ~keys:klist + fromR @@ StateService.is_member ~fname:m ~is_mutable:true ~keys:klist in pure @@ EvalLiteral.build_bool_lit is_member - let remote_map_get caddr m keys fetchval = + let remote_map_get caddr m is_mutable keys fetchval = let open EvalLiteral in if fetchval then (* We need to fetch the type in advance because the type-option returned * by the actual call may be None if the key(s) wasn't found, * (but the map map field itself still exists). *) - let%bind mt = remote_field_type caddr m in + let%bind mt = remote_field_type caddr m is_mutable in let%bind vt = fromR @@ EvalTypeUtilities.map_access_type mt (List.length keys) in let%bind vopt, _ = fromR - @@ StateService.external_fetch ~caddr ~fname:m ~keys ~ignoreval:false + @@ StateService.external_fetch ~caddr ~fname:m ~is_mutable ~keys ~ignoreval:false in (* Need to wrap the result in a Scilla Option. *) match vopt with @@ -297,7 +297,7 @@ module Configuration = struct else let%bind _, topt = fromR - @@ StateService.external_fetch ~caddr ~fname:m ~keys ~ignoreval:true + @@ StateService.external_fetch ~caddr ~fname:m ~is_mutable ~keys ~ignoreval:true in pure @@ EvalLiteral.build_bool_lit (Option.is_some topt) @@ -399,7 +399,7 @@ module Configuration = struct (* Check that sender balance is sufficient *) let%bind sender_addr = lookup_sender_addr st in let%bind sender_balance_l = - remote_load st sender_addr (mk_loc_id balance_label) + remote_load st sender_addr (mk_loc_id balance_label) true in let incoming' = st.incoming_funds in match sender_balance_l with @@ -568,7 +568,7 @@ module EvalTypecheck = struct let is_contract_addr ~caddr = let this_id = EvalIdentifier.mk_loc_id this_address_label in let%bind _, this_typ_opt = - StateService.external_fetch ~caddr ~fname:this_id ~keys:[] ~ignoreval:true + StateService.external_fetch ~caddr ~fname:this_id ~is_mutable:true ~keys:[] ~ignoreval:true in pure @@ Option.is_some this_typ_opt @@ -576,7 +576,7 @@ module EvalTypecheck = struct let is_library_or_contract_addr ~caddr = let this_id = EvalIdentifier.mk_loc_id codehash_label in let%bind _, this_typ_opt = - StateService.external_fetch ~caddr ~fname:this_id ~keys:[] ~ignoreval:true + StateService.external_fetch ~caddr ~fname:this_id ~is_mutable:true ~keys:[] ~ignoreval:true in pure @@ Option.is_some this_typ_opt @@ -591,11 +591,11 @@ module EvalTypecheck = struct let balance_id = EvalIdentifier.mk_loc_id balance_label in let nonce_id = EvalIdentifier.mk_loc_id nonce_label in let%bind balance_lit, _ = - StateService.external_fetch ~caddr ~fname:balance_id ~keys:[] + StateService.external_fetch ~caddr ~fname:balance_id ~is_mutable:true ~keys:[] ~ignoreval:false in let%bind nonce_lit, _ = - StateService.external_fetch ~caddr ~fname:nonce_id ~keys:[] + StateService.external_fetch ~caddr ~fname:nonce_id ~is_mutable:true ~keys:[] ~ignoreval:false in match (balance_lit, nonce_lit) with @@ -613,16 +613,21 @@ module EvalTypecheck = struct pure contract_addr else pure true - let typecheck_remote_fields ~caddr fts = + let typecheck_remote_fields ~caddr im_fts m_fts = (* Check that all fields are defined at caddr, and that their types are assignable to what is expected *) - allM fts ~f:(fun (f, t) -> - let%bind res = - StateService.external_fetch ~caddr ~fname:f ~keys:[] ~ignoreval:true - in - match res with - | _, Some ext_typ -> - pure @@ EvalType.type_assignable ~expected:t ~actual:ext_typ - | _, None -> pure false) + let checker fts mutables = + allM fts ~f:(fun (f, t) -> + let%bind res = + StateService.external_fetch ~caddr ~fname:f ~is_mutable:mutables ~keys:[] ~ignoreval:true + in + match res with + | _, Some ext_typ -> + pure @@ EvalType.type_assignable ~expected:t ~actual:ext_typ + | _, None -> pure false) + in + let%bind im_ok = checker im_fts false in + let%bind m_ok = checker m_fts true in + pure (im_ok && m_ok) type evalTCResult = | AddressNotInUse @@ -642,14 +647,15 @@ module EvalTypecheck = struct | CodeAddr -> let%bind in_use = is_library_or_contract_addr ~caddr in if not in_use then pure NeitherCodeAtAddress else pure Success - | ContrAddr fts -> + | ContrAddr (im_fts, m_fts) -> (* True if the address contains a contract with the appropriate fields, false otherwise *) let%bind contract_addr = is_contract_addr ~caddr in if not contract_addr then pure NoContractAtAddress else let%bind fts_ok = typecheck_remote_fields ~caddr - (EvalType.IdLoc_Comp.Map.to_alist fts) + (EvalType.IdLoc_Comp.Map.to_alist im_fts) + (EvalType.IdLoc_Comp.Map.to_alist m_fts) in if not fts_ok then pure FieldTypeMismatch else pure Success diff --git a/src/eval/Ipcmessage.proto b/src/eval/Ipcmessage.proto index 9f74be6ed..1bf0785c0 100644 --- a/src/eval/Ipcmessage.proto +++ b/src/eval/Ipcmessage.proto @@ -31,7 +31,8 @@ message ProtoScillaVal { message ProtoScillaQuery { string name = 1; - uint32 mapdepth = 2 [(ocaml_type) = int_t]; - repeated bytes indices = 3; - bool ignoreval = 4; + bool is_mutable = 2; + uint32 mapdepth = 3 [(ocaml_type) = int_t]; + repeated bytes indices = 4; + bool ignoreval = 5; } \ No newline at end of file diff --git a/src/eval/Ipcmessage_pb.ml b/src/eval/Ipcmessage_pb.ml index 13a0a6afb..e485943c3 100644 --- a/src/eval/Ipcmessage_pb.ml +++ b/src/eval/Ipcmessage_pb.ml @@ -28,13 +28,14 @@ let default_proto_scilla_val_map_mutable () : proto_scilla_val_map_mutable = type proto_scilla_query_mutable = { mutable name : string; + mutable is_mutable : bool; mutable mapdepth : int; mutable indices : bytes list; mutable ignoreval : bool; } let default_proto_scilla_query_mutable () : proto_scilla_query_mutable = - { name = ""; mapdepth = 0; indices = []; ignoreval = false } + { name = ""; is_mutable = true; mapdepth = 0; indices = []; ignoreval = false } let rec decode_proto_scilla_val_map d = let v = default_proto_scilla_val_map_mutable () in @@ -85,22 +86,27 @@ let rec decode_proto_scilla_query d = | Some (1, pk) -> Pbrt.Decoder.unexpected_payload "Message(proto_scilla_query), field(1)" pk - | Some (2, Pbrt.Varint) -> v.mapdepth <- Pbrt.Decoder.int_as_varint d - | Some (2, pk) -> + | Some (2, Pbrt.Bits32) -> v.is_mutable <- Pbrt.Decoder.bool d + | Some (2, pk) -> Pbrt.Decoder.unexpected_payload "Message(proto_scilla_query), field(2)" pk - | Some (3, Pbrt.Bytes) -> v.indices <- Pbrt.Decoder.bytes d :: v.indices + | Some (3, Pbrt.Varint) -> v.mapdepth <- Pbrt.Decoder.int_as_varint d | Some (3, pk) -> Pbrt.Decoder.unexpected_payload "Message(proto_scilla_query), field(3)" pk - | Some (4, Pbrt.Varint) -> v.ignoreval <- Pbrt.Decoder.bool d + | Some (4, Pbrt.Bytes) -> v.indices <- Pbrt.Decoder.bytes d :: v.indices | Some (4, pk) -> Pbrt.Decoder.unexpected_payload "Message(proto_scilla_query), field(4)" pk + | Some (5, Pbrt.Varint) -> v.ignoreval <- Pbrt.Decoder.bool d + | Some (5, pk) -> + Pbrt.Decoder.unexpected_payload "Message(proto_scilla_query), field(5)" + pk | Some (_, payload_kind) -> Pbrt.Decoder.skip d payload_kind done; ({ Ipcmessage_types.name = v.name; + Ipcmessage_types.is_mutable = v.is_mutable; Ipcmessage_types.mapdepth = v.mapdepth; Ipcmessage_types.indices = v.indices; Ipcmessage_types.ignoreval = v.ignoreval; @@ -131,11 +137,13 @@ let rec encode_proto_scilla_query (v : Ipcmessage_types.proto_scilla_query) encoder = Pbrt.Encoder.key (1, Pbrt.Bytes) encoder; Pbrt.Encoder.string v.Ipcmessage_types.name encoder; - Pbrt.Encoder.key (2, Pbrt.Varint) encoder; + Pbrt.Encoder.key (2, Pbrt.Bits32) encoder; + Pbrt.Encoder.bool v.Ipcmessage_types.is_mutable encoder; + Pbrt.Encoder.key (3, Pbrt.Varint) encoder; Pbrt.Encoder.int_as_varint v.Ipcmessage_types.mapdepth encoder; List.iter v.Ipcmessage_types.indices ~f:(fun x -> - Pbrt.Encoder.key (3, Pbrt.Bytes) encoder; + Pbrt.Encoder.key (4, Pbrt.Bytes) encoder; Pbrt.Encoder.bytes x encoder); - Pbrt.Encoder.key (4, Pbrt.Varint) encoder; + Pbrt.Encoder.key (5, Pbrt.Varint) encoder; Pbrt.Encoder.bool v.Ipcmessage_types.ignoreval encoder; () diff --git a/src/eval/Ipcmessage_types.ml b/src/eval/Ipcmessage_types.ml index 1f1046ea2..31644bfb5 100644 --- a/src/eval/Ipcmessage_types.ml +++ b/src/eval/Ipcmessage_types.ml @@ -24,6 +24,7 @@ and proto_scilla_val = Bval of bytes | Mval of proto_scilla_val_map type proto_scilla_query = { name : string; + is_mutable : bool; mapdepth : int; indices : bytes list; ignoreval : bool; @@ -35,7 +36,11 @@ let rec default_proto_scilla_val_map and default_proto_scilla_val () : proto_scilla_val = Bval (Bytes.create 0) -let rec default_proto_scilla_query ?(name : string = "") ?(mapdepth : int = 0) - ?(indices : bytes list = []) ?(ignoreval : bool = false) () : +let rec default_proto_scilla_query + ?(name : string = "") + ?(is_mutable : bool = true) + ?(mapdepth : int = 0) + ?(indices : bytes list = []) + ?(ignoreval : bool = false) () : proto_scilla_query = - { name; mapdepth; indices; ignoreval } + { name; is_mutable; mapdepth; indices; ignoreval } diff --git a/src/eval/Ipcmessage_types.mli b/src/eval/Ipcmessage_types.mli index beb42198c..d745d1b2c 100644 --- a/src/eval/Ipcmessage_types.mli +++ b/src/eval/Ipcmessage_types.mli @@ -24,6 +24,7 @@ and proto_scilla_val = Bval of bytes | Mval of proto_scilla_val_map type proto_scilla_query = { name : string; + is_mutable : bool; mapdepth : int; indices : bytes list; ignoreval : bool; @@ -40,6 +41,7 @@ val default_proto_scilla_val : unit -> proto_scilla_val val default_proto_scilla_query : ?name:string -> + ?is_mutable:bool -> ?mapdepth:int -> ?indices:bytes list -> ?ignoreval:bool -> diff --git a/src/eval/Runner.ml b/src/eval/Runner.ml index f7c22ed2f..057dbbef6 100644 --- a/src/eval/Runner.ml +++ b/src/eval/Runner.ml @@ -108,20 +108,21 @@ let check_after_step res gas_limit = ^ sprintf "Emitted events:\n%s\n\n" (pp_literal_list events)); ((cstate, outs, events, accepted_b), remaining_gas) -let map_json_input_strings_to_names map = - List.map map ~f:(fun (x, t, l) -> - match String.split x ~on:'.' with - | [ simple_name ] -> (RunnerName.parse_simple_name simple_name, t, l) - | _ -> raise (mk_invalid_json ~kind:"invalid name in json input" ~inst:x)) - +let map_input_string_to_name x = + match String.split x ~on:'.' with + | [ simple_name ] -> RunnerName.parse_simple_name simple_name + | _ -> raise (mk_invalid_json ~kind:"invalid name in json input" ~inst:x) + (* Parse the input state json and extract out _balance separately *) let input_state_json filename = let open JSON.ContractState in let states_str, estates_str = get_json_data filename in - let states = map_json_input_strings_to_names states_str in + let states = + List.map states_str ~f:(fun (x, t, l) -> (map_input_string_to_name x, t, l)) + in let estates = List.map estates_str ~f:(fun (addr, states_str) -> - (addr, map_json_input_strings_to_names states_str)) + (addr, List.map states_str ~f:(fun (x, m, t, l) -> (map_input_string_to_name x, m, t, l)))) in let bal_lit = match @@ -236,7 +237,7 @@ let validate_get_init_json init_file gas_remaining source_ver = in (* Read init.json, and strip types. Types in init files must be ignored due to backward compatibility *) let initargs = - map_json_input_strings_to_names initargs_str + List.map initargs_str ~f:(fun (x, t, l) -> (map_input_string_to_name x, t, l)) |> List.map ~f:(fun (n, t, l) -> let () = assert_no_address_type_in_type t gas_remaining in let () = assert_no_address_type_in_literal l gas_remaining in @@ -659,11 +660,13 @@ let run_with_args args = let ext_states = let open StateService in List.map ext_states ~f:(fun (addr, fields) -> - let fields' = - List.map fields ~f:(fun (n, t, l) -> - { fname = n; ftyp = t; fval = Some l }) + let cparams', fields' = + List.partition_map fields ~f:(fun (n, m, t, l) -> + if is_mutable m then + Second { fname = n; ftyp = t; fval = Some l } + else First { fname = n; ftyp = t; fval = Some l }) in - { caddr = addr; cstate = fields' }) + { caddr = addr; cparams = cparams'; cstate = fields' }) in let () = StateService.initialize ~sm:Local ~fields ~ext_states diff --git a/src/eval/StateIPCClient.ml b/src/eval/StateIPCClient.ml index 25802bbb5..525fc8926 100644 --- a/src/eval/StateIPCClient.ml +++ b/src/eval/StateIPCClient.ml @@ -160,6 +160,7 @@ let fetch ~socket_addr ~fname ~keys ~tp = let q = { name = IPCCIdentifier.as_string fname; + is_mutable = true; mapdepth = TypeUtilities.map_depth tp; indices = List.map keys ~f:serialize_literal; ignoreval = false; @@ -194,11 +195,12 @@ let fetch ~socket_addr ~fname ~keys ~tp = * if ~ignoreval is false: (Some val, Some type) is returned * Else: (None, None) is returned *) -let external_fetch ~socket_addr ~caddr ~fname ~keys ~ignoreval = +let external_fetch ~socket_addr ~caddr ~fname ~is_mutable ~keys ~ignoreval = let open Ipcmessage_types in let q = { name = IPCCIdentifier.as_string fname; + is_mutable; (* We don't have the type information (and hence map depth) for remote state reads. The blockchain does. It'll take care of it. *) @@ -237,6 +239,7 @@ let update ~socket_addr ~fname ~keys ~value ~tp = let q = { name = IPCCIdentifier.as_string fname; + is_mutable = true; mapdepth = TypeUtilities.map_depth tp; indices = List.map keys ~f:serialize_literal; ignoreval = false; @@ -254,11 +257,12 @@ let update ~socket_addr ~fname ~keys ~value ~tp = pure () (* Is a key in a map. keys must be non-empty. *) -let is_member ~socket_addr ~fname ~keys ~tp = +let is_member ~socket_addr ~fname ~is_mutable ~keys ~tp = let open Ipcmessage_types in let q = { name = IPCCIdentifier.as_string fname; + is_mutable; mapdepth = TypeUtilities.map_depth tp; indices = List.map keys ~f:serialize_literal; ignoreval = true; @@ -279,6 +283,7 @@ let remove ~socket_addr ~fname ~keys ~tp = let q = { name = IPCCIdentifier.as_string fname; + is_mutable = true; mapdepth = TypeUtilities.map_depth tp; indices = List.map keys ~f:serialize_literal; ignoreval = true; diff --git a/src/eval/StateIPCClient.mli b/src/eval/StateIPCClient.mli index a208f2069..18cde50cb 100644 --- a/src/eval/StateIPCClient.mli +++ b/src/eval/StateIPCClient.mli @@ -39,6 +39,7 @@ val external_fetch : socket_addr:string -> caddr:string -> fname:'a IPCCIdentifier.t -> + is_mutable: bool -> keys:IPCCLiteral.t list -> ignoreval:bool -> (IPCCLiteral.t option * IPCCType.t option, scilla_error list) result @@ -56,6 +57,7 @@ val update : val is_member : socket_addr:string -> fname:loc IPCCIdentifier.t -> + is_mutable:bool -> keys:IPCCLiteral.t list -> tp:IPCCType.t -> (bool, scilla_error list) result diff --git a/src/eval/StateService.ml b/src/eval/StateService.ml index b1bd3814f..ada0cd5bb 100644 --- a/src/eval/StateService.ml +++ b/src/eval/StateService.ml @@ -42,7 +42,7 @@ type ss_field = { (* The blockchain info is a map from (query_name, query_args) to some info. *) type bcinfo_state = (string, (string, string) Caml.Hashtbl.t) Caml.Hashtbl.t -type external_state = { caddr : SSLiteral.Bystrx.t; cstate : ss_field list } +type external_state = { caddr : SSLiteral.Bystrx.t; cparams: ss_field list; cstate : ss_field list } type service_mode = | IPC of string @@ -69,7 +69,7 @@ module MakeStateService () = struct | Uninitialized -> fail0 ~kind:"StateService: Uninitialized" ?inst:None | SS (sm, fields, estates, bcinfo) -> pure (sm, fields, estates, bcinfo) - let field_type fields fname = + let field_type fields fname is_mutable = match List.find fields ~f:(fun z -> [%equal: SSName.t] z.fname (get_id fname)) with @@ -77,12 +77,13 @@ module MakeStateService () = struct | None -> fail1 ~kind: - (sprintf "StateService: Unable to determine the type of field %s." + (sprintf "StateService: Unable to determine the type of %s %s." + (if is_mutable then "field" else "contract parameter") (as_error_string fname)) ?inst:None (ER.get_loc (get_rep fname)) - let fetch_local ~fname ~keys fields = + let fetch_local ~fname ~is_mutable ~keys fields = let s = fields in match List.find s ~f:(fun z -> [%equal: SSName.t] z.fname (get_id fname)) @@ -143,7 +144,8 @@ module MakeStateService () = struct | _ -> fail1 ~kind: - (sprintf "StateService: field \"%s\" not found.\n" + (sprintf "StateService: %s \"%s\" not found.\n" + (if is_mutable then "field" else "contract parameter") (as_error_string fname)) ?inst:None (ER.get_loc (get_rep fname)) @@ -152,7 +154,7 @@ module MakeStateService () = struct let%bind sm, fields, _estates, _bcinfo = assert_init () in match sm with | IPC socket_addr -> ( - let%bind tp = field_type fields fname in + let%bind tp = field_type fields fname true in let%bind res = StateIPCClient.fetch ~socket_addr ~fname ~keys ~tp in if not @@ List.is_empty keys then pure @@ res else @@ -165,7 +167,7 @@ module MakeStateService () = struct ?inst:None (ER.get_loc (get_rep fname)) | Some _res' -> pure @@ res) - | Local -> fetch_local ~fname ~keys fields + | Local -> fetch_local ~fname ~is_mutable:true ~keys fields let fetch_bcinfo ~query_name ~query_args = let%bind sm, _fields, _estates, bcinfo = assert_init () in @@ -189,34 +191,34 @@ module MakeStateService () = struct ?inst:None) (* Common function for external state lookup. - * If the caddr+fname+keys combination exists: + * If the caddr+fname+mutable_field+keys combination exists: * If ~ignoreval is true: (None, Some type) is returned * if ~ignoreval is false: (Some val, Some type) is returned * Else: (None, None) is returned *) - let external_fetch ~caddr ~fname ~keys ~ignoreval = + let external_fetch ~caddr ~fname ~is_mutable ~keys ~ignoreval = let%bind sm, _fields, estates, _bcinfo = assert_init () in let caddr_hex = SSLiteral.Bystrx.hex_encoding caddr in match sm with | IPC socket_addr -> - StateIPCClient.external_fetch ~socket_addr ~caddr:caddr_hex ~fname ~keys + StateIPCClient.external_fetch ~socket_addr ~caddr:caddr_hex ~fname ~is_mutable ~keys ~ignoreval | Local -> ( match List.find_map estates ~f:(fun estate -> if SSLiteral.Bystrx.equal caddr estate.caddr then - Some estate.cstate + if is_mutable then Some estate.cstate else Some estate.cparams else None) with - | Some fields -> ( + | Some cparams_or_fields -> ( match - List.find_map fields ~f:(fun field -> + List.find_map cparams_or_fields ~f:(fun field -> if SSName.equal field.fname (get_id fname) then Some field.ftyp else None) with | Some stored_tp -> - let%bind res = fetch_local ~fname ~keys fields in + let%bind res = fetch_local ~fname ~is_mutable ~keys cparams_or_fields in pure (res, Option.map res ~f:(fun _ -> stored_tp)) | None -> pure (None, None)) | None -> pure (None, None)) @@ -317,7 +319,7 @@ module MakeStateService () = struct let%bind sm, fields, estates, bcinfo = assert_init () in match sm with | IPC socket_addr -> - let%bind tp = field_type fields fname in + let%bind tp = field_type fields fname true in StateIPCClient.update ~socket_addr ~fname ~keys ~value ~tp | Local -> let%bind fields' = update_local ~fname ~keys (Some value) fields in @@ -325,15 +327,15 @@ module MakeStateService () = struct pure () (* Is a key in a map. keys must be non-empty. *) - let is_member ~fname ~keys = + let is_member ~fname ~is_mutable ~keys = let%bind sm, fields, _estates, _bcinfo = assert_init () in match sm with | IPC socket_addr -> - let%bind tp = field_type fields fname in - let%bind res = StateIPCClient.is_member ~socket_addr ~fname ~keys ~tp in + let%bind tp = field_type fields fname is_mutable in + let%bind res = StateIPCClient.is_member ~socket_addr ~fname ~is_mutable ~keys ~tp in pure @@ res | Local -> - let%bind v = fetch_local ~fname ~keys fields in + let%bind v = fetch_local ~fname ~is_mutable ~keys fields in pure @@ Option.is_some v (* Remove a key from a map. keys must be non-empty. *) @@ -341,7 +343,7 @@ module MakeStateService () = struct let%bind sm, fields, _estates, _bcinfo = assert_init () in match sm with | IPC socket_addr -> - let%bind tp = field_type fields fname in + let%bind tp = field_type fields fname true in StateIPCClient.remove ~socket_addr ~fname ~keys ~tp | Local -> let%bind _ = update_local ~fname ~keys None fields in diff --git a/src/formatter/ExtendedSyntax.ml b/src/formatter/ExtendedSyntax.ml index ee9a4b104..ea9897365 100644 --- a/src/formatter/ExtendedSyntax.ml +++ b/src/formatter/ExtendedSyntax.ml @@ -88,7 +88,7 @@ struct and stmt = | Load of ER.rep id_ann * ER.rep id_ann - | RemoteLoad of ER.rep id_ann * ER.rep id_ann * ER.rep id_ann + | RemoteLoad of ER.rep id_ann * ER.rep id_ann * ER.rep id_ann * Syntax.field_mutability | Store of ER.rep id_ann * ER.rep id_ann | Bind of ER.rep id_ann * expr_annot | MapUpdate of ER.rep id_ann * ER.rep id_ann list * ER.rep id_ann option @@ -97,6 +97,7 @@ struct ER.rep id_ann * ER.rep id_ann * ER.rep id_ann + * Syntax.field_mutability * ER.rep id_ann list * bool | MatchStmt of @@ -569,7 +570,7 @@ struct let lhs' = extend_er_id tr lhs in let rhs' = extend_er_id tr rhs in (ExtSyn.Load (lhs', rhs'), ann, c) - | Syn.RemoteLoad (lhs, addr, rhs) -> + | Syn.RemoteLoad (lhs, addr, rhs, mutability) -> let c = comment (loc_end_er lhs) in let lhs' = extend_er_id tr lhs ~rep_end:(Some (SIdentifier.get_rep addr)) @@ -578,7 +579,7 @@ struct extend_er_id tr addr ~rep_end:(Some (SIdentifier.get_rep rhs)) in let rhs' = extend_er_id tr rhs in - (ExtSyn.RemoteLoad (lhs', addr', rhs'), ann, c) + (ExtSyn.RemoteLoad (lhs', addr', rhs', mutability), ann, c) | Syn.Store (lhs, rhs) -> let c = comment (loc_end_er lhs) in let lhs' = extend_er_id tr lhs in @@ -604,13 +605,13 @@ struct let m' = extend_er_id tr m in let keys' = List.map keys ~f:(fun k -> extend_er_id tr k) in (ExtSyn.MapGet (v', m', keys', retrieve), ann, c) - | Syn.RemoteMapGet (v, addr, m, keys, retrieve) -> + | Syn.RemoteMapGet (v, addr, m, mutability, keys, retrieve) -> let c = comment (loc_end_er v) in let v' = extend_er_id tr v in let addr' = extend_er_id tr addr in let m' = extend_er_id tr m in let keys' = List.map keys ~f:(fun k -> extend_er_id tr k) in - (ExtSyn.RemoteMapGet (v', addr', m', keys', retrieve), ann, c) + (ExtSyn.RemoteMapGet (v', addr', m', mutability, keys', retrieve), ann, c) | Syn.MatchStmt (id, arms) -> let c = comment (loc_end_er id) in let id' = extend_er_id tr id in diff --git a/src/formatter/Formatter.ml b/src/formatter/Formatter.ml index 178beb84e..ce6eaa8cc 100644 --- a/src/formatter/Formatter.ml +++ b/src/formatter/Formatter.ml @@ -66,6 +66,8 @@ struct let field_kwd = !^"field" let of_kwd = !^"of" let type_kwd = !^"type" + let address_type_kwd = !^"ByStr20 with" + let codehash_kwd = !^"_codehash" let import_kwd = !^"import" let library_kwd = !^"library" let scilla_version_kwd = !^"scilla_version" @@ -164,26 +166,38 @@ struct parens_if (p > 0) @@ match kind with (* Any address in use *) - | AnyAddr -> !^"ByStr20 with end" + | AnyAddr -> address_type_kwd ^//^ end_kwd (* Address containing a library *) - | LibAddr -> !^"ByStr20 with library end" + | LibAddr -> address_type_kwd ^//^ library_kwd ^//^ end_kwd (* Address containing a library or contract *) - | CodeAddr -> !^"ByStr20 with _codehash end" + | CodeAddr -> address_type_kwd ^//^ codehash_kwd ^//^ end_kwd (* Address containing a contract *) - | ContrAddr fields_map -> - let alist = Ast.SType.IdLoc_Comp.Map.to_alist fields_map in - let contract_fields = - separate_map - (comma ^^ break 1) - (fun (f, ty) -> group (field_kwd ^/^ of_id f ^/^ colon ^/^ of_type ty)) - alist - in - if List.is_empty alist then !^"ByStr20 with contract end" - else - surround indentation 1 - !^"ByStr20 with contract" - contract_fields - end_kwd + | ContrAddr (im_fields_map, m_fields_map) -> + let im_fields = + separate_map + (comma ^^ break 1) + (fun (f, ty) -> group (of_id f ^/^ colon ^/^ of_type ty)) + (Ast.SType.IdLoc_Comp.Map.to_alist im_fields_map) + in + let m_fields = + separate_map + (comma ^^ break 1) + (fun (f, ty) -> group (field_kwd ^/^ of_id f ^/^ colon ^/^ of_type ty)) + (Ast.SType.IdLoc_Comp.Map.to_alist m_fields_map) + in + match Ast.SType.IdLoc_Comp.Map.is_empty im_fields_map, Ast.SType.IdLoc_Comp.Map.is_empty m_fields_map with + | true, true -> address_type_kwd ^//^ contract_kwd ^//^ end_kwd + | false, true -> address_type_kwd ^//^ contract_kwd ^//^ (parens im_fields) ^//^ end_kwd + | true, false -> + surround indentation 1 + (address_type_kwd ^//^ contract_kwd) + m_fields + end_kwd + | false, false -> + surround indentation 1 + (address_type_kwd ^//^ contract_kwd ^//^ (parens im_fields)) + m_fields + end_kwd (* whitespace-separated non-primitive types need to be parenthesized *) let of_types typs ~sep = @@ -360,8 +374,8 @@ struct | GasExpr _ -> failwith "Gas annotations cannot appear in user contracts's expressions" ) |> wrap_comments comments - let of_map_access map keys = - let map = of_ann_id map + let of_map_access map mutable_remote_field keys = + let map = if mutable_remote_field then of_ann_id map else lparen ^^ of_ann_id map ^^ rparen and keys = concat_map (fun k -> brackets @@ of_ann_id k) keys in map ^^ keys @@ -369,8 +383,11 @@ struct (match stmt with | Ast.Load (id, field) -> of_ann_id id ^^^ rev_arrow ^//^ of_ann_id field - | Ast.RemoteLoad (id, addr, field) -> - of_ann_id id ^^^ blockchain_arrow ^//^ of_ann_id addr ^^ dot ^^ of_ann_id field + | Ast.RemoteLoad (id, addr, field, mutability) -> + if Syntax.is_mutable mutability then + of_ann_id id ^^^ blockchain_arrow ^//^ of_ann_id addr ^^ dot ^^ of_ann_id field + else + of_ann_id id ^^^ blockchain_arrow ^//^ of_ann_id addr ^^ dot ^^ lparen ^^ of_ann_id field ^^ rparen | Ast.Store (field, id) -> of_ann_id field ^^^ assign ^//^ of_ann_id id | Ast.Bind (id, expr) -> @@ -378,24 +395,25 @@ struct | Ast.MapUpdate (map, keys, mode) -> (* m[k1][k2][..] := v OR delete m[k1][k2][...] *) (match mode with - | Some value -> of_map_access map keys ^^^ assign ^//^ of_ann_id value - | None -> delete_kwd ^^^ of_map_access map keys) + | Some value -> of_map_access map true keys ^^^ assign ^//^ of_ann_id value + | None -> delete_kwd ^^^ of_map_access map true keys) | Ast.MapGet (id, map, keys, mode) -> (* v <- m[k1][k2][...] OR b <- exists m[k1][k2][...] *) (* If the bool is set, then we interpret this as value retrieve, otherwise as an "exists" query. *) if mode then - of_ann_id id ^^^ rev_arrow ^//^ of_map_access map keys - else - of_ann_id id ^^^ rev_arrow ^//^ exists_kwd ^^^ of_map_access map keys - | Ast.RemoteMapGet (id, addr, map, keys, mode) -> - (* v <-& adr.m[k1][k2][...] OR b <-& exists adr.m[k1][k2][...] *) - (* If the bool is set, then we interpret this as value retrieve, - otherwise as an "exists" query. *) - if mode then - of_ann_id id ^^^ blockchain_arrow ^//^ of_ann_id addr ^^ dot ^^ of_map_access map keys + of_ann_id id ^^^ rev_arrow ^//^ of_map_access map true keys else - of_ann_id id ^^^ blockchain_arrow ^//^ exists_kwd ^^^ of_ann_id addr ^^ dot ^^ of_map_access map keys + of_ann_id id ^^^ rev_arrow ^//^ exists_kwd ^^^ of_map_access map true keys + | Ast.RemoteMapGet (id, addr, map, mutability, keys, mode) -> + (* v <-& adr.(m)[k1][k2][...] OR b <-& exists adr.(m)[k1][k2][...] OR + v <-& adr.m[k1][k2][...] OR b <-& exists adr.m[k1][k2][...] *) + (* If mode is set, then we interpret this as value retrieve, + otherwise as an "exists" query. *) + if mode then + of_ann_id id ^^^ blockchain_arrow ^//^ of_ann_id addr ^^ dot ^^ of_map_access map (Syntax.is_mutable mutability) keys + else + of_ann_id id ^^^ blockchain_arrow ^//^ exists_kwd ^^^ of_ann_id addr ^^ dot ^^ of_map_access map (Syntax.is_mutable mutability) keys | Ast.MatchStmt (id, branches) -> match_kwd ^^^ of_ann_id id ^^^ with_kwd ^/^ separate_map hardline diff --git a/src/merge/Merge.ml b/src/merge/Merge.ml index a7594aafc..5ba1999cb 100644 --- a/src/merge/Merge.ml +++ b/src/merge/Merge.ml @@ -447,19 +447,19 @@ module ScillaMerger (SR : Rep) (ER : Rep) = struct let m' = rename_local_er renames_map m in let keys' = List.map keys ~f:(fun k -> rename_local_er renames_map k) in (MapGet (v', m', keys', exists), annot) - | RemoteMapGet (v, adr, m, keys, exists) -> + | RemoteMapGet (v, adr, m, mutability, keys, exists) -> (* Map will be replaced to the local one in the Remote pass. *) let v' = rename_local_er renames_map v in let keys' = List.map keys ~f:(fun k -> rename_local_er renames_map k) in - (RemoteMapGet (v', adr, m, keys', exists), annot) + (RemoteMapGet (v', adr, m, mutability, keys', exists), annot) | Load (lhs, rhs) -> let lhs' = rename_local_er renames_map lhs in let rhs' = rename_local_er renames_map rhs in (Load (lhs', rhs'), annot) - | RemoteLoad (lhs, adr, rhs) -> + | RemoteLoad (lhs, adr, rhs, mutability) -> (* The Remote pass will remove address and rename [rhs]. *) let lhs' = rename_local_er renames_map lhs in - (RemoteLoad (lhs', adr, rhs), annot) + (RemoteLoad (lhs', adr, rhs, mutability), annot) | Store (lhs, rhs) -> let lhs' = rename_local_er renames_map lhs in let rhs' = rename_local_er renames_map rhs in @@ -716,12 +716,32 @@ module ScillaMerger (SR : Rep) (ER : Rep) = struct let rec localize_stmt renames_map (stmt, annot) = match stmt with - | RemoteLoad (l, _, v) -> + | RemoteLoad (l, _, v, mutability) -> let v' = remote_rename_er renames_map v in - (Load (l, v'), annot) - | RemoteMapGet (l, _, m, keys, exists) -> + if is_mutable mutability then + (Load (l, v'), annot) + else + (* Immutable fields exist in the same namespace as local variables *) + (Bind (l, (Var v', PIdentifier.get_rep v')), annot) + | RemoteMapGet (l, _, m, mutability, keys, exists) -> let m' = remote_rename_er renames_map m in - (MapGet (l, m', keys, exists), annot) + if is_mutable mutability then + (MapGet (l, m', keys, exists), annot) + else + (* Immutable fields exist in the same namespace as local variables. + Build a series of get operations. Wrap in let expressions to avoid name clashes. *) + let access_exp_opt = + List.fold_right keys ~init:None ~f:(fun key acc -> + let get_exp = (Builtin ((Builtin_get, PIdentifier.get_rep key), [], [m ; key]), PIdentifier.get_rep key) in + match acc with + | None -> Some get_exp + | Some exp -> Some (Let (m, None, get_exp, exp), PIdentifier.get_rep key)) + in + let access_exp = + Option.value_or_thunk access_exp_opt + ~default:(fun () -> raise (ErrorUtils.mk_internal_error ~kind:"Missing keys in remote map get" ?inst:None)) + in + (Bind (l, access_exp), annot) | MatchStmt (id, arms) -> let arms' = List.map arms ~f:(fun (pat, stmts) -> diff --git a/tests/base/parser/bad/Bad.ml b/tests/base/parser/bad/Bad.ml index b28abe917..29c7be505 100644 --- a/tests/base/parser/bad/Bad.ml +++ b/tests/base/parser/bad/Bad.ml @@ -36,6 +36,8 @@ module Tests = Scilla_test.Util.DiffBasedTests (struct [ "address_duplicate_field.scilla"; "address_spid_as_field.scilla"; + "address_type_duplicate_parameter.scilla"; + "address_type_empty_parameter.scilla"; "bad_cast_2.scilla"; "bad_cast_3.scilla"; "bad_map_key_2.scilla"; diff --git a/tests/base/parser/bad/address_type_duplicate_parameter.scilla b/tests/base/parser/bad/address_type_duplicate_parameter.scilla new file mode 100644 index 000000000..1d4cdf550 --- /dev/null +++ b/tests/base/parser/bad/address_type_duplicate_parameter.scilla @@ -0,0 +1,8 @@ +scilla_version 0 + +contract T () + + (* Duplicate parameter names not allowed in address type *) +transition F (z : ByStr20 with contract (x : Uint128, x : Uint64) end) + y <-& x._balance +end \ No newline at end of file diff --git a/tests/base/parser/bad/address_type_empty_parameter.scilla b/tests/base/parser/bad/address_type_empty_parameter.scilla new file mode 100644 index 000000000..d105d0bd1 --- /dev/null +++ b/tests/base/parser/bad/address_type_empty_parameter.scilla @@ -0,0 +1,8 @@ +scilla_version 0 + +contract T () + + (* When using () in an address type, must include at least one contract parameter *) +transition F (z : ByStr20 with contract () end) + y <-& x._balance +end \ No newline at end of file diff --git a/tests/base/parser/bad/gold/address_duplicate_field.scilla.gold b/tests/base/parser/bad/gold/address_duplicate_field.scilla.gold index 6dfa9e61d..5ae0c0638 100644 --- a/tests/base/parser/bad/gold/address_duplicate_field.scilla.gold +++ b/tests/base/parser/bad/gold/address_duplicate_field.scilla.gold @@ -4,8 +4,8 @@ "error_message": "Syntax error: Duplicate field name b in address type", "start_location": { "file": "base/parser/bad/address_duplicate_field.scilla", - "line": 8, - "column": 7 + "line": 11, + "column": 15 }, "end_location": { "file": "", "line": 0, "column": 0 } } diff --git a/tests/base/parser/bad/gold/address_type_duplicate_parameter.scilla.gold b/tests/base/parser/bad/gold/address_type_duplicate_parameter.scilla.gold new file mode 100644 index 000000000..3fc5eedd4 --- /dev/null +++ b/tests/base/parser/bad/gold/address_type_duplicate_parameter.scilla.gold @@ -0,0 +1,15 @@ +{ + "errors": [ + { + "error_message": + "Syntax error: Duplicate contract parameter name x in address type", + "start_location": { + "file": "base/parser/bad/address_type_duplicate_parameter.scilla", + "line": 6, + "column": 55 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/base/parser/bad/gold/address_type_empty_parameter.scilla.gold b/tests/base/parser/bad/gold/address_type_empty_parameter.scilla.gold new file mode 100644 index 000000000..9c88f979a --- /dev/null +++ b/tests/base/parser/bad/gold/address_type_empty_parameter.scilla.gold @@ -0,0 +1,14 @@ +{ + "errors": [ + { + "error_message": "Ends in an error in state: 29.\n", + "start_location": { + "file": "base/parser/bad/address_type_empty_parameter.scilla", + "line": 6, + "column": 43 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/checker/good/Good.ml b/tests/checker/good/Good.ml index 0954a7112..0872157af 100644 --- a/tests/checker/good/Good.ml +++ b/tests/checker/good/Good.ml @@ -70,6 +70,7 @@ module Tests = Scilla_test.Util.DiffBasedTests (struct "shadow_import.scilla"; "remote_state_reads.scilla"; "remote_state_reads_2.scilla"; + "remote_state_reads_cparam.scilla"; "address_eq_test.scilla"; "address_list_traversal.scilla"; "polymorphic_address.scilla"; diff --git a/tests/checker/good/gold/dead_code_test18.scilla.gold b/tests/checker/good/gold/dead_code_test18.scilla.gold index 3e5e60dcd..fce821f2d 100644 --- a/tests/checker/good/gold/dead_code_test18.scilla.gold +++ b/tests/checker/good/gold/dead_code_test18.scilla.gold @@ -1,6 +1,8 @@ { "cashflow_tags": { - "State variables": [], + "State variables": [ + { "field": "remote_reads_test_res_1", "tag": "NoInfo" } + ], "ADT constructors": [ { "dead_code_test18.A": [ @@ -16,11 +18,22 @@ "scilla_major_version": "0", "vname": "Dead18", "params": [], - "fields": [], + "fields": [ + { "vname": "remote_reads_test_res_1", "type": "Uint128", "depth": 0 } + ], "transitions": [ { - "vname": "test", + "vname": "test_mutables", "params": [ { "vname": "a", "type": "dead_code_test18.A" } ] + }, + { + "vname": "read_cparam_1", + "params": [ + { + "vname": "remote1", + "type": "ByStr20 with contract (unused : Uint128, used : Uint128) end" + } + ] } ], "procedures": [ @@ -118,6 +131,16 @@ ] }, "warnings": [ + { + "warning_message": "Write only field: remote_reads_test_res_1", + "start_location": { + "file": "contracts/dead_code_test18.scilla", + "line": 67, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, { "warning_message": "Unused field in contract address type: a1_unused2_3", "start_location": { @@ -148,11 +171,21 @@ "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, + { + "warning_message": "Unused contract parameter in contract address type: unused", + "start_location": { + "file": "contracts/dead_code_test18.scilla", + "line": 64, + "column": 35 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, { "warning_message": "Unused match bound: num", "start_location": { "file": "contracts/dead_code_test18.scilla", - "line": 33, + "line": 35, "column": 23 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -162,7 +195,7 @@ "warning_message": "Unused match bound: a12_unused", "start_location": { "file": "contracts/dead_code_test18.scilla", - "line": 33, + "line": 35, "column": 27 }, "end_location": { "file": "", "line": 0, "column": 0 }, diff --git a/tests/checker/good/gold/remote_state_reads_cparam.scilla.gold b/tests/checker/good/gold/remote_state_reads_cparam.scilla.gold new file mode 100644 index 000000000..9668d0946 --- /dev/null +++ b/tests/checker/good/gold/remote_state_reads_cparam.scilla.gold @@ -0,0 +1,450 @@ +{ + "cashflow_tags": { + "State variables": [ + { "field": "cparam1", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_1", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_2", "tag": "(AddressADT )" }, + { "field": "remote_reads_test_res_3_2", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_3_3", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_4_1", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_4_2", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_5_1", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_5_3", "tag": "(Option NoInfo)" }, + { "field": "remote_reads_test_res_5_5", "tag": "(Option NoInfo)" }, + { "field": "remote_reads_test_res_6_1", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_6_2", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_7_3", "tag": "(Option NotMoney)" }, + { "field": "remote_reads_test_res_7_6", "tag": "(Option NotMoney)" }, + { "field": "remote_reads_test_res_8", "tag": "NoInfo" }, + { "field": "remote_reads_test_res_9", "tag": "(Option NoInfo)" }, + { "field": "remote_reads_test_res_10", "tag": "NoInfo" }, + { "field": "address_type_erasure_test_res_1", "tag": "(Map NoInfo)" } + ], + "ADT constructors": [] + }, + "contract_info": { + "scilla_major_version": "0", + "vname": "RRCPContract", + "params": [ + { + "vname": "cparam1", + "type": "ByStr20 with contract (admin : ByStr20) end" + } + ], + "fields": [ + { "vname": "remote_reads_test_res_1", "type": "Uint128", "depth": 0 }, + { + "vname": "remote_reads_test_res_2", + "type": "remote_state_reads_cparam.AddressADT", + "depth": 0 + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "depth": 0 }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "depth": 0 }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "depth": 0 }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "depth": 0 }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "depth": 1 + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "depth": 0 + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "depth": 0 + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "depth": 0 }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "depth": 0 }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "depth": 0 + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "depth": 0 + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "depth": 0 }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "depth": 0 + }, + { "vname": "remote_reads_test_res_10", "type": "ByStr20", "depth": 0 }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "depth": 1 + } + ], + "transitions": [ + { + "vname": "RemoteReadContractParameterTest1", + "params": [ + { + "vname": "remote1", + "type": "ByStr20 with contract (x : Uint128) end" + } + ] + }, + { + "vname": "RemoteReadContractParameterTest2", + "params": [ + { + "vname": "remote2", + "type": + "ByStr20 with contract (x : remote_state_reads_cparam.AddressADT) end" + } + ] + }, + { + "vname": "RemoteReadContractParameterTest3", + "params": [ + { + "vname": "remote3", + "type": + "ByStr20 with contract (x : ByStr20 with contract (x : Uint128) field y : Uint64 end) end" + } + ] + }, + { + "vname": "RemoteReadContractParameterTest4", + "params": [ + { + "vname": "remote4", + "type": "ByStr20 with contract (x : Uint128, y : String) end" + } + ] + }, + { + "vname": "RemoteReadContractParameterTest5", + "params": [ + { + "vname": "remote5", + "type": "ByStr20 with contract (x : Map (Uint128) (Bool)) end" + } + ] + }, + { + "vname": "RemoteReadContractParameterTest6", + "params": [ + { + "vname": "remote6", + "type": + "ByStr20 with contract (x : Uint128) field x : String end" + } + ] + }, + { + "vname": "RemoteReadContractParameterTest7", + "params": [ + { + "vname": "remote7", + "type": + "ByStr20 with contract (x : Uint128, y : Uint64) field x : Uint128, field y : Uint64 end" + } + ] + }, + { + "vname": "RemoteReadContractParameterTest8", + "params": [ + { + "vname": "remote", + "type": + "ByStr20 with contract (admin : ByStr20 with contract (f : ByStr20 with contract (g : Uint128) end) end) end" + } + ] + }, + { + "vname": "RemoteReadContractParameterTest9", + "params": [ + { + "vname": "remote", + "type": + "ByStr20 with contract (admin : ByStr20 with contract (f : ByStr20 with contract (g : Map (Uint128) (Uint128)) end) end) end" + } + ] + }, + { "vname": "RemoteReadContractParameterTest10", "params": [] }, + { + "vname": "RemoteReadContractParameterTest11", + "params": [ + { + "vname": "remote", + "type": + "ByStr20 with contract (x : Uint128) field y : String end" + } + ] + }, + { "vname": "AddressTypeErasureTest1", "params": [] }, + { "vname": "AddressTypeErasureTest2", "params": [] } + ], + "procedures": [], + "events": [], + "ADTs": [ + { + "tname": "Option", + "tparams": [ "'A" ], + "tmap": [ + { "cname": "Some", "argtypes": [ "'A" ] }, + { "cname": "None", "argtypes": [] } + ] + }, + { + "tname": "remote_state_reads_cparam.AddressADT", + "tparams": [], + "tmap": [ + { + "cname": "remote_state_reads_cparam.Address1", + "argtypes": [ "ByStr20 with end" ] + }, + { + "cname": "remote_state_reads_cparam.Address2", + "argtypes": [ + "ByStr20 with contract (param : ByStr20 with contract (x : Uint128) end) field admin : ByStr20 with end end" + ] + } + ] + }, + { + "tname": "Bool", + "tparams": [], + "tmap": [ + { "cname": "True", "argtypes": [] }, + { "cname": "False", "argtypes": [] } + ] + }, + { + "tname": "Nat", + "tparams": [], + "tmap": [ + { "cname": "Zero", "argtypes": [] }, + { "cname": "Succ", "argtypes": [ "Nat" ] } + ] + }, + { + "tname": "List", + "tparams": [ "'A" ], + "tmap": [ + { "cname": "Cons", "argtypes": [ "'A", "List ('A)" ] }, + { "cname": "Nil", "argtypes": [] } + ] + }, + { + "tname": "Pair", + "tparams": [ "'A", "'B" ], + "tmap": [ { "cname": "Pair", "argtypes": [ "'A", "'B" ] } ] + } + ] + }, + "warnings": [ + { + "warning_message": "Write only field: remote_reads_test_res_9", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 116, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_8", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 107, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_7_6", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 99, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_7_3", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 95, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_6_2", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 86, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_6_1", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 84, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_5_5", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 77, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_5_3", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 74, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_5_1", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 70, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_4_2", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 63, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_4_1", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 62, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_3_3", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 54, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_3_2", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 52, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_2", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 44, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_10", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 121, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: remote_reads_test_res_1", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 37, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Unused ADT constructor: Address2", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 8, + "column": 1 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Unused transition parameter: remote", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 125, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Consider using in-place Map access", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 136, + "column": 14 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 1 + }, + { + "warning_message": + "No transition in contract RRCPContract contains an accept statement\n", + "start_location": { + "file": "contracts/remote_state_reads_cparam.scilla", + "line": 10, + "column": 10 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 1 + } + ], + "gas_remaining": "7999" +} + diff --git a/tests/checker/good/gold/type_casts.scilla.gold b/tests/checker/good/gold/type_casts.scilla.gold index 25bbbd857..61f497b3e 100644 --- a/tests/checker/good/gold/type_casts.scilla.gold +++ b/tests/checker/good/gold/type_casts.scilla.gold @@ -21,7 +21,14 @@ { "field": "test_6_4_g_res", "tag": "(Option NoInfo)" }, { "field": "test_6_4_failed_cast", "tag": "NotMoney" }, { "field": "test_7_g_res", "tag": "(Option NoInfo)" }, - { "field": "test_7_h_res", "tag": "(Option NoInfo)" } + { "field": "test_7_h_res", "tag": "(Option NoInfo)" }, + { "field": "test_9_f_res", "tag": "(Option NoInfo)" }, + { "field": "test_10_f_immut_res", "tag": "(Option NoInfo)" }, + { "field": "test_10_g_immut_res", "tag": "(Option NoInfo)" }, + { "field": "test_10_f_mut_res", "tag": "(Option NoInfo)" }, + { "field": "test_11_f_immut_res", "tag": "(Option NoInfo)" }, + { "field": "test_11_g_immut_res", "tag": "(Option NoInfo)" }, + { "field": "test_11_f_mut_res", "tag": "(Option NoInfo)" } ], "ADT constructors": [] }, @@ -62,7 +69,22 @@ { "vname": "test_6_4_g_res", "type": "Option (Bool)", "depth": 0 }, { "vname": "test_6_4_failed_cast", "type": "Bool", "depth": 0 }, { "vname": "test_7_g_res", "type": "Option (Bool)", "depth": 0 }, - { "vname": "test_7_h_res", "type": "Option (Int256)", "depth": 0 } + { "vname": "test_7_h_res", "type": "Option (Int256)", "depth": 0 }, + { "vname": "test_9_f_res", "type": "Option (Uint128)", "depth": 0 }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "depth": 0 + }, + { "vname": "test_10_g_immut_res", "type": "Option (Bool)", "depth": 0 }, + { "vname": "test_10_f_mut_res", "type": "Option (String)", "depth": 0 }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "depth": 0 + }, + { "vname": "test_11_g_immut_res", "type": "Option (Bool)", "depth": 0 }, + { "vname": "test_11_f_mut_res", "type": "Option (String)", "depth": 0 } ], "transitions": [ { @@ -111,7 +133,8 @@ "params": [ { "vname": "x", - "type": "ByStr20 with contract field f : Uint256, field g : Bool end" + "type": + "ByStr20 with contract field f : Uint256, field g : Bool end" } ] }, @@ -119,7 +142,31 @@ "vname": "CastTest7", "params": [ { "vname": "x", "type": "ByStr20" } ] }, - { "vname": "CastTest8", "params": [] } + { "vname": "CastTest8", "params": [] }, + { + "vname": "CastTest9", + "params": [ + { + "vname": "x", + "type": + "ByStr20 with contract (f : Uint128, g : Bool) field f : String end" + } + ] + }, + { + "vname": "CastTest10", + "params": [ + { + "vname": "x", + "type": + "ByStr20 with contract (f : Uint128, g : Bool) field f : String end" + } + ] + }, + { + "vname": "CastTest11", + "params": [ { "vname": "x", "type": "ByStr20" } ] + } ], "procedures": [], "events": [], @@ -164,11 +211,21 @@ ] }, "warnings": [ + { + "warning_message": "Write only field: test_9_f_res", + "start_location": { + "file": "contracts/type_casts.scilla", + "line": 201, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, { "warning_message": "Write only field: test_7_h_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 175, + "line": 182, "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -178,7 +235,7 @@ "warning_message": "Write only field: test_7_g_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 172, + "line": 179, "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -188,7 +245,7 @@ "warning_message": "Write only field: test_6_4_g_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 154, + "line": 161, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -198,7 +255,7 @@ "warning_message": "Write only field: test_6_4_failed_cast", "start_location": { "file": "contracts/type_casts.scilla", - "line": 157, + "line": 164, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -208,7 +265,7 @@ "warning_message": "Write only field: test_6_4_f_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 151, + "line": 158, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -218,7 +275,7 @@ "warning_message": "Write only field: test_6_4_bal_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 148, + "line": 155, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -228,7 +285,7 @@ "warning_message": "Write only field: test_6_3_g_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 136, + "line": 143, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -238,7 +295,7 @@ "warning_message": "Write only field: test_6_3_f_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 133, + "line": 140, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -248,7 +305,7 @@ "warning_message": "Write only field: test_6_3_bal_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 130, + "line": 137, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -258,7 +315,7 @@ "warning_message": "Write only field: test_6_2_g_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 118, + "line": 125, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -268,7 +325,7 @@ "warning_message": "Write only field: test_6_2_f_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 115, + "line": 122, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -278,7 +335,7 @@ "warning_message": "Write only field: test_6_2_bal_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 112, + "line": 119, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -288,7 +345,7 @@ "warning_message": "Write only field: test_6_1_g_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 100, + "line": 107, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -298,7 +355,7 @@ "warning_message": "Write only field: test_6_1_f_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 97, + "line": 104, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -308,7 +365,7 @@ "warning_message": "Write only field: test_6_1_bal_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 94, + "line": 101, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -318,7 +375,7 @@ "warning_message": "Write only field: test_5_2_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 82, + "line": 89, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -328,7 +385,7 @@ "warning_message": "Write only field: test_5_1_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 70, + "line": 77, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -338,7 +395,7 @@ "warning_message": "Write only field: test_4_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 58, + "line": 65, "column": 5 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -348,7 +405,7 @@ "warning_message": "Write only field: test_3_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 48, + "line": 55, "column": 3 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -358,7 +415,7 @@ "warning_message": "Write only field: test_2_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 42, + "line": 49, "column": 3 }, "end_location": { "file": "", "line": 0, "column": 0 }, @@ -368,24 +425,86 @@ "warning_message": "Write only field: test_1_res", "start_location": { "file": "contracts/type_casts.scilla", - "line": 36, + "line": 43, "column": 3 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Unused type cast statement to: maybe_contract_address", + "warning_message": "Write only field: test_11_g_immut_res", + "start_location": { + "file": "contracts/type_casts.scilla", + "line": 234, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: test_11_f_mut_res", + "start_location": { + "file": "contracts/type_casts.scilla", + "line": 237, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: test_11_f_immut_res", + "start_location": { + "file": "contracts/type_casts.scilla", + "line": 231, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: test_10_g_immut_res", + "start_location": { + "file": "contracts/type_casts.scilla", + "line": 216, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: test_10_f_mut_res", + "start_location": { + "file": "contracts/type_casts.scilla", + "line": 219, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Write only field: test_10_f_immut_res", + "start_location": { + "file": "contracts/type_casts.scilla", + "line": 213, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": + "Unused type cast statement to: maybe_contract_address", "start_location": { "file": "contracts/type_casts.scilla", - "line": 184, + "line": 191, "column": 3 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "No transition in contract CastContract contains an accept statement\n", + "warning_message": + "No transition in contract CastContract contains an accept statement\n", "start_location": { "file": "contracts/type_casts.scilla", "line": 9, diff --git a/tests/contracts/dead_code_test18.scilla b/tests/contracts/dead_code_test18.scilla index 685377c01..f438fc0a9 100644 --- a/tests/contracts/dead_code_test18.scilla +++ b/tests/contracts/dead_code_test18.scilla @@ -28,6 +28,8 @@ type A = contract Dead18 () +field remote_reads_test_res_1 : Uint128 = Uint128 0 + procedure use_a1 (a1 : A) match a1 with | A1_has_unused a11 num a12_unused a13 => @@ -52,7 +54,15 @@ procedure use_a2 (a2 : A) end end -transition test(a : A) +transition test_mutables(a : A) use_a1 a; use_a2 a end + +transition read_cparam_1( + remote1: ByStr20 with contract (used : Uint128, + unused: Uint128) + end) + tmp_1 <-& remote1.(used); + remote_reads_test_res_1 := tmp_1 +end diff --git a/tests/contracts/remote_state_reads_cparam.scilla b/tests/contracts/remote_state_reads_cparam.scilla new file mode 100644 index 000000000..afd12eb2b --- /dev/null +++ b/tests/contracts/remote_state_reads_cparam.scilla @@ -0,0 +1,140 @@ +scilla_version 0 + +library RRCPLib + +(* Tests various aspects of address types with contract parameters *) +type AddressADT = +| Address1 of ByStr20 with end +| Address2 of ByStr20 with contract (param : ByStr20 with contract (x : Uint128) end) field admin : ByStr20 with end end + +contract RRCPContract ( + cparam1: ByStr20 with contract (admin : ByStr20) end) + +field remote_reads_test_res_1 : Uint128 = Uint128 0 (* (x) of remote1 *) +field remote_reads_test_res_2 : AddressADT = Address1 cparam1 (* (x) of remote2 *) +field remote_reads_test_res_3_2 : Uint128 = Uint128 0 (* (x) of remote3, then (x) of (x) *) +field remote_reads_test_res_3_3 : Uint64 = Uint64 0 (* (x) of remote3, then y of (x) *) +field remote_reads_test_res_4_1 : Uint128 = Uint128 0 (* (x) of remote4 *) +field remote_reads_test_res_4_2 : String = "" (* (y) of remote4 *) +field remote_reads_test_res_5_1 : Map Uint128 Bool = Emp Uint128 Bool (* (x) of remote5 *) +field remote_reads_test_res_5_3 : Option Bool = None { Bool } (* exists (x)[0] of remote5 *) +field remote_reads_test_res_5_5 : Option (Option Bool) = None { (Option Bool) } (* (x)[0] of remote5 *) +field remote_reads_test_res_6_1 : Uint128 = Uint128 0 (* (x) of remote6 *) +field remote_reads_test_res_6_2 : String = "" (* x of remote6 *) +field remote_reads_test_res_7_3 : Option Bool = None { Bool } (* (x) = x in remote7 *) +field remote_reads_test_res_7_6 : Option Bool = None { Bool } (* (y) = y in remote7 *) +field remote_reads_test_res_8 : Uint128 = Uint128 0 (* remote.(admin).(f).(g) *) +field remote_reads_test_res_9 : Option Uint128 = None {Uint128} (* remote.(admin).(f).(g)[0] *) +field remote_reads_test_res_10 : ByStr20 = _this_address (* cparam1.(admin) *) +field address_type_erasure_test_res_1 : Map Uint128 (ByStr20 with end) = Emp Uint128 (ByStr20 with end) (* field[0] := cparam1 *) + + + +transition RemoteReadContractParameterTest1( + remote1: ByStr20 with contract (x : Uint128) end + ) + tmp_1 <-& remote1.(x); + remote_reads_test_res_1 := tmp_1 +end + +transition RemoteReadContractParameterTest2( + remote2: ByStr20 with contract (x : AddressADT) end + ) + tmp_2 <-& remote2.(x); + remote_reads_test_res_2 := tmp_2 +end + +transition RemoteReadContractParameterTest3( + remote3: ByStr20 with contract (x : ByStr20 with contract (x : Uint128) field y : Uint64 end) end + ) + tmp_3_1 <-& remote3.(x); + tmp_3_2 <-& tmp_3_1.(x); + remote_reads_test_res_3_2 := tmp_3_2; + tmp_3_3 <-& tmp_3_1.y; + remote_reads_test_res_3_3 := tmp_3_3 +end + +transition RemoteReadContractParameterTest4( + remote4: ByStr20 with contract (x : Uint128, y : String) end + ) + tmp_4_1 <-& remote4.(x); + tmp_4_2 <-& remote4.(y); + remote_reads_test_res_4_1 := tmp_4_1; + remote_reads_test_res_4_2 := tmp_4_2 +end + +transition RemoteReadContractParameterTest5( + remote5: ByStr20 with contract (x : Map Uint128 Bool) end + ) + tmp_5_1 <-& remote5.(x); + remote_reads_test_res_5_1 := tmp_5_1; + zero = Uint128 0 ; + tmp_5_2 <-& exists remote5.(x)[zero]; + tmp_5_3 = Some { Bool } tmp_5_2; + remote_reads_test_res_5_3 := tmp_5_3; + tmp_5_4 <-& remote5.(x)[zero]; + tmp_5_5 = Some { (Option Bool) } tmp_5_4; + remote_reads_test_res_5_5 := tmp_5_5 +end + +transition RemoteReadContractParameterTest6( + remote6: ByStr20 with contract (x : Uint128) field x : String end + ) + tmp_6_1 <-& remote6.(x); + remote_reads_test_res_6_1 := tmp_6_1; + tmp_6_2 <-& remote6.x; + remote_reads_test_res_6_2 := tmp_6_2 +end + +transition RemoteReadContractParameterTest7( + remote7: ByStr20 with contract (x : Uint128, y : Uint64) field y : Uint64, field x : Uint128 end + ) + tmp_7_1 <-& remote7.(x); + tmp_7_2 <-& remote7.x; + tmp_7_3 = let res = builtin eq tmp_7_1 tmp_7_2 in Some { Bool } res; + remote_reads_test_res_7_3 := tmp_7_3; + tmp_7_4 <-& remote7.(y); + tmp_7_5 <-& remote7.y; + tmp_7_6 = let res = builtin eq tmp_7_4 tmp_7_5 in Some { Bool } res; + remote_reads_test_res_7_6 := tmp_7_6 +end + +transition RemoteReadContractParameterTest8( + remote: ByStr20 with contract (admin : ByStr20 with contract (f : ByStr20 with contract (g : Uint128) end) end) end) + ad <-& remote.(admin); + this_f <-& ad.(f); + this_g <-& this_f.(g); + remote_reads_test_res_8 := this_g +end + +transition RemoteReadContractParameterTest9( + remote: ByStr20 with contract (admin : ByStr20 with contract (f : ByStr20 with contract (g : Map Uint128 Uint128) end) end) end) + ad <-& remote.(admin); + this_f <-& ad.(f); + remote_key = Uint128 0; + this_g <-& this_f.(g)[remote_key]; + remote_reads_test_res_9 := this_g +end + +transition RemoteReadContractParameterTest10() + ad <-& cparam1.(admin); + remote_reads_test_res_10 := ad +end + +transition RemoteReadContractParameterTest11( + remote: ByStr20 with contract (x : Uint128) field y : String end + ) +end + +transition AddressTypeErasureTest1() + zero = Uint128 0; + address_type_erasure_test_res_1[zero] := cparam1 +end + +transition AddressTypeErasureTest2() + zero = Uint128 0; + emp_map <- address_type_erasure_test_res_1; + new_map = builtin put emp_map zero cparam1; + address_type_erasure_test_res_1 := new_map +end + diff --git a/tests/contracts/type_casts.scilla b/tests/contracts/type_casts.scilla index b2b2a78fb..b706da531 100644 --- a/tests/contracts/type_casts.scilla +++ b/tests/contracts/type_casts.scilla @@ -29,6 +29,13 @@ field test_6_4_g_res : Option Bool = None {Bool} field test_6_4_failed_cast : Bool = False field test_7_g_res : Option Bool = None {Bool} field test_7_h_res : Option Int256 = None {Int256} +field test_9_f_res : Option Uint128 = None {Uint128} +field test_10_f_immut_res : Option Uint128 = None {Uint128} +field test_10_g_immut_res : Option Bool = None {Bool} +field test_10_f_mut_res : Option String = None {String} +field test_11_f_immut_res : Option Uint128 = None {Uint128} +field test_11_g_immut_res : Option Bool = None {Bool} +field test_11_f_mut_res : Option String = None {String} transition CastTest1(x : ByStr20 with contract end) (* Cast to less restrictive type *) @@ -183,3 +190,51 @@ transition CastTest8() (* cast an address defined in the contract library *) maybe_contract_address <-& zero_address as ByStr20 with contract end end + +transition CastTest9(x : ByStr20 with contract (g : Bool, f : Uint128) field f : String end) + (* Cast to less restrictive type with immutable fields *) + x_cast <-& x as ByStr20 with contract (f : Uint128) end; + match x_cast with + | Some x_as_address => + f <-& x_as_address.(f); + f_res = Some {Uint128} f; + test_9_f_res := f_res + | None => + end +end + +transition CastTest10(x : ByStr20 with contract (g : Bool, f : Uint128) field f : String end) + (* Cast to same type with immutable fields *) + x_cast <-& x as ByStr20 with contract (g : Bool, f : Uint128) field f : String end; + match x_cast with + | Some x_as_address => + f_immut <-& x_as_address.(f); + f_immut_res = Some {Uint128} f_immut; + test_10_f_immut_res := f_immut_res; + g_immut <-& x_as_address.(g); + g_immut_res = Some {Bool} g_immut; + test_10_g_immut_res := g_immut_res; + f_mut <-& x_as_address.f; + f_mut_res = Some {String} f_mut; + test_10_f_mut_res := f_mut_res + | None => + end +end + +transition CastTest11(x : ByStr20) + (* Cast to address with both mutable and immutable fields *) + x_cast <-& x as ByStr20 with contract (g : Bool, f : Uint128) field f : String end; + match x_cast with + | Some x_as_address => + f_immut <-& x_as_address.(f); + f_immut_res = Some {Uint128} f_immut; + test_11_f_immut_res := f_immut_res; + g_immut <-& x_as_address.(g); + g_immut_res = Some {Bool} g_immut; + test_11_g_immut_res := g_immut_res; + f_mut <-& x_as_address.f; + f_mut_res = Some {String} f_mut; + test_11_f_mut_res := f_mut_res + | None => + end +end diff --git a/tests/formatter/ast_does_not_change.t/remote_state_reads_cparam.scilla b/tests/formatter/ast_does_not_change.t/remote_state_reads_cparam.scilla new file mode 100644 index 000000000..afd12eb2b --- /dev/null +++ b/tests/formatter/ast_does_not_change.t/remote_state_reads_cparam.scilla @@ -0,0 +1,140 @@ +scilla_version 0 + +library RRCPLib + +(* Tests various aspects of address types with contract parameters *) +type AddressADT = +| Address1 of ByStr20 with end +| Address2 of ByStr20 with contract (param : ByStr20 with contract (x : Uint128) end) field admin : ByStr20 with end end + +contract RRCPContract ( + cparam1: ByStr20 with contract (admin : ByStr20) end) + +field remote_reads_test_res_1 : Uint128 = Uint128 0 (* (x) of remote1 *) +field remote_reads_test_res_2 : AddressADT = Address1 cparam1 (* (x) of remote2 *) +field remote_reads_test_res_3_2 : Uint128 = Uint128 0 (* (x) of remote3, then (x) of (x) *) +field remote_reads_test_res_3_3 : Uint64 = Uint64 0 (* (x) of remote3, then y of (x) *) +field remote_reads_test_res_4_1 : Uint128 = Uint128 0 (* (x) of remote4 *) +field remote_reads_test_res_4_2 : String = "" (* (y) of remote4 *) +field remote_reads_test_res_5_1 : Map Uint128 Bool = Emp Uint128 Bool (* (x) of remote5 *) +field remote_reads_test_res_5_3 : Option Bool = None { Bool } (* exists (x)[0] of remote5 *) +field remote_reads_test_res_5_5 : Option (Option Bool) = None { (Option Bool) } (* (x)[0] of remote5 *) +field remote_reads_test_res_6_1 : Uint128 = Uint128 0 (* (x) of remote6 *) +field remote_reads_test_res_6_2 : String = "" (* x of remote6 *) +field remote_reads_test_res_7_3 : Option Bool = None { Bool } (* (x) = x in remote7 *) +field remote_reads_test_res_7_6 : Option Bool = None { Bool } (* (y) = y in remote7 *) +field remote_reads_test_res_8 : Uint128 = Uint128 0 (* remote.(admin).(f).(g) *) +field remote_reads_test_res_9 : Option Uint128 = None {Uint128} (* remote.(admin).(f).(g)[0] *) +field remote_reads_test_res_10 : ByStr20 = _this_address (* cparam1.(admin) *) +field address_type_erasure_test_res_1 : Map Uint128 (ByStr20 with end) = Emp Uint128 (ByStr20 with end) (* field[0] := cparam1 *) + + + +transition RemoteReadContractParameterTest1( + remote1: ByStr20 with contract (x : Uint128) end + ) + tmp_1 <-& remote1.(x); + remote_reads_test_res_1 := tmp_1 +end + +transition RemoteReadContractParameterTest2( + remote2: ByStr20 with contract (x : AddressADT) end + ) + tmp_2 <-& remote2.(x); + remote_reads_test_res_2 := tmp_2 +end + +transition RemoteReadContractParameterTest3( + remote3: ByStr20 with contract (x : ByStr20 with contract (x : Uint128) field y : Uint64 end) end + ) + tmp_3_1 <-& remote3.(x); + tmp_3_2 <-& tmp_3_1.(x); + remote_reads_test_res_3_2 := tmp_3_2; + tmp_3_3 <-& tmp_3_1.y; + remote_reads_test_res_3_3 := tmp_3_3 +end + +transition RemoteReadContractParameterTest4( + remote4: ByStr20 with contract (x : Uint128, y : String) end + ) + tmp_4_1 <-& remote4.(x); + tmp_4_2 <-& remote4.(y); + remote_reads_test_res_4_1 := tmp_4_1; + remote_reads_test_res_4_2 := tmp_4_2 +end + +transition RemoteReadContractParameterTest5( + remote5: ByStr20 with contract (x : Map Uint128 Bool) end + ) + tmp_5_1 <-& remote5.(x); + remote_reads_test_res_5_1 := tmp_5_1; + zero = Uint128 0 ; + tmp_5_2 <-& exists remote5.(x)[zero]; + tmp_5_3 = Some { Bool } tmp_5_2; + remote_reads_test_res_5_3 := tmp_5_3; + tmp_5_4 <-& remote5.(x)[zero]; + tmp_5_5 = Some { (Option Bool) } tmp_5_4; + remote_reads_test_res_5_5 := tmp_5_5 +end + +transition RemoteReadContractParameterTest6( + remote6: ByStr20 with contract (x : Uint128) field x : String end + ) + tmp_6_1 <-& remote6.(x); + remote_reads_test_res_6_1 := tmp_6_1; + tmp_6_2 <-& remote6.x; + remote_reads_test_res_6_2 := tmp_6_2 +end + +transition RemoteReadContractParameterTest7( + remote7: ByStr20 with contract (x : Uint128, y : Uint64) field y : Uint64, field x : Uint128 end + ) + tmp_7_1 <-& remote7.(x); + tmp_7_2 <-& remote7.x; + tmp_7_3 = let res = builtin eq tmp_7_1 tmp_7_2 in Some { Bool } res; + remote_reads_test_res_7_3 := tmp_7_3; + tmp_7_4 <-& remote7.(y); + tmp_7_5 <-& remote7.y; + tmp_7_6 = let res = builtin eq tmp_7_4 tmp_7_5 in Some { Bool } res; + remote_reads_test_res_7_6 := tmp_7_6 +end + +transition RemoteReadContractParameterTest8( + remote: ByStr20 with contract (admin : ByStr20 with contract (f : ByStr20 with contract (g : Uint128) end) end) end) + ad <-& remote.(admin); + this_f <-& ad.(f); + this_g <-& this_f.(g); + remote_reads_test_res_8 := this_g +end + +transition RemoteReadContractParameterTest9( + remote: ByStr20 with contract (admin : ByStr20 with contract (f : ByStr20 with contract (g : Map Uint128 Uint128) end) end) end) + ad <-& remote.(admin); + this_f <-& ad.(f); + remote_key = Uint128 0; + this_g <-& this_f.(g)[remote_key]; + remote_reads_test_res_9 := this_g +end + +transition RemoteReadContractParameterTest10() + ad <-& cparam1.(admin); + remote_reads_test_res_10 := ad +end + +transition RemoteReadContractParameterTest11( + remote: ByStr20 with contract (x : Uint128) field y : String end + ) +end + +transition AddressTypeErasureTest1() + zero = Uint128 0; + address_type_erasure_test_res_1[zero] := cparam1 +end + +transition AddressTypeErasureTest2() + zero = Uint128 0; + emp_map <- address_type_erasure_test_res_1; + new_map = builtin put emp_map zero cparam1; + address_type_erasure_test_res_1 := new_map +end + diff --git a/tests/formatter/look_and_feel/README.md b/tests/formatter/look_and_feel/README.md index 9d92e122e..2d0c51650 100644 --- a/tests/formatter/look_and_feel/README.md +++ b/tests/formatter/look_and_feel/README.md @@ -5,7 +5,7 @@ integrated into the Dune build system. Each directory is a separate test and the directory name must end with `.t`. Also, each directory contains one contract or expression to format and the `run.t` script which calls `scilla-fmt` on its contract or expression -and and shows the expected output on the next line. +and shows the expected output on the next line. To run cram tests use the `dune runtests` command. To update tests when the formatter behavior changes run `dune promote`. diff --git a/tests/formatter/to_json/ark.t/run.t b/tests/formatter/to_json/ark.t/run.t index 720610667..baaff83c9 100644 --- a/tests/formatter/to_json/ark.t/run.t +++ b/tests/formatter/to_json/ark.t/run.t @@ -1,2 +1,2 @@ $ scilla-fmt --json --deannot ark.scilla - {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","ARK"],null],"lentries":[["LibTyp",["Ident",["SimpleLocal","Denom"],null],[{"cname":["Ident",["SimpleLocal","Zil"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","Token"],null],"c_arg_types":[["PrimType",["Bystrx_typ",20]]]}]],["LibTyp",["Ident",["SimpleLocal","Coins"],null],[{"cname":["Ident",["SimpleLocal","Coins"],null],"c_arg_types":[["ADT",["Ident",["SimpleLocal","Denom"],{"fname":"","lnum":0,"cnum":0}],[]],["PrimType",["Uint_typ",["Bits128"]]]]}]],["LibTyp",["Ident",["SimpleLocal","NFT"],null],[{"cname":["Ident",["SimpleLocal","NFT"],null],"c_arg_types":[["Address","Address"],["PrimType",["Uint_typ",["Bits256"]]]]}]],["LibTyp",["Ident",["SimpleLocal","Side"],null],[{"cname":["Ident",["SimpleLocal","Buy"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","Sell"],null],"c_arg_types":[]}]],["LibTyp",["Ident",["SimpleLocal","Cheque"],null],[{"cname":["Ident",["SimpleLocal","Cheque"],null],"c_arg_types":[["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]],["PrimType",["Bnum_typ"]],["PrimType",["Uint_typ",["Bits128"]]],["PrimType",["Bystrx_typ",33]],["PrimType",["Bystrx_typ",64]]]}]],["LibTyp",["Ident",["SimpleLocal","Action"],null],[{"cname":["Ident",["SimpleLocal","Execute"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","Void"],null],"c_arg_types":[]}]],["LibVar",["Ident",["SimpleLocal","zero"],null],null,[["Literal","0"],null]],["LibVar",["Ident",["SimpleLocal","none"],null],null,[["Constr",["Ident",["SimpleLocal","None"],null],[["PrimType",["Bystrx_typ",20]]],[]],null]],["LibVar",["Ident",["SimpleLocal","true"],null],null,[["Constr",["Ident",["SimpleLocal","True"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","buy"],null],null,[["Constr",["Ident",["SimpleLocal","Buy"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","sell"],null],null,[["Constr",["Ident",["SimpleLocal","Sell"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","zil"],null],null,[["Constr",["Ident",["SimpleLocal","Zil"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","signed_message_prefix"],null],null,[["Literal","Zilliqa Signed Message ("],null]],["LibVar",["Ident",["SimpleLocal","signed_message_suffix"],null],null,[["Literal","):\n"],null]],["LibVar",["Ident",["SimpleLocal","execute_prefix"],null],null,[["Literal","Execute ARK Cheque "],null]],["LibVar",["Ident",["SimpleLocal","void_prefix"],null],null,[["Literal","Void ARK Cheque "],null]],["LibVar",["Ident",["SimpleLocal","execute"],null],null,[["Constr",["Ident",["SimpleLocal","Execute"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","void"],null],null,[["Constr",["Ident",["SimpleLocal","Void"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","one_msg"],null],null,[["Fun",["Ident",["SimpleLocal","msg"],null],["PrimType",["Msg_typ"]],[["Let",["Ident",["SimpleLocal","nil_msg"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["PrimType",["Msg_typ"]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg"],null],["Ident",["SimpleLocal","nil_msg"],null]]],null]],null]],null]],["LibTyp",["Ident",["SimpleLocal","Error"],null],[{"cname":["Ident",["SimpleLocal","CodeNotOwner"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeNotPendingOwner"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodePendingOwnerNotEmpty"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeTokenProxyNotSet"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeTokenProxyAlreadySet"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeSignatureInvalid"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeChequeAlreadyVoided"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeChequeExpired"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeInvalidPrice"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeInvalidFee"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeInvalidSide"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeInvalidOwner"],null],"c_arg_types":[]}]],["LibVar",["Ident",["SimpleLocal","make_error"],null],null,[["Fun",["Ident",["SimpleLocal","result"],null],["ADT",["Ident",["SimpleLocal","Error"],{"fname":"","lnum":0,"cnum":0}],[]],[["Let",["Ident",["SimpleLocal","result_code"],null],null,[["MatchExpr",["Ident",["SimpleLocal","result"],null],[[["Constructor",["Ident",["SimpleLocal","CodeNotOwner"],null],[]],[["Literal","-1"],null]],[["Constructor",["Ident",["SimpleLocal","CodeNotPendingOwner"],null],[]],[["Literal","-2"],null]],[["Constructor",["Ident",["SimpleLocal","CodePendingOwnerNotEmpty"],null],[]],[["Literal","-3"],null]],[["Constructor",["Ident",["SimpleLocal","CodeTokenProxyNotSet"],null],[]],[["Literal","-4"],null]],[["Constructor",["Ident",["SimpleLocal","CodeTokenProxyAlreadySet"],null],[]],[["Literal","-5"],null]],[["Constructor",["Ident",["SimpleLocal","CodeSignatureInvalid"],null],[]],[["Literal","-6"],null]],[["Constructor",["Ident",["SimpleLocal","CodeChequeAlreadyVoided"],null],[]],[["Literal","-7"],null]],[["Constructor",["Ident",["SimpleLocal","CodeChequeExpired"],null],[]],[["Literal","-8"],null]],[["Constructor",["Ident",["SimpleLocal","CodeInvalidPrice"],null],[]],[["Literal","-9"],null]],[["Constructor",["Ident",["SimpleLocal","CodeInvalidFee"],null],[]],[["Literal","-10"],null]],[["Constructor",["Ident",["SimpleLocal","CodeInvalidSide"],null],[]],[["Literal","-11"],null]],[["Constructor",["Ident",["SimpleLocal","CodeInvalidOwner"],null],[]],[["Literal","-12"],null]]]],null],[["Message",[["_exception",["MLit","Error"]],["code",["MVar",["Ident",["SimpleLocal","result_code"],null]]]]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","get_action_prefix"],null],null,[["Fun",["Ident",["SimpleLocal","action"],null],["ADT",["Ident",["SimpleLocal","Action"],{"fname":"","lnum":0,"cnum":0}],[]],[["MatchExpr",["Ident",["SimpleLocal","action"],null],[[["Constructor",["Ident",["SimpleLocal","Execute"],null],[]],[["Var",["Ident",["SimpleLocal","execute_prefix"],null]],null]],[["Constructor",["Ident",["SimpleLocal","Void"],null],[]],[["Var",["Ident",["SimpleLocal","void_prefix"],null]],null]]]],null]],null]],["LibVar",["Ident",["SimpleLocal","get_account"],null],null,[["Fun",["Ident",["SimpleLocal","cheque"],null],["ADT",["Ident",["SimpleLocal","Cheque"],{"fname":"","lnum":0,"cnum":0}],[]],[["MatchExpr",["Ident",["SimpleLocal","cheque"],null],[[["Constructor",["Ident",["SimpleLocal","Cheque"],null],[["Binder",["Ident",["SimpleLocal","direction"],null]],["Binder",["Ident",["SimpleLocal","expiry"],null]],["Binder",["Ident",["SimpleLocal","nonce"],null]],["Binder",["Ident",["SimpleLocal","pubkey"],null]],["Binder",["Ident",["SimpleLocal","signature"],null]]]],[["Builtin",[["Builtin_schnorr_get_address"],null],[],[["Ident",["SimpleLocal","pubkey"],null]]],null]]]],null]],null]],["LibVar",["Ident",["SimpleLocal","get_amount"],null],null,[["Fun",["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]],[["MatchExpr",["Ident",["SimpleLocal","price"],null],[[["Constructor",["Ident",["SimpleLocal","Coins"],null],[["Binder",["Ident",["SimpleLocal","denom"],null]],["Binder",["Ident",["SimpleLocal","amount"],null]]]],[["Var",["Ident",["SimpleLocal","amount"],null]],null]]]],null]],null]],["LibVar",["Ident",["SimpleLocal","get_cheque_hash"],null],null,[["Fun",["Ident",["SimpleLocal","contract_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","direction"],null],["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]],[["Fun",["Ident",["SimpleLocal","token"],null],["ADT",["Ident",["SimpleLocal","NFT"],{"fname":"","lnum":0,"cnum":0}],[]],[["Fun",["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]],[["Fun",["Ident",["SimpleLocal","fee_amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Fun",["Ident",["SimpleLocal","expiry"],null],["PrimType",["Bnum_typ"]],[["Fun",["Ident",["SimpleLocal","nonce"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Let",["Ident",["SimpleLocal","dir_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","direction"],null]]],null],[["Let",["Ident",["SimpleLocal","token_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","token"],null]]],null],[["Let",["Ident",["SimpleLocal","price_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","price"],null]]],null],[["Let",["Ident",["SimpleLocal","fee_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","fee_amount"],null]]],null],[["Let",["Ident",["SimpleLocal","expiry_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","expiry"],null]]],null],[["Let",["Ident",["SimpleLocal","nonce_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","nonce"],null]]],null],[["Let",["Ident",["SimpleLocal","p0"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","contract_address"],null],["Ident",["SimpleLocal","dir_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p1"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p0"],null],["Ident",["SimpleLocal","token_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p2"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p1"],null],["Ident",["SimpleLocal","price_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p3"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p2"],null],["Ident",["SimpleLocal","fee_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p4"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p3"],null],["Ident",["SimpleLocal","expiry_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p5"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p4"],null],["Ident",["SimpleLocal","nonce_hash"],null]]],null],[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","p5"],null]]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]]]},"elibs":[[["Ident",["SimpleLocal","IntUtils"],null],null],[["Ident",["SimpleLocal","ListUtils"],null],null]],"contr":{"cname":["Ident",["SimpleLocal","ARK"],null],"cparams":[[["Ident",["SimpleLocal","contract_owner"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","initial_fee_address"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","chain_id"],null],["PrimType",["Uint_typ",["Bits32"]]]]],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[[["Ident",["SimpleLocal","current_owner"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Bystrx_typ",20]]]],[["Constr",["Ident",["SimpleLocal","Some"],null],[["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","contract_owner"],null]]],null]],[["Ident",["SimpleLocal","pending_owner"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Bystrx_typ",20]]]],[["Var",["Ident",["SimpleLocal","none"],null]],null]],[["Ident",["SimpleLocal","token_proxy"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Bystrx_typ",20]]]],[["Var",["Ident",["SimpleLocal","none"],null]],null]],[["Ident",["SimpleLocal","fee_address"],null],["PrimType",["Bystrx_typ",20]],[["Var",["Ident",["SimpleLocal","initial_fee_address"],null]],null]],[["Ident",["SimpleLocal","voided_cheques"],null],["MapType",["PrimType",["Bystrx_typ",33]],["MapType",["PrimType",["Bystrx_typ",32]],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Literal",{"mtype":[["PrimType",["Bystrx_typ",33]],["MapType",["PrimType",["Bystrx_typ",32]],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],"data":[]}],null]]],"ccomps":[{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","ThrowError"],null],"comp_params":[[["Ident",["SimpleLocal","err"],null],["ADT",["Ident",["SimpleLocal","Error"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["App",["Ident",["SimpleLocal","make_error"],null],[["Ident",["SimpleLocal","err"],null]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsOwner"],null],"comp_params":[[["Ident",["SimpleLocal","address"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["Load",["Ident",["SimpleLocal","maybe_current_owner"],null],["Ident",["SimpleLocal","current_owner"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_current_owner"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","current_contract_owner"],null]]]],[[["Bind",["Ident",["SimpleLocal","is_owner"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","current_contract_owner"],null],["Ident",["SimpleLocal","address"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_owner"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeNotOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeNotOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsPendingOwner"],null],"comp_params":[[["Ident",["SimpleLocal","address"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["Load",["Ident",["SimpleLocal","maybe_pending_owner"],null],["Ident",["SimpleLocal","pending_owner"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_pending_owner"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","current_pending_owner"],null]]]],[[["Bind",["Ident",["SimpleLocal","is_pending_owner"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","current_pending_owner"],null],["Ident",["SimpleLocal","address"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_pending_owner"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeNotPendingOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeNotPendingOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","NoPendingOwner"],null],"comp_params":[],"comp_body":[[["Load",["Ident",["SimpleLocal","maybe_pending_owner"],null],["Ident",["SimpleLocal","pending_owner"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_pending_owner"],null],[[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","p"],null]]]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodePendingOwnerNotEmpty"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsNotExpired"],null],"comp_params":[[["Ident",["SimpleLocal","expiry"],null],["PrimType",["Bnum_typ"]]]],"comp_body":[[["ReadFromBC",["Ident",["SimpleLocal","current_block"],null],["CurBlockNum"]],null],[["Bind",["Ident",["SimpleLocal","is_not_expired"],null],[["Builtin",[["Builtin_blt"],null],[],[["Ident",["SimpleLocal","current_block"],null],["Ident",["SimpleLocal","expiry"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_not_expired"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","TransactionExpired"]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsValidPrice"],null],"comp_params":[[["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","amount"],null],[["App",["Ident",["SimpleLocal","get_amount"],null],[["Ident",["SimpleLocal","price"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","is_zero"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","zero"],null],["Ident",["SimpleLocal","amount"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_zero"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidPrice"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsValidFee"],null],"comp_params":[[["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","fee"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","amount"],null],[["App",["Ident",["SimpleLocal","get_amount"],null],[["Ident",["SimpleLocal","price"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","is_valid"],null],[["Builtin",[["Builtin_lt"],null],[],[["Ident",["SimpleLocal","fee"],null],["Ident",["SimpleLocal","amount"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_valid"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidFee"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsValidSide"],null],"comp_params":[[["Ident",["SimpleLocal","s1"],null],["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","s2"],null],["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["MatchStmt",["Ident",["SimpleLocal","s1"],null],[[["Constructor",["Ident",["SimpleLocal","Buy"],null],[]],[[["MatchStmt",["Ident",["SimpleLocal","s2"],null],[[["Constructor",["Ident",["SimpleLocal","Buy"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","Sell"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidSide"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","Sell"],null],[]],[[["MatchStmt",["Ident",["SimpleLocal","s2"],null],[[["Constructor",["Ident",["SimpleLocal","Sell"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","Buy"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidSide"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsNotVoided"],null],"comp_params":[[["Ident",["SimpleLocal","cheque_hash"],null],["PrimType",["Bystrx_typ",32]]],[["Ident",["SimpleLocal","pubkey"],null],["PrimType",["Bystrx_typ",33]]]],"comp_body":[[["MapGet",["Ident",["SimpleLocal","cheque_voided"],null],["Ident",["SimpleLocal","voided_cheques"],null],[["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","cheque_hash"],null]],false],null],[["MatchStmt",["Ident",["SimpleLocal","cheque_voided"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeChequeAlreadyVoided"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsValidSignature"],null],"comp_params":[[["Ident",["SimpleLocal","action"],null],["ADT",["Ident",["SimpleLocal","Action"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","cheque_hash"],null],["PrimType",["Bystrx_typ",32]]],[["Ident",["SimpleLocal","pubkey"],null],["PrimType",["Bystrx_typ",33]]],[["Ident",["SimpleLocal","signature"],null],["PrimType",["Bystrx_typ",64]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","hex_hash"],null],[["Builtin",[["Builtin_to_string"],null],[],[["Ident",["SimpleLocal","cheque_hash"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","action_prefix"],null],[["App",["Ident",["SimpleLocal","get_action_prefix"],null],[["Ident",["SimpleLocal","action"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","action_string"],null],[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","action_prefix"],null],["Ident",["SimpleLocal","hex_hash"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","chain_id_string"],null],[["Builtin",[["Builtin_to_string"],null],[],[["Ident",["SimpleLocal","chain_id"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","message_header"],null],[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","signed_message_prefix"],null],["Ident",["SimpleLocal","chain_id_string"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","message_header"],null],[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","message_header"],null],["Ident",["SimpleLocal","signed_message_suffix"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","message_string"],null],[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","message_header"],null],["Ident",["SimpleLocal","action_string"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","signed_hash"],null],[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","message_string"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","signed_data"],null],[["Builtin",[["Builtin_to_bystr"],null],[],[["Ident",["SimpleLocal","signed_hash"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","valid_sig"],null],[["Builtin",[["Builtin_schnorr_verify"],null],[],[["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","signed_data"],null],["Ident",["SimpleLocal","signature"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","valid_sig"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeSignatureInvalid"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","ValidateAndConsumeCheque"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["ADT",["Ident",["SimpleLocal","NFT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","fee_amount"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","valid_direction"],null],["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","cheque"],null],["ADT",["Ident",["SimpleLocal","Cheque"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["MatchStmt",["Ident",["SimpleLocal","cheque"],null],[[["Constructor",["Ident",["SimpleLocal","Cheque"],null],[["Binder",["Ident",["SimpleLocal","direction"],null]],["Binder",["Ident",["SimpleLocal","expiry"],null]],["Binder",["Ident",["SimpleLocal","nonce"],null]],["Binder",["Ident",["SimpleLocal","pubkey"],null]],["Binder",["Ident",["SimpleLocal","signature"],null]]]],[[["CallProc",null,["Ident",["SimpleLocal","IsValidPrice"],null],[["Ident",["SimpleLocal","price"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsValidSide"],null],[["Ident",["SimpleLocal","valid_direction"],null],["Ident",["SimpleLocal","direction"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsNotExpired"],null],[["Ident",["SimpleLocal","expiry"],null]]],null],[["Bind",["Ident",["SimpleLocal","cheque_hash"],null],[["App",["Ident",["SimpleLocal","get_cheque_hash"],null],[["Ident",["SimpleLocal","_this_address"],null],["Ident",["SimpleLocal","direction"],null],["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","price"],null],["Ident",["SimpleLocal","fee_amount"],null],["Ident",["SimpleLocal","expiry"],null],["Ident",["SimpleLocal","nonce"],null]]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","IsNotVoided"],null],[["Ident",["SimpleLocal","cheque_hash"],null],["Ident",["SimpleLocal","pubkey"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsValidSignature"],null],[["Ident",["SimpleLocal","execute"],null],["Ident",["SimpleLocal","cheque_hash"],null],["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","signature"],null]]],null],[["MapUpdate",["Ident",["SimpleLocal","voided_cheques"],null],[["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","cheque_hash"],null]],["Ident",["SimpleLocal","true"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","TransferCoins"],null],"comp_params":[[["Ident",["SimpleLocal","coins"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["MatchStmt",["Ident",["SimpleLocal","coins"],null],[[["Constructor",["Ident",["SimpleLocal","Coins"],null],[["Binder",["Ident",["SimpleLocal","denom"],null]],["Binder",["Ident",["SimpleLocal","amount"],null]]]],[[["MatchStmt",["Ident",["SimpleLocal","denom"],null],[[["Constructor",["Ident",["SimpleLocal","Zil"],null],[]],[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit","AddFunds"]],["_recipient",["MVar",["Ident",["SimpleLocal","to"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","amount"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]]],[["Constructor",["Ident",["SimpleLocal","Token"],null],[["Binder",["Ident",["SimpleLocal","token"],null]]]],[[["Load",["Ident",["SimpleLocal","maybe_token_proxy"],null],["Ident",["SimpleLocal","token_proxy"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_token_proxy"],null],[[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeTokenProxyNotSet"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","t"],null]]]],[[["Bind",["Ident",["SimpleLocal","msg_to_token_proxy"],null],[["Message",[["_tag",["MLit","TransferFrom"]],["_recipient",["MVar",["Ident",["SimpleLocal","t"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","zero"],null]]],["token",["MVar",["Ident",["SimpleLocal","token"],null]]],["from",["MVar",["Ident",["SimpleLocal","from"],null]]],["to",["MVar",["Ident",["SimpleLocal","to"],null]]],["amount",["MVar",["Ident",["SimpleLocal","amount"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg_to_token_proxy"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]]]]],null]]]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","TransferNFT"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["ADT",["Ident",["SimpleLocal","NFT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["MatchStmt",["Ident",["SimpleLocal","token"],null],[[["Constructor",["Ident",["SimpleLocal","NFT"],null],[["Binder",["Ident",["SimpleLocal","token_address"],null]],["Binder",["Ident",["SimpleLocal","token_id"],null]]]],[[["RemoteMapGet",["Ident",["SimpleLocal","maybe_token_owner"],null],["Ident",["SimpleLocal","token_address"],null],["Ident",["SimpleLocal","token_owners"],null],[["Ident",["SimpleLocal","token_id"],null]],true],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_token_owner"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","token_owner"],null]]]],[[["Bind",["Ident",["SimpleLocal","is_valid_owner"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","token_owner"],null],["Ident",["SimpleLocal","from"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_valid_owner"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null],[["Bind",["Ident",["SimpleLocal","msg_to_token"],null],[["Message",[["_tag",["MLit","TransferFrom"]],["_recipient",["MVar",["Ident",["SimpleLocal","token_address"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","zero"],null]]],["to",["MVar",["Ident",["SimpleLocal","to"],null]]],["token_id",["MVar",["Ident",["SimpleLocal","token_id"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg_to_token"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ExecuteTrade"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["ADT",["Ident",["SimpleLocal","NFT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","fee_amount"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","sell_cheque"],null],["ADT",["Ident",["SimpleLocal","Cheque"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","buy_cheque"],null],["ADT",["Ident",["SimpleLocal","Cheque"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","ValidateAndConsumeCheque"],null],[["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","price"],null],["Ident",["SimpleLocal","fee_amount"],null],["Ident",["SimpleLocal","sell"],null],["Ident",["SimpleLocal","sell_cheque"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","ValidateAndConsumeCheque"],null],[["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","price"],null],["Ident",["SimpleLocal","zero"],null],["Ident",["SimpleLocal","buy"],null],["Ident",["SimpleLocal","buy_cheque"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsValidFee"],null],[["Ident",["SimpleLocal","price"],null],["Ident",["SimpleLocal","fee_amount"],null]]],null],[["MatchStmt",["Ident",["SimpleLocal","price"],null],[[["Constructor",["Ident",["SimpleLocal","Coins"],null],[["Binder",["Ident",["SimpleLocal","denom"],null]],["Binder",["Ident",["SimpleLocal","amount"],null]]]],[[["Load",["Ident",["SimpleLocal","fee_receiver"],null],["Ident",["SimpleLocal","fee_address"],null]],null],[["Bind",["Ident",["SimpleLocal","seller"],null],[["App",["Ident",["SimpleLocal","get_account"],null],[["Ident",["SimpleLocal","sell_cheque"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","buyer"],null],[["App",["Ident",["SimpleLocal","get_account"],null],[["Ident",["SimpleLocal","buy_cheque"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","seller_receive_amount"],null],[["Builtin",[["Builtin_sub"],null],[],[["Ident",["SimpleLocal","amount"],null],["Ident",["SimpleLocal","fee_amount"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","seller_receive_coins"],null],[["Constr",["Ident",["SimpleLocal","Coins"],null],[],[["Ident",["SimpleLocal","denom"],null],["Ident",["SimpleLocal","seller_receive_amount"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","fee_receive_coins"],null],[["Constr",["Ident",["SimpleLocal","Coins"],null],[],[["Ident",["SimpleLocal","denom"],null],["Ident",["SimpleLocal","fee_amount"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","denom"],null],[[["Constructor",["Ident",["SimpleLocal","Zil"],null],[]],[[["Bind",["Ident",["SimpleLocal","receiving_from_buyer"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","buyer"],null],["Ident",["SimpleLocal","_sender"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","receiving_from_buyer"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidPrice"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null],[["Bind",["Ident",["SimpleLocal","correct_amount"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","_amount"],null],["Ident",["SimpleLocal","amount"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","correct_amount"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidPrice"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null],[["AcceptPayment"],null]]],[["Wildcard"],[]]]],null],[["CallProc",null,["Ident",["SimpleLocal","TransferCoins"],null],[["Ident",["SimpleLocal","seller_receive_coins"],null],["Ident",["SimpleLocal","buyer"],null],["Ident",["SimpleLocal","seller"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","TransferCoins"],null],[["Ident",["SimpleLocal","fee_receive_coins"],null],["Ident",["SimpleLocal","buyer"],null],["Ident",["SimpleLocal","fee_receiver"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","TransferNFT"],null],[["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","seller"],null],["Ident",["SimpleLocal","buyer"],null]]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","ExecuteTradeSuccess"]],["initiator",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["token",["MVar",["Ident",["SimpleLocal","token"],null]]],["seller",["MVar",["Ident",["SimpleLocal","seller"],null]]],["buyer",["MVar",["Ident",["SimpleLocal","buyer"],null]]],["proceeds",["MVar",["Ident",["SimpleLocal","seller_receive_coins"],null]]],["fees",["MVar",["Ident",["SimpleLocal","fee_receive_coins"],null]]],["sell_cheque",["MVar",["Ident",["SimpleLocal","sell_cheque"],null]]],["buy_cheque",["MVar",["Ident",["SimpleLocal","buy_cheque"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","VoidCheque"],null],"comp_params":[[["Ident",["SimpleLocal","cheque_hash"],null],["PrimType",["Bystrx_typ",32]]],[["Ident",["SimpleLocal","pubkey"],null],["PrimType",["Bystrx_typ",33]]],[["Ident",["SimpleLocal","signature"],null],["PrimType",["Bystrx_typ",64]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsNotVoided"],null],[["Ident",["SimpleLocal","cheque_hash"],null],["Ident",["SimpleLocal","pubkey"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsValidSignature"],null],[["Ident",["SimpleLocal","void"],null],["Ident",["SimpleLocal","cheque_hash"],null],["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","signature"],null]]],null],[["MapUpdate",["Ident",["SimpleLocal","voided_cheques"],null],[["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","cheque_hash"],null]],["Ident",["SimpleLocal","true"],null]],null],[["Bind",["Ident",["SimpleLocal","from"],null],[["Builtin",[["Builtin_schnorr_get_address"],null],[],[["Ident",["SimpleLocal","pubkey"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","VoidChequeSuccess"]],["initiator",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["sender",["MVar",["Ident",["SimpleLocal","from"],null]]],["cheque_hash",["MVar",["Ident",["SimpleLocal","cheque_hash"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","SetTokenProxy"],null],"comp_params":[[["Ident",["SimpleLocal","address"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsOwner"],null],[["Ident",["SimpleLocal","_sender"],null]]],null],[["Load",["Ident",["SimpleLocal","t"],null],["Ident",["SimpleLocal","token_proxy"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","t"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Wildcard"]]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeTokenProxyAlreadySet"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","new_token_proxy"],null],[["Constr",["Ident",["SimpleLocal","Some"],null],[["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","address"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","token_proxy"],null],["Ident",["SimpleLocal","new_token_proxy"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","SetTokenProxySuccess"]],["token_proxy",["MVar",["Ident",["SimpleLocal","address"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","TransferOwnership"],null],"comp_params":[[["Ident",["SimpleLocal","new_owner"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsOwner"],null],[["Ident",["SimpleLocal","_sender"],null]]],null],[["Bind",["Ident",["SimpleLocal","o"],null],[["Constr",["Ident",["SimpleLocal","Some"],null],[["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","new_owner"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","pending_owner"],null],["Ident",["SimpleLocal","o"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","OwnershipTransferInitiated"]],["current_owner",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["pending_owner",["MVar",["Ident",["SimpleLocal","new_owner"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","AcceptOwnership"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsPendingOwner"],null],[["Ident",["SimpleLocal","_sender"],null]]],null],[["Load",["Ident",["SimpleLocal","previous_current_owner"],null],["Ident",["SimpleLocal","current_owner"],null]],null],[["Bind",["Ident",["SimpleLocal","o"],null],[["Constr",["Ident",["SimpleLocal","Some"],null],[["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","_sender"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","current_owner"],null],["Ident",["SimpleLocal","o"],null]],null],[["Store",["Ident",["SimpleLocal","pending_owner"],null],["Ident",["SimpleLocal","none"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","OwnershipTransferAccepted"]],["previous_current_owner",["MVar",["Ident",["SimpleLocal","previous_current_owner"],null]]],["current_owner",["MVar",["Ident",["SimpleLocal","_sender"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","RevokeOwnership"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsOwner"],null],[["Ident",["SimpleLocal","_sender"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","NoPendingOwner"],null],[]],null],[["Store",["Ident",["SimpleLocal","current_owner"],null],["Ident",["SimpleLocal","none"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","OwnershipRevoked"]],["current_owner",["MVar",["Ident",["SimpleLocal","_sender"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","TransferFromSuccessCallBack"],null],"comp_params":[[["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","token_id"],null],["PrimType",["Uint_typ",["Bits256"]]]]],"comp_body":[],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ZRC6_TransferFromCallback"],null],"comp_params":[[["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","token_id"],null],["PrimType",["Uint_typ",["Bits256"]]]]],"comp_body":[],"comp_return":null}]}} + {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","ARK"],null],"lentries":[["LibTyp",["Ident",["SimpleLocal","Denom"],null],[{"cname":["Ident",["SimpleLocal","Zil"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","Token"],null],"c_arg_types":[["PrimType",["Bystrx_typ",20]]]}]],["LibTyp",["Ident",["SimpleLocal","Coins"],null],[{"cname":["Ident",["SimpleLocal","Coins"],null],"c_arg_types":[["ADT",["Ident",["SimpleLocal","Denom"],{"fname":"","lnum":0,"cnum":0}],[]],["PrimType",["Uint_typ",["Bits128"]]]]}]],["LibTyp",["Ident",["SimpleLocal","NFT"],null],[{"cname":["Ident",["SimpleLocal","NFT"],null],"c_arg_types":[["Address","Address"],["PrimType",["Uint_typ",["Bits256"]]]]}]],["LibTyp",["Ident",["SimpleLocal","Side"],null],[{"cname":["Ident",["SimpleLocal","Buy"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","Sell"],null],"c_arg_types":[]}]],["LibTyp",["Ident",["SimpleLocal","Cheque"],null],[{"cname":["Ident",["SimpleLocal","Cheque"],null],"c_arg_types":[["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]],["PrimType",["Bnum_typ"]],["PrimType",["Uint_typ",["Bits128"]]],["PrimType",["Bystrx_typ",33]],["PrimType",["Bystrx_typ",64]]]}]],["LibTyp",["Ident",["SimpleLocal","Action"],null],[{"cname":["Ident",["SimpleLocal","Execute"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","Void"],null],"c_arg_types":[]}]],["LibVar",["Ident",["SimpleLocal","zero"],null],null,[["Literal","0"],null]],["LibVar",["Ident",["SimpleLocal","none"],null],null,[["Constr",["Ident",["SimpleLocal","None"],null],[["PrimType",["Bystrx_typ",20]]],[]],null]],["LibVar",["Ident",["SimpleLocal","true"],null],null,[["Constr",["Ident",["SimpleLocal","True"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","buy"],null],null,[["Constr",["Ident",["SimpleLocal","Buy"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","sell"],null],null,[["Constr",["Ident",["SimpleLocal","Sell"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","zil"],null],null,[["Constr",["Ident",["SimpleLocal","Zil"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","signed_message_prefix"],null],null,[["Literal","Zilliqa Signed Message ("],null]],["LibVar",["Ident",["SimpleLocal","signed_message_suffix"],null],null,[["Literal","):\n"],null]],["LibVar",["Ident",["SimpleLocal","execute_prefix"],null],null,[["Literal","Execute ARK Cheque "],null]],["LibVar",["Ident",["SimpleLocal","void_prefix"],null],null,[["Literal","Void ARK Cheque "],null]],["LibVar",["Ident",["SimpleLocal","execute"],null],null,[["Constr",["Ident",["SimpleLocal","Execute"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","void"],null],null,[["Constr",["Ident",["SimpleLocal","Void"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","one_msg"],null],null,[["Fun",["Ident",["SimpleLocal","msg"],null],["PrimType",["Msg_typ"]],[["Let",["Ident",["SimpleLocal","nil_msg"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["PrimType",["Msg_typ"]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg"],null],["Ident",["SimpleLocal","nil_msg"],null]]],null]],null]],null]],["LibTyp",["Ident",["SimpleLocal","Error"],null],[{"cname":["Ident",["SimpleLocal","CodeNotOwner"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeNotPendingOwner"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodePendingOwnerNotEmpty"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeTokenProxyNotSet"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeTokenProxyAlreadySet"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeSignatureInvalid"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeChequeAlreadyVoided"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeChequeExpired"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeInvalidPrice"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeInvalidFee"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeInvalidSide"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","CodeInvalidOwner"],null],"c_arg_types":[]}]],["LibVar",["Ident",["SimpleLocal","make_error"],null],null,[["Fun",["Ident",["SimpleLocal","result"],null],["ADT",["Ident",["SimpleLocal","Error"],{"fname":"","lnum":0,"cnum":0}],[]],[["Let",["Ident",["SimpleLocal","result_code"],null],null,[["MatchExpr",["Ident",["SimpleLocal","result"],null],[[["Constructor",["Ident",["SimpleLocal","CodeNotOwner"],null],[]],[["Literal","-1"],null]],[["Constructor",["Ident",["SimpleLocal","CodeNotPendingOwner"],null],[]],[["Literal","-2"],null]],[["Constructor",["Ident",["SimpleLocal","CodePendingOwnerNotEmpty"],null],[]],[["Literal","-3"],null]],[["Constructor",["Ident",["SimpleLocal","CodeTokenProxyNotSet"],null],[]],[["Literal","-4"],null]],[["Constructor",["Ident",["SimpleLocal","CodeTokenProxyAlreadySet"],null],[]],[["Literal","-5"],null]],[["Constructor",["Ident",["SimpleLocal","CodeSignatureInvalid"],null],[]],[["Literal","-6"],null]],[["Constructor",["Ident",["SimpleLocal","CodeChequeAlreadyVoided"],null],[]],[["Literal","-7"],null]],[["Constructor",["Ident",["SimpleLocal","CodeChequeExpired"],null],[]],[["Literal","-8"],null]],[["Constructor",["Ident",["SimpleLocal","CodeInvalidPrice"],null],[]],[["Literal","-9"],null]],[["Constructor",["Ident",["SimpleLocal","CodeInvalidFee"],null],[]],[["Literal","-10"],null]],[["Constructor",["Ident",["SimpleLocal","CodeInvalidSide"],null],[]],[["Literal","-11"],null]],[["Constructor",["Ident",["SimpleLocal","CodeInvalidOwner"],null],[]],[["Literal","-12"],null]]]],null],[["Message",[["_exception",["MLit","Error"]],["code",["MVar",["Ident",["SimpleLocal","result_code"],null]]]]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","get_action_prefix"],null],null,[["Fun",["Ident",["SimpleLocal","action"],null],["ADT",["Ident",["SimpleLocal","Action"],{"fname":"","lnum":0,"cnum":0}],[]],[["MatchExpr",["Ident",["SimpleLocal","action"],null],[[["Constructor",["Ident",["SimpleLocal","Execute"],null],[]],[["Var",["Ident",["SimpleLocal","execute_prefix"],null]],null]],[["Constructor",["Ident",["SimpleLocal","Void"],null],[]],[["Var",["Ident",["SimpleLocal","void_prefix"],null]],null]]]],null]],null]],["LibVar",["Ident",["SimpleLocal","get_account"],null],null,[["Fun",["Ident",["SimpleLocal","cheque"],null],["ADT",["Ident",["SimpleLocal","Cheque"],{"fname":"","lnum":0,"cnum":0}],[]],[["MatchExpr",["Ident",["SimpleLocal","cheque"],null],[[["Constructor",["Ident",["SimpleLocal","Cheque"],null],[["Binder",["Ident",["SimpleLocal","direction"],null]],["Binder",["Ident",["SimpleLocal","expiry"],null]],["Binder",["Ident",["SimpleLocal","nonce"],null]],["Binder",["Ident",["SimpleLocal","pubkey"],null]],["Binder",["Ident",["SimpleLocal","signature"],null]]]],[["Builtin",[["Builtin_schnorr_get_address"],null],[],[["Ident",["SimpleLocal","pubkey"],null]]],null]]]],null]],null]],["LibVar",["Ident",["SimpleLocal","get_amount"],null],null,[["Fun",["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]],[["MatchExpr",["Ident",["SimpleLocal","price"],null],[[["Constructor",["Ident",["SimpleLocal","Coins"],null],[["Binder",["Ident",["SimpleLocal","denom"],null]],["Binder",["Ident",["SimpleLocal","amount"],null]]]],[["Var",["Ident",["SimpleLocal","amount"],null]],null]]]],null]],null]],["LibVar",["Ident",["SimpleLocal","get_cheque_hash"],null],null,[["Fun",["Ident",["SimpleLocal","contract_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","direction"],null],["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]],[["Fun",["Ident",["SimpleLocal","token"],null],["ADT",["Ident",["SimpleLocal","NFT"],{"fname":"","lnum":0,"cnum":0}],[]],[["Fun",["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]],[["Fun",["Ident",["SimpleLocal","fee_amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Fun",["Ident",["SimpleLocal","expiry"],null],["PrimType",["Bnum_typ"]],[["Fun",["Ident",["SimpleLocal","nonce"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Let",["Ident",["SimpleLocal","dir_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","direction"],null]]],null],[["Let",["Ident",["SimpleLocal","token_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","token"],null]]],null],[["Let",["Ident",["SimpleLocal","price_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","price"],null]]],null],[["Let",["Ident",["SimpleLocal","fee_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","fee_amount"],null]]],null],[["Let",["Ident",["SimpleLocal","expiry_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","expiry"],null]]],null],[["Let",["Ident",["SimpleLocal","nonce_hash"],null],null,[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","nonce"],null]]],null],[["Let",["Ident",["SimpleLocal","p0"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","contract_address"],null],["Ident",["SimpleLocal","dir_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p1"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p0"],null],["Ident",["SimpleLocal","token_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p2"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p1"],null],["Ident",["SimpleLocal","price_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p3"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p2"],null],["Ident",["SimpleLocal","fee_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p4"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p3"],null],["Ident",["SimpleLocal","expiry_hash"],null]]],null],[["Let",["Ident",["SimpleLocal","p5"],null],null,[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","p4"],null],["Ident",["SimpleLocal","nonce_hash"],null]]],null],[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","p5"],null]]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]]]},"elibs":[[["Ident",["SimpleLocal","IntUtils"],null],null],[["Ident",["SimpleLocal","ListUtils"],null],null]],"contr":{"cname":["Ident",["SimpleLocal","ARK"],null],"cparams":[[["Ident",["SimpleLocal","contract_owner"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","initial_fee_address"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","chain_id"],null],["PrimType",["Uint_typ",["Bits32"]]]]],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[[["Ident",["SimpleLocal","current_owner"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Bystrx_typ",20]]]],[["Constr",["Ident",["SimpleLocal","Some"],null],[["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","contract_owner"],null]]],null]],[["Ident",["SimpleLocal","pending_owner"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Bystrx_typ",20]]]],[["Var",["Ident",["SimpleLocal","none"],null]],null]],[["Ident",["SimpleLocal","token_proxy"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Bystrx_typ",20]]]],[["Var",["Ident",["SimpleLocal","none"],null]],null]],[["Ident",["SimpleLocal","fee_address"],null],["PrimType",["Bystrx_typ",20]],[["Var",["Ident",["SimpleLocal","initial_fee_address"],null]],null]],[["Ident",["SimpleLocal","voided_cheques"],null],["MapType",["PrimType",["Bystrx_typ",33]],["MapType",["PrimType",["Bystrx_typ",32]],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Literal",{"mtype":[["PrimType",["Bystrx_typ",33]],["MapType",["PrimType",["Bystrx_typ",32]],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],"data":[]}],null]]],"ccomps":[{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","ThrowError"],null],"comp_params":[[["Ident",["SimpleLocal","err"],null],["ADT",["Ident",["SimpleLocal","Error"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["App",["Ident",["SimpleLocal","make_error"],null],[["Ident",["SimpleLocal","err"],null]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsOwner"],null],"comp_params":[[["Ident",["SimpleLocal","address"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["Load",["Ident",["SimpleLocal","maybe_current_owner"],null],["Ident",["SimpleLocal","current_owner"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_current_owner"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","current_contract_owner"],null]]]],[[["Bind",["Ident",["SimpleLocal","is_owner"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","current_contract_owner"],null],["Ident",["SimpleLocal","address"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_owner"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeNotOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeNotOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsPendingOwner"],null],"comp_params":[[["Ident",["SimpleLocal","address"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["Load",["Ident",["SimpleLocal","maybe_pending_owner"],null],["Ident",["SimpleLocal","pending_owner"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_pending_owner"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","current_pending_owner"],null]]]],[[["Bind",["Ident",["SimpleLocal","is_pending_owner"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","current_pending_owner"],null],["Ident",["SimpleLocal","address"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_pending_owner"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeNotPendingOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeNotPendingOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","NoPendingOwner"],null],"comp_params":[],"comp_body":[[["Load",["Ident",["SimpleLocal","maybe_pending_owner"],null],["Ident",["SimpleLocal","pending_owner"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_pending_owner"],null],[[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","p"],null]]]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodePendingOwnerNotEmpty"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsNotExpired"],null],"comp_params":[[["Ident",["SimpleLocal","expiry"],null],["PrimType",["Bnum_typ"]]]],"comp_body":[[["ReadFromBC",["Ident",["SimpleLocal","current_block"],null],["CurBlockNum"]],null],[["Bind",["Ident",["SimpleLocal","is_not_expired"],null],[["Builtin",[["Builtin_blt"],null],[],[["Ident",["SimpleLocal","current_block"],null],["Ident",["SimpleLocal","expiry"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_not_expired"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","TransactionExpired"]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsValidPrice"],null],"comp_params":[[["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","amount"],null],[["App",["Ident",["SimpleLocal","get_amount"],null],[["Ident",["SimpleLocal","price"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","is_zero"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","zero"],null],["Ident",["SimpleLocal","amount"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_zero"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidPrice"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsValidFee"],null],"comp_params":[[["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","fee"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","amount"],null],[["App",["Ident",["SimpleLocal","get_amount"],null],[["Ident",["SimpleLocal","price"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","is_valid"],null],[["Builtin",[["Builtin_lt"],null],[],[["Ident",["SimpleLocal","fee"],null],["Ident",["SimpleLocal","amount"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_valid"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidFee"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsValidSide"],null],"comp_params":[[["Ident",["SimpleLocal","s1"],null],["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","s2"],null],["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["MatchStmt",["Ident",["SimpleLocal","s1"],null],[[["Constructor",["Ident",["SimpleLocal","Buy"],null],[]],[[["MatchStmt",["Ident",["SimpleLocal","s2"],null],[[["Constructor",["Ident",["SimpleLocal","Buy"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","Sell"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidSide"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","Sell"],null],[]],[[["MatchStmt",["Ident",["SimpleLocal","s2"],null],[[["Constructor",["Ident",["SimpleLocal","Sell"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","Buy"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidSide"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsNotVoided"],null],"comp_params":[[["Ident",["SimpleLocal","cheque_hash"],null],["PrimType",["Bystrx_typ",32]]],[["Ident",["SimpleLocal","pubkey"],null],["PrimType",["Bystrx_typ",33]]]],"comp_body":[[["MapGet",["Ident",["SimpleLocal","cheque_voided"],null],["Ident",["SimpleLocal","voided_cheques"],null],[["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","cheque_hash"],null]],false],null],[["MatchStmt",["Ident",["SimpleLocal","cheque_voided"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeChequeAlreadyVoided"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","IsValidSignature"],null],"comp_params":[[["Ident",["SimpleLocal","action"],null],["ADT",["Ident",["SimpleLocal","Action"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","cheque_hash"],null],["PrimType",["Bystrx_typ",32]]],[["Ident",["SimpleLocal","pubkey"],null],["PrimType",["Bystrx_typ",33]]],[["Ident",["SimpleLocal","signature"],null],["PrimType",["Bystrx_typ",64]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","hex_hash"],null],[["Builtin",[["Builtin_to_string"],null],[],[["Ident",["SimpleLocal","cheque_hash"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","action_prefix"],null],[["App",["Ident",["SimpleLocal","get_action_prefix"],null],[["Ident",["SimpleLocal","action"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","action_string"],null],[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","action_prefix"],null],["Ident",["SimpleLocal","hex_hash"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","chain_id_string"],null],[["Builtin",[["Builtin_to_string"],null],[],[["Ident",["SimpleLocal","chain_id"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","message_header"],null],[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","signed_message_prefix"],null],["Ident",["SimpleLocal","chain_id_string"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","message_header"],null],[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","message_header"],null],["Ident",["SimpleLocal","signed_message_suffix"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","message_string"],null],[["Builtin",[["Builtin_concat"],null],[],[["Ident",["SimpleLocal","message_header"],null],["Ident",["SimpleLocal","action_string"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","signed_hash"],null],[["Builtin",[["Builtin_sha256hash"],null],[],[["Ident",["SimpleLocal","message_string"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","signed_data"],null],[["Builtin",[["Builtin_to_bystr"],null],[],[["Ident",["SimpleLocal","signed_hash"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","valid_sig"],null],[["Builtin",[["Builtin_schnorr_verify"],null],[],[["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","signed_data"],null],["Ident",["SimpleLocal","signature"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","valid_sig"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeSignatureInvalid"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","ValidateAndConsumeCheque"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["ADT",["Ident",["SimpleLocal","NFT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","fee_amount"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","valid_direction"],null],["ADT",["Ident",["SimpleLocal","Side"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","cheque"],null],["ADT",["Ident",["SimpleLocal","Cheque"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["MatchStmt",["Ident",["SimpleLocal","cheque"],null],[[["Constructor",["Ident",["SimpleLocal","Cheque"],null],[["Binder",["Ident",["SimpleLocal","direction"],null]],["Binder",["Ident",["SimpleLocal","expiry"],null]],["Binder",["Ident",["SimpleLocal","nonce"],null]],["Binder",["Ident",["SimpleLocal","pubkey"],null]],["Binder",["Ident",["SimpleLocal","signature"],null]]]],[[["CallProc",null,["Ident",["SimpleLocal","IsValidPrice"],null],[["Ident",["SimpleLocal","price"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsValidSide"],null],[["Ident",["SimpleLocal","valid_direction"],null],["Ident",["SimpleLocal","direction"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsNotExpired"],null],[["Ident",["SimpleLocal","expiry"],null]]],null],[["Bind",["Ident",["SimpleLocal","cheque_hash"],null],[["App",["Ident",["SimpleLocal","get_cheque_hash"],null],[["Ident",["SimpleLocal","_this_address"],null],["Ident",["SimpleLocal","direction"],null],["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","price"],null],["Ident",["SimpleLocal","fee_amount"],null],["Ident",["SimpleLocal","expiry"],null],["Ident",["SimpleLocal","nonce"],null]]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","IsNotVoided"],null],[["Ident",["SimpleLocal","cheque_hash"],null],["Ident",["SimpleLocal","pubkey"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsValidSignature"],null],[["Ident",["SimpleLocal","execute"],null],["Ident",["SimpleLocal","cheque_hash"],null],["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","signature"],null]]],null],[["MapUpdate",["Ident",["SimpleLocal","voided_cheques"],null],[["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","cheque_hash"],null]],["Ident",["SimpleLocal","true"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","TransferCoins"],null],"comp_params":[[["Ident",["SimpleLocal","coins"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["MatchStmt",["Ident",["SimpleLocal","coins"],null],[[["Constructor",["Ident",["SimpleLocal","Coins"],null],[["Binder",["Ident",["SimpleLocal","denom"],null]],["Binder",["Ident",["SimpleLocal","amount"],null]]]],[[["MatchStmt",["Ident",["SimpleLocal","denom"],null],[[["Constructor",["Ident",["SimpleLocal","Zil"],null],[]],[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit","AddFunds"]],["_recipient",["MVar",["Ident",["SimpleLocal","to"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","amount"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]]],[["Constructor",["Ident",["SimpleLocal","Token"],null],[["Binder",["Ident",["SimpleLocal","token"],null]]]],[[["Load",["Ident",["SimpleLocal","maybe_token_proxy"],null],["Ident",["SimpleLocal","token_proxy"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_token_proxy"],null],[[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeTokenProxyNotSet"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","t"],null]]]],[[["Bind",["Ident",["SimpleLocal","msg_to_token_proxy"],null],[["Message",[["_tag",["MLit","TransferFrom"]],["_recipient",["MVar",["Ident",["SimpleLocal","t"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","zero"],null]]],["token",["MVar",["Ident",["SimpleLocal","token"],null]]],["from",["MVar",["Ident",["SimpleLocal","from"],null]]],["to",["MVar",["Ident",["SimpleLocal","to"],null]]],["amount",["MVar",["Ident",["SimpleLocal","amount"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg_to_token_proxy"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]]]]],null]]]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","TransferNFT"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["ADT",["Ident",["SimpleLocal","NFT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["MatchStmt",["Ident",["SimpleLocal","token"],null],[[["Constructor",["Ident",["SimpleLocal","NFT"],null],[["Binder",["Ident",["SimpleLocal","token_address"],null]],["Binder",["Ident",["SimpleLocal","token_id"],null]]]],[[["RemoteMapGet",["Ident",["SimpleLocal","maybe_token_owner"],null],["Ident",["SimpleLocal","token_address"],null],["Ident",["SimpleLocal","token_owners"],null],["Mutable"],[["Ident",["SimpleLocal","token_id"],null]],true],null],[["MatchStmt",["Ident",["SimpleLocal","maybe_token_owner"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","token_owner"],null]]]],[[["Bind",["Ident",["SimpleLocal","is_valid_owner"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","token_owner"],null],["Ident",["SimpleLocal","from"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_valid_owner"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null],[["Bind",["Ident",["SimpleLocal","msg_to_token"],null],[["Message",[["_tag",["MLit","TransferFrom"]],["_recipient",["MVar",["Ident",["SimpleLocal","token_address"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","zero"],null]]],["to",["MVar",["Ident",["SimpleLocal","to"],null]]],["token_id",["MVar",["Ident",["SimpleLocal","token_id"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg_to_token"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ExecuteTrade"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["ADT",["Ident",["SimpleLocal","NFT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","price"],null],["ADT",["Ident",["SimpleLocal","Coins"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","fee_amount"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","sell_cheque"],null],["ADT",["Ident",["SimpleLocal","Cheque"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","buy_cheque"],null],["ADT",["Ident",["SimpleLocal","Cheque"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","ValidateAndConsumeCheque"],null],[["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","price"],null],["Ident",["SimpleLocal","fee_amount"],null],["Ident",["SimpleLocal","sell"],null],["Ident",["SimpleLocal","sell_cheque"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","ValidateAndConsumeCheque"],null],[["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","price"],null],["Ident",["SimpleLocal","zero"],null],["Ident",["SimpleLocal","buy"],null],["Ident",["SimpleLocal","buy_cheque"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsValidFee"],null],[["Ident",["SimpleLocal","price"],null],["Ident",["SimpleLocal","fee_amount"],null]]],null],[["MatchStmt",["Ident",["SimpleLocal","price"],null],[[["Constructor",["Ident",["SimpleLocal","Coins"],null],[["Binder",["Ident",["SimpleLocal","denom"],null]],["Binder",["Ident",["SimpleLocal","amount"],null]]]],[[["Load",["Ident",["SimpleLocal","fee_receiver"],null],["Ident",["SimpleLocal","fee_address"],null]],null],[["Bind",["Ident",["SimpleLocal","seller"],null],[["App",["Ident",["SimpleLocal","get_account"],null],[["Ident",["SimpleLocal","sell_cheque"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","buyer"],null],[["App",["Ident",["SimpleLocal","get_account"],null],[["Ident",["SimpleLocal","buy_cheque"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","seller_receive_amount"],null],[["Builtin",[["Builtin_sub"],null],[],[["Ident",["SimpleLocal","amount"],null],["Ident",["SimpleLocal","fee_amount"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","seller_receive_coins"],null],[["Constr",["Ident",["SimpleLocal","Coins"],null],[],[["Ident",["SimpleLocal","denom"],null],["Ident",["SimpleLocal","seller_receive_amount"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","fee_receive_coins"],null],[["Constr",["Ident",["SimpleLocal","Coins"],null],[],[["Ident",["SimpleLocal","denom"],null],["Ident",["SimpleLocal","fee_amount"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","denom"],null],[[["Constructor",["Ident",["SimpleLocal","Zil"],null],[]],[[["Bind",["Ident",["SimpleLocal","receiving_from_buyer"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","buyer"],null],["Ident",["SimpleLocal","_sender"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","receiving_from_buyer"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidPrice"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null],[["Bind",["Ident",["SimpleLocal","correct_amount"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","_amount"],null],["Ident",["SimpleLocal","amount"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","correct_amount"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeInvalidPrice"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]]]],null],[["AcceptPayment"],null]]],[["Wildcard"],[]]]],null],[["CallProc",null,["Ident",["SimpleLocal","TransferCoins"],null],[["Ident",["SimpleLocal","seller_receive_coins"],null],["Ident",["SimpleLocal","buyer"],null],["Ident",["SimpleLocal","seller"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","TransferCoins"],null],[["Ident",["SimpleLocal","fee_receive_coins"],null],["Ident",["SimpleLocal","buyer"],null],["Ident",["SimpleLocal","fee_receiver"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","TransferNFT"],null],[["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","seller"],null],["Ident",["SimpleLocal","buyer"],null]]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","ExecuteTradeSuccess"]],["initiator",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["token",["MVar",["Ident",["SimpleLocal","token"],null]]],["seller",["MVar",["Ident",["SimpleLocal","seller"],null]]],["buyer",["MVar",["Ident",["SimpleLocal","buyer"],null]]],["proceeds",["MVar",["Ident",["SimpleLocal","seller_receive_coins"],null]]],["fees",["MVar",["Ident",["SimpleLocal","fee_receive_coins"],null]]],["sell_cheque",["MVar",["Ident",["SimpleLocal","sell_cheque"],null]]],["buy_cheque",["MVar",["Ident",["SimpleLocal","buy_cheque"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","VoidCheque"],null],"comp_params":[[["Ident",["SimpleLocal","cheque_hash"],null],["PrimType",["Bystrx_typ",32]]],[["Ident",["SimpleLocal","pubkey"],null],["PrimType",["Bystrx_typ",33]]],[["Ident",["SimpleLocal","signature"],null],["PrimType",["Bystrx_typ",64]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsNotVoided"],null],[["Ident",["SimpleLocal","cheque_hash"],null],["Ident",["SimpleLocal","pubkey"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","IsValidSignature"],null],[["Ident",["SimpleLocal","void"],null],["Ident",["SimpleLocal","cheque_hash"],null],["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","signature"],null]]],null],[["MapUpdate",["Ident",["SimpleLocal","voided_cheques"],null],[["Ident",["SimpleLocal","pubkey"],null],["Ident",["SimpleLocal","cheque_hash"],null]],["Ident",["SimpleLocal","true"],null]],null],[["Bind",["Ident",["SimpleLocal","from"],null],[["Builtin",[["Builtin_schnorr_get_address"],null],[],[["Ident",["SimpleLocal","pubkey"],null]]],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","VoidChequeSuccess"]],["initiator",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["sender",["MVar",["Ident",["SimpleLocal","from"],null]]],["cheque_hash",["MVar",["Ident",["SimpleLocal","cheque_hash"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","SetTokenProxy"],null],"comp_params":[[["Ident",["SimpleLocal","address"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsOwner"],null],[["Ident",["SimpleLocal","_sender"],null]]],null],[["Load",["Ident",["SimpleLocal","t"],null],["Ident",["SimpleLocal","token_proxy"],null]],null],[["MatchStmt",["Ident",["SimpleLocal","t"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Wildcard"]]],[[["Bind",["Ident",["SimpleLocal","err"],null],[["Constr",["Ident",["SimpleLocal","CodeTokenProxyAlreadySet"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","ThrowError"],null],[["Ident",["SimpleLocal","err"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","new_token_proxy"],null],[["Constr",["Ident",["SimpleLocal","Some"],null],[["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","address"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","token_proxy"],null],["Ident",["SimpleLocal","new_token_proxy"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","SetTokenProxySuccess"]],["token_proxy",["MVar",["Ident",["SimpleLocal","address"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","TransferOwnership"],null],"comp_params":[[["Ident",["SimpleLocal","new_owner"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsOwner"],null],[["Ident",["SimpleLocal","_sender"],null]]],null],[["Bind",["Ident",["SimpleLocal","o"],null],[["Constr",["Ident",["SimpleLocal","Some"],null],[["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","new_owner"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","pending_owner"],null],["Ident",["SimpleLocal","o"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","OwnershipTransferInitiated"]],["current_owner",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["pending_owner",["MVar",["Ident",["SimpleLocal","new_owner"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","AcceptOwnership"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsPendingOwner"],null],[["Ident",["SimpleLocal","_sender"],null]]],null],[["Load",["Ident",["SimpleLocal","previous_current_owner"],null],["Ident",["SimpleLocal","current_owner"],null]],null],[["Bind",["Ident",["SimpleLocal","o"],null],[["Constr",["Ident",["SimpleLocal","Some"],null],[["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","_sender"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","current_owner"],null],["Ident",["SimpleLocal","o"],null]],null],[["Store",["Ident",["SimpleLocal","pending_owner"],null],["Ident",["SimpleLocal","none"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","OwnershipTransferAccepted"]],["previous_current_owner",["MVar",["Ident",["SimpleLocal","previous_current_owner"],null]]],["current_owner",["MVar",["Ident",["SimpleLocal","_sender"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","RevokeOwnership"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","IsOwner"],null],[["Ident",["SimpleLocal","_sender"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","NoPendingOwner"],null],[]],null],[["Store",["Ident",["SimpleLocal","current_owner"],null],["Ident",["SimpleLocal","none"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","OwnershipRevoked"]],["current_owner",["MVar",["Ident",["SimpleLocal","_sender"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","TransferFromSuccessCallBack"],null],"comp_params":[[["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","token_id"],null],["PrimType",["Uint_typ",["Bits256"]]]]],"comp_body":[],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ZRC6_TransferFromCallback"],null],"comp_params":[[["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","token_id"],null],["PrimType",["Uint_typ",["Bits256"]]]]],"comp_body":[],"comp_return":null}]}} diff --git a/tests/formatter/to_json/codehash.t/run.t b/tests/formatter/to_json/codehash.t/run.t index 4c6d7c866..c112a2629 100644 --- a/tests/formatter/to_json/codehash.t/run.t +++ b/tests/formatter/to_json/codehash.t/run.t @@ -1,2 +1,2 @@ $ scilla-fmt --json --deannot codehash.scilla - {"smver":0,"libs":null,"elibs":[],"contr":{"cname":["Ident",["SimpleLocal","Codehash"],null],"cparams":[],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[],"ccomps":[{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","foo"],null],"comp_params":[[["Ident",["SimpleLocal","addr"],null],["Address","Address"]]],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","bar"],null],["Ident",["SimpleLocal","addr"],null],["Ident",["SimpleLocal","_codehash"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Success"]],["bar",["MVar",["Ident",["SimpleLocal","bar"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","foo2"],null],"comp_params":[[["Ident",["SimpleLocal","addr"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["TypeCast",["Ident",["SimpleLocal","addr_"],null],["Ident",["SimpleLocal","addr"],null],["Address","Address"]],null],[["MatchStmt",["Ident",["SimpleLocal","addr_"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","addr__"],null]]]],[[["RemoteLoad",["Ident",["SimpleLocal","bar"],null],["Ident",["SimpleLocal","addr__"],null],["Ident",["SimpleLocal","_codehash"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Success"]],["bar",["MVar",["Ident",["SimpleLocal","bar"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Failure"]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","foo3"],null],"comp_params":[[["Ident",["SimpleLocal","addr"],null],["Address","Address"]]],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","bar"],null],["Ident",["SimpleLocal","addr"],null],["Ident",["SimpleLocal","_codehash"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Success"]],["bar",["MVar",["Ident",["SimpleLocal","bar"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","foo4"],null],"comp_params":[[["Ident",["SimpleLocal","addr"],null],["Address","Address"]]],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","bar"],null],["Ident",["SimpleLocal","addr"],null],["Ident",["SimpleLocal","_codehash"],null]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Success"]],["bar",["MVar",["Ident",["SimpleLocal","bar"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null}]}} + {"smver":0,"libs":null,"elibs":[],"contr":{"cname":["Ident",["SimpleLocal","Codehash"],null],"cparams":[],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[],"ccomps":[{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","foo"],null],"comp_params":[[["Ident",["SimpleLocal","addr"],null],["Address","Address"]]],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","bar"],null],["Ident",["SimpleLocal","addr"],null],["Ident",["SimpleLocal","_codehash"],null],["Mutable"]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Success"]],["bar",["MVar",["Ident",["SimpleLocal","bar"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","foo2"],null],"comp_params":[[["Ident",["SimpleLocal","addr"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["TypeCast",["Ident",["SimpleLocal","addr_"],null],["Ident",["SimpleLocal","addr"],null],["Address","Address"]],null],[["MatchStmt",["Ident",["SimpleLocal","addr_"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","addr__"],null]]]],[[["RemoteLoad",["Ident",["SimpleLocal","bar"],null],["Ident",["SimpleLocal","addr__"],null],["Ident",["SimpleLocal","_codehash"],null],["Mutable"]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Success"]],["bar",["MVar",["Ident",["SimpleLocal","bar"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Failure"]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","foo3"],null],"comp_params":[[["Ident",["SimpleLocal","addr"],null],["Address","Address"]]],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","bar"],null],["Ident",["SimpleLocal","addr"],null],["Ident",["SimpleLocal","_codehash"],null],["Mutable"]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Success"]],["bar",["MVar",["Ident",["SimpleLocal","bar"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","foo4"],null],"comp_params":[[["Ident",["SimpleLocal","addr"],null],["Address","Address"]]],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","bar"],null],["Ident",["SimpleLocal","addr"],null],["Ident",["SimpleLocal","_codehash"],null],["Mutable"]],null],[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_eventname",["MLit","Success"]],["bar",["MVar",["Ident",["SimpleLocal","bar"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null}]}} diff --git a/tests/formatter/to_json/crowdfunding_governor.t/run.t b/tests/formatter/to_json/crowdfunding_governor.t/run.t index 2c30e12e7..6586e1eca 100644 --- a/tests/formatter/to_json/crowdfunding_governor.t/run.t +++ b/tests/formatter/to_json/crowdfunding_governor.t/run.t @@ -1,2 +1,2 @@ $ scilla-fmt --json --deannot crowdfunding_governor.scilla - {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","CrowdfundingGovernor"],null],"lentries":[["LibVar",["Ident",["SimpleLocal","zero"],null],null,[["Literal","0"],null]],["LibVar",["Ident",["SimpleLocal","one_msg"],null],null,[["Fun",["Ident",["SimpleLocal","msg"],null],["PrimType",["Msg_typ"]],[["Let",["Ident",["SimpleLocal","nil_msg"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["PrimType",["Msg_typ"]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg"],null],["Ident",["SimpleLocal","nil_msg"],null]]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","deadline_passed"],null],null,[["Fun",["Ident",["SimpleLocal","cur_block"],null],["PrimType",["Bnum_typ"]],[["Fun",["Ident",["SimpleLocal","max_block"],null],["PrimType",["Bnum_typ"]],[["Builtin",[["Builtin_blt"],null],[],[["Ident",["SimpleLocal","max_block"],null],["Ident",["SimpleLocal","cur_block"],null]]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","target_not_reached"],null],null,[["Fun",["Ident",["SimpleLocal","balance"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Fun",["Ident",["SimpleLocal","goal"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Builtin",[["Builtin_lt"],null],[],[["Ident",["SimpleLocal","balance"],null],["Ident",["SimpleLocal","goal"],null]]],null]],null]],null]],["LibTyp",["Ident",["SimpleLocal","Error"],null],[{"cname":["Ident",["SimpleLocal","SenderIsNotContractOwner"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","SenderAlreadyDonated"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","SenderHasNotDonated"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","DeadlineHasNotPassedYet"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","DeadlineHasPassed"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","TargetIsReached"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","TargetIsNotReached"],null],"c_arg_types":[]}]],["LibVar",["Ident",["SimpleLocal","make_error"],null],null,[["Fun",["Ident",["SimpleLocal","result"],null],["ADT",["Ident",["SimpleLocal","Error"],{"fname":"","lnum":0,"cnum":0}],[]],[["Let",["Ident",["SimpleLocal","result_code"],null],null,[["MatchExpr",["Ident",["SimpleLocal","result"],null],[[["Constructor",["Ident",["SimpleLocal","SenderIsNotContractOwner"],null],[]],[["Literal","-1"],null]],[["Constructor",["Ident",["SimpleLocal","SenderAlreadyDonated"],null],[]],[["Literal","-2"],null]],[["Constructor",["Ident",["SimpleLocal","SenderHasNotDonated"],null],[]],[["Literal","-3"],null]],[["Constructor",["Ident",["SimpleLocal","DeadlineHasNotPassedYet"],null],[]],[["Literal","-4"],null]],[["Constructor",["Ident",["SimpleLocal","DeadlineHasPassed"],null],[]],[["Literal","-5"],null]],[["Constructor",["Ident",["SimpleLocal","TargetIsReached"],null],[]],[["Literal","-6"],null]],[["Constructor",["Ident",["SimpleLocal","TargetIsNotReached"],null],[]],[["Literal","-7"],null]]]],null],[["Message",[["_exception",["MLit","Error"]],["code",["MVar",["Ident",["SimpleLocal","result_code"],null]]]]],null]],null]],null]]]},"elibs":[],"contr":{"cname":["Ident",["SimpleLocal","CrowdfundingGovernor"],null],"cparams":[[["Ident",["SimpleLocal","contract_owner"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","max_block"],null],["PrimType",["Bnum_typ"]]],[["Ident",["SimpleLocal","goal"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","storage"],null],["Address","Address"]]],"cconstraint":[["Let",["Ident",["SimpleLocal","zero"],null],null,[["Literal","0"],null],[["Builtin",[["Builtin_lt"],null],[],[["Ident",["SimpleLocal","zero"],null],["Ident",["SimpleLocal","goal"],null]]],null]],null],"cfields":[],"ccomps":[{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","Throw"],null],"comp_params":[[["Ident",["SimpleLocal","error"],null],["ADT",["Ident",["SimpleLocal","Error"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["App",["Ident",["SimpleLocal","make_error"],null],[["Ident",["SimpleLocal","error"],null]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireContractOwner"],null],"comp_params":[],"comp_body":[[["Bind",["Ident",["SimpleLocal","is_contract_owner"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","contract_owner"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_contract_owner"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","SenderIsNotContractOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","SetBackersKey"],null],"comp_params":[[["Ident",["SimpleLocal","key"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","val"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit","SetBackersKey"]],["_recipient",["MVar",["Ident",["SimpleLocal","storage"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","zero"],null]]],["key",["MVar",["Ident",["SimpleLocal","key"],null]]],["val",["MVar",["Ident",["SimpleLocal","val"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","DeleteBackersKey"],null],"comp_params":[[["Ident",["SimpleLocal","key"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit","DeleteBackersKey"]],["_recipient",["MVar",["Ident",["SimpleLocal","storage"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","zero"],null]]],["key",["MVar",["Ident",["SimpleLocal","key"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireBeforeDeadline"],null],"comp_params":[],"comp_body":[[["ReadFromBC",["Ident",["SimpleLocal","blk"],null],["CurBlockNum"]],null],[["Bind",["Ident",["SimpleLocal","after_deadline"],null],[["App",["Ident",["SimpleLocal","deadline_passed"],null],[["Ident",["SimpleLocal","blk"],null],["Ident",["SimpleLocal","max_block"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","after_deadline"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","DeadlineHasPassed"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireAfterDeadline"],null],"comp_params":[],"comp_body":[[["ReadFromBC",["Ident",["SimpleLocal","blk"],null],["CurBlockNum"]],null],[["Bind",["Ident",["SimpleLocal","after_deadline"],null],[["App",["Ident",["SimpleLocal","deadline_passed"],null],[["Ident",["SimpleLocal","blk"],null],["Ident",["SimpleLocal","max_block"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","after_deadline"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","DeadlineHasNotPassedYet"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireTargetNotReached"],null],"comp_params":[],"comp_body":[[["Load",["Ident",["SimpleLocal","bal"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Bind",["Ident",["SimpleLocal","is_target_not_reached"],null],[["App",["Ident",["SimpleLocal","target_not_reached"],null],[["Ident",["SimpleLocal","bal"],null],["Ident",["SimpleLocal","goal"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_target_not_reached"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","TargetIsReached"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireTargetReached"],null],"comp_params":[],"comp_body":[[["Load",["Ident",["SimpleLocal","bal"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Bind",["Ident",["SimpleLocal","is_target_not_reached"],null],[["App",["Ident",["SimpleLocal","target_not_reached"],null],[["Ident",["SimpleLocal","bal"],null],["Ident",["SimpleLocal","goal"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_target_not_reached"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","TargetIsNotReached"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireSenderHasNotDonated"],null],"comp_params":[],"comp_body":[[["RemoteMapGet",["Ident",["SimpleLocal","already_donated"],null],["Ident",["SimpleLocal","storage"],null],["Ident",["SimpleLocal","backers"],null],[["Ident",["SimpleLocal","_sender"],null]],false],null],[["MatchStmt",["Ident",["SimpleLocal","already_donated"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","SenderAlreadyDonated"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","SendFunds"],null],"comp_params":[[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit","AddFunds"]],["_recipient",["MVar",["Ident",["SimpleLocal","recipient"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","amount"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","Donate"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","RequireBeforeDeadline"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","RequireSenderHasNotDonated"],null],[]],null],[["AcceptPayment"],null],[["CallProc",null,["Ident",["SimpleLocal","SetBackersKey"],null],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_amount"],null]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","GetFunds"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","RequireContractOwner"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","RequireAfterDeadline"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","RequireTargetReached"],null],[]],null],[["Load",["Ident",["SimpleLocal","amount"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["CallProc",null,["Ident",["SimpleLocal","SendFunds"],null],[["Ident",["SimpleLocal","contract_owner"],null],["Ident",["SimpleLocal","amount"],null]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ClaimBack"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","RequireAfterDeadline"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","RequireTargetNotReached"],null],[]],null],[["RemoteMapGet",["Ident",["SimpleLocal","oamount"],null],["Ident",["SimpleLocal","storage"],null],["Ident",["SimpleLocal","backers"],null],[["Ident",["SimpleLocal","_sender"],null]],true],null],[["MatchStmt",["Ident",["SimpleLocal","oamount"],null],[[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","SenderHasNotDonated"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","amount"],null]]]],[[["CallProc",null,["Ident",["SimpleLocal","SendFunds"],null],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","amount"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","DeleteBackersKey"],null],[["Ident",["SimpleLocal","_sender"],null]]],null]]]]],null]],"comp_return":null}]}} + {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","CrowdfundingGovernor"],null],"lentries":[["LibVar",["Ident",["SimpleLocal","zero"],null],null,[["Literal","0"],null]],["LibVar",["Ident",["SimpleLocal","one_msg"],null],null,[["Fun",["Ident",["SimpleLocal","msg"],null],["PrimType",["Msg_typ"]],[["Let",["Ident",["SimpleLocal","nil_msg"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["PrimType",["Msg_typ"]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg"],null],["Ident",["SimpleLocal","nil_msg"],null]]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","deadline_passed"],null],null,[["Fun",["Ident",["SimpleLocal","cur_block"],null],["PrimType",["Bnum_typ"]],[["Fun",["Ident",["SimpleLocal","max_block"],null],["PrimType",["Bnum_typ"]],[["Builtin",[["Builtin_blt"],null],[],[["Ident",["SimpleLocal","max_block"],null],["Ident",["SimpleLocal","cur_block"],null]]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","target_not_reached"],null],null,[["Fun",["Ident",["SimpleLocal","balance"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Fun",["Ident",["SimpleLocal","goal"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Builtin",[["Builtin_lt"],null],[],[["Ident",["SimpleLocal","balance"],null],["Ident",["SimpleLocal","goal"],null]]],null]],null]],null]],["LibTyp",["Ident",["SimpleLocal","Error"],null],[{"cname":["Ident",["SimpleLocal","SenderIsNotContractOwner"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","SenderAlreadyDonated"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","SenderHasNotDonated"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","DeadlineHasNotPassedYet"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","DeadlineHasPassed"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","TargetIsReached"],null],"c_arg_types":[]},{"cname":["Ident",["SimpleLocal","TargetIsNotReached"],null],"c_arg_types":[]}]],["LibVar",["Ident",["SimpleLocal","make_error"],null],null,[["Fun",["Ident",["SimpleLocal","result"],null],["ADT",["Ident",["SimpleLocal","Error"],{"fname":"","lnum":0,"cnum":0}],[]],[["Let",["Ident",["SimpleLocal","result_code"],null],null,[["MatchExpr",["Ident",["SimpleLocal","result"],null],[[["Constructor",["Ident",["SimpleLocal","SenderIsNotContractOwner"],null],[]],[["Literal","-1"],null]],[["Constructor",["Ident",["SimpleLocal","SenderAlreadyDonated"],null],[]],[["Literal","-2"],null]],[["Constructor",["Ident",["SimpleLocal","SenderHasNotDonated"],null],[]],[["Literal","-3"],null]],[["Constructor",["Ident",["SimpleLocal","DeadlineHasNotPassedYet"],null],[]],[["Literal","-4"],null]],[["Constructor",["Ident",["SimpleLocal","DeadlineHasPassed"],null],[]],[["Literal","-5"],null]],[["Constructor",["Ident",["SimpleLocal","TargetIsReached"],null],[]],[["Literal","-6"],null]],[["Constructor",["Ident",["SimpleLocal","TargetIsNotReached"],null],[]],[["Literal","-7"],null]]]],null],[["Message",[["_exception",["MLit","Error"]],["code",["MVar",["Ident",["SimpleLocal","result_code"],null]]]]],null]],null]],null]]]},"elibs":[],"contr":{"cname":["Ident",["SimpleLocal","CrowdfundingGovernor"],null],"cparams":[[["Ident",["SimpleLocal","contract_owner"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","max_block"],null],["PrimType",["Bnum_typ"]]],[["Ident",["SimpleLocal","goal"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","storage"],null],["Address","Address"]]],"cconstraint":[["Let",["Ident",["SimpleLocal","zero"],null],null,[["Literal","0"],null],[["Builtin",[["Builtin_lt"],null],[],[["Ident",["SimpleLocal","zero"],null],["Ident",["SimpleLocal","goal"],null]]],null]],null],"cfields":[],"ccomps":[{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","Throw"],null],"comp_params":[[["Ident",["SimpleLocal","error"],null],["ADT",["Ident",["SimpleLocal","Error"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["App",["Ident",["SimpleLocal","make_error"],null],[["Ident",["SimpleLocal","error"],null]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireContractOwner"],null],"comp_params":[],"comp_body":[[["Bind",["Ident",["SimpleLocal","is_contract_owner"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","contract_owner"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_contract_owner"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","SenderIsNotContractOwner"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","SetBackersKey"],null],"comp_params":[[["Ident",["SimpleLocal","key"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","val"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit","SetBackersKey"]],["_recipient",["MVar",["Ident",["SimpleLocal","storage"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","zero"],null]]],["key",["MVar",["Ident",["SimpleLocal","key"],null]]],["val",["MVar",["Ident",["SimpleLocal","val"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","DeleteBackersKey"],null],"comp_params":[[["Ident",["SimpleLocal","key"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit","DeleteBackersKey"]],["_recipient",["MVar",["Ident",["SimpleLocal","storage"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","zero"],null]]],["key",["MVar",["Ident",["SimpleLocal","key"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireBeforeDeadline"],null],"comp_params":[],"comp_body":[[["ReadFromBC",["Ident",["SimpleLocal","blk"],null],["CurBlockNum"]],null],[["Bind",["Ident",["SimpleLocal","after_deadline"],null],[["App",["Ident",["SimpleLocal","deadline_passed"],null],[["Ident",["SimpleLocal","blk"],null],["Ident",["SimpleLocal","max_block"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","after_deadline"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","DeadlineHasPassed"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireAfterDeadline"],null],"comp_params":[],"comp_body":[[["ReadFromBC",["Ident",["SimpleLocal","blk"],null],["CurBlockNum"]],null],[["Bind",["Ident",["SimpleLocal","after_deadline"],null],[["App",["Ident",["SimpleLocal","deadline_passed"],null],[["Ident",["SimpleLocal","blk"],null],["Ident",["SimpleLocal","max_block"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","after_deadline"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","DeadlineHasNotPassedYet"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireTargetNotReached"],null],"comp_params":[],"comp_body":[[["Load",["Ident",["SimpleLocal","bal"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Bind",["Ident",["SimpleLocal","is_target_not_reached"],null],[["App",["Ident",["SimpleLocal","target_not_reached"],null],[["Ident",["SimpleLocal","bal"],null],["Ident",["SimpleLocal","goal"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_target_not_reached"],null],[[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","TargetIsReached"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireTargetReached"],null],"comp_params":[],"comp_body":[[["Load",["Ident",["SimpleLocal","bal"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Bind",["Ident",["SimpleLocal","is_target_not_reached"],null],[["App",["Ident",["SimpleLocal","target_not_reached"],null],[["Ident",["SimpleLocal","bal"],null],["Ident",["SimpleLocal","goal"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_target_not_reached"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","TargetIsNotReached"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","RequireSenderHasNotDonated"],null],"comp_params":[],"comp_body":[[["RemoteMapGet",["Ident",["SimpleLocal","already_donated"],null],["Ident",["SimpleLocal","storage"],null],["Ident",["SimpleLocal","backers"],null],["Mutable"],[["Ident",["SimpleLocal","_sender"],null]],false],null],[["MatchStmt",["Ident",["SimpleLocal","already_donated"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","SenderAlreadyDonated"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","SendFunds"],null],"comp_params":[[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit","AddFunds"]],["_recipient",["MVar",["Ident",["SimpleLocal","recipient"],null]]],["_amount",["MVar",["Ident",["SimpleLocal","amount"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","Donate"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","RequireBeforeDeadline"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","RequireSenderHasNotDonated"],null],[]],null],[["AcceptPayment"],null],[["CallProc",null,["Ident",["SimpleLocal","SetBackersKey"],null],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_amount"],null]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","GetFunds"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","RequireContractOwner"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","RequireAfterDeadline"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","RequireTargetReached"],null],[]],null],[["Load",["Ident",["SimpleLocal","amount"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["CallProc",null,["Ident",["SimpleLocal","SendFunds"],null],[["Ident",["SimpleLocal","contract_owner"],null],["Ident",["SimpleLocal","amount"],null]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ClaimBack"],null],"comp_params":[],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","RequireAfterDeadline"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","RequireTargetNotReached"],null],[]],null],[["RemoteMapGet",["Ident",["SimpleLocal","oamount"],null],["Ident",["SimpleLocal","storage"],null],["Ident",["SimpleLocal","backers"],null],["Mutable"],[["Ident",["SimpleLocal","_sender"],null]],true],null],[["MatchStmt",["Ident",["SimpleLocal","oamount"],null],[[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Constr",["Ident",["SimpleLocal","SenderHasNotDonated"],null],[],[]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","Throw"],null],[["Ident",["SimpleLocal","e"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","amount"],null]]]],[[["CallProc",null,["Ident",["SimpleLocal","SendFunds"],null],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","amount"],null]]],null],[["CallProc",null,["Ident",["SimpleLocal","DeleteBackersKey"],null],[["Ident",["SimpleLocal","_sender"],null]]],null]]]]],null]],"comp_return":null}]}} diff --git a/tests/formatter/to_json/polymorphic_address.t/run.t b/tests/formatter/to_json/polymorphic_address.t/run.t index eed4f40c9..5e14fb5b0 100644 --- a/tests/formatter/to_json/polymorphic_address.t/run.t +++ b/tests/formatter/to_json/polymorphic_address.t/run.t @@ -1,2 +1,2 @@ $ scilla-fmt --json --deannot polymorphic_address.scilla - {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","AddressListTraversalLib"],null],"lentries":[["LibVar",["Ident",["SimpleLocal","f"],null],["PolyFun","'A",["FunType",["Address","Address"],["Address","Address"]]],[["TFun",["Ident",["SimpleLocal","'A"],null],[["Fun",["Ident",["SimpleLocal","x"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","x"],null]],null]],null]],null]]]},"elibs":[[["Ident",["SimpleLocal","ListUtils"],null],null]],"contr":{"cname":["Ident",["SimpleLocal","AddressListTraversal"],null],"cparams":[],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[[["Ident",["SimpleLocal","res_1"],null],["PrimType",["Uint_typ",["Bits32"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","res_2"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]]],"ccomps":[{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","Test1"],null],"comp_params":[[["Ident",["SimpleLocal","param1"],null],["Address","Address"]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","f_spec"],null],[["TApp",["Ident",["SimpleLocal","f"],null],[["PrimType",["Uint_typ",["Bits32"]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","p1"],null],[["App",["Ident",["SimpleLocal","f_spec"],null],[["Ident",["SimpleLocal","param1"],null]]],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","res"],null],["Ident",["SimpleLocal","p1"],null],["Ident",["SimpleLocal","f"],null]],null],[["Store",["Ident",["SimpleLocal","res_1"],null],["Ident",["SimpleLocal","res"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","Test2"],null],"comp_params":[[["Ident",["SimpleLocal","param1"],null],["Address","Address"]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","f_spec"],null],[["TApp",["Ident",["SimpleLocal","f"],null],[["PrimType",["Uint_typ",["Bits128"]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","p1"],null],[["App",["Ident",["SimpleLocal","f_spec"],null],[["Ident",["SimpleLocal","param1"],null]]],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","res"],null],["Ident",["SimpleLocal","p1"],null],["Ident",["SimpleLocal","f"],null]],null],[["Store",["Ident",["SimpleLocal","res_2"],null],["Ident",["SimpleLocal","res"],null]],null]],"comp_return":null}]}} + {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","AddressListTraversalLib"],null],"lentries":[["LibVar",["Ident",["SimpleLocal","f"],null],["PolyFun","'A",["FunType",["Address","Address"],["Address","Address"]]],[["TFun",["Ident",["SimpleLocal","'A"],null],[["Fun",["Ident",["SimpleLocal","x"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","x"],null]],null]],null]],null]]]},"elibs":[[["Ident",["SimpleLocal","ListUtils"],null],null]],"contr":{"cname":["Ident",["SimpleLocal","AddressListTraversal"],null],"cparams":[],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[[["Ident",["SimpleLocal","res_1"],null],["PrimType",["Uint_typ",["Bits32"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","res_2"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]]],"ccomps":[{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","Test1"],null],"comp_params":[[["Ident",["SimpleLocal","param1"],null],["Address","Address"]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","f_spec"],null],[["TApp",["Ident",["SimpleLocal","f"],null],[["PrimType",["Uint_typ",["Bits32"]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","p1"],null],[["App",["Ident",["SimpleLocal","f_spec"],null],[["Ident",["SimpleLocal","param1"],null]]],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","res"],null],["Ident",["SimpleLocal","p1"],null],["Ident",["SimpleLocal","f"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","res_1"],null],["Ident",["SimpleLocal","res"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","Test2"],null],"comp_params":[[["Ident",["SimpleLocal","param1"],null],["Address","Address"]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","f_spec"],null],[["TApp",["Ident",["SimpleLocal","f"],null],[["PrimType",["Uint_typ",["Bits128"]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","p1"],null],[["App",["Ident",["SimpleLocal","f_spec"],null],[["Ident",["SimpleLocal","param1"],null]]],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","res"],null],["Ident",["SimpleLocal","p1"],null],["Ident",["SimpleLocal","f"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","res_2"],null],["Ident",["SimpleLocal","res"],null]],null]],"comp_return":null}]}} diff --git a/tests/formatter/to_json/remote_state_reads.t/run.t b/tests/formatter/to_json/remote_state_reads.t/run.t index e3339a6f8..52a3e99b7 100644 --- a/tests/formatter/to_json/remote_state_reads.t/run.t +++ b/tests/formatter/to_json/remote_state_reads.t/run.t @@ -1,2 +1,2 @@ $ scilla-fmt --json --deannot remote_state_reads.scilla - {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","RRLib"],null],"lentries":[["LibTyp",["Ident",["SimpleLocal","AddressADT"],null],[{"cname":["Ident",["SimpleLocal","Address1"],null],"c_arg_types":[["Address","Address"]]},{"cname":["Ident",["SimpleLocal","Address2"],null],"c_arg_types":[["Address","Address"]]}]]]},"elibs":[],"contr":{"cname":["Ident",["SimpleLocal","RRContract"],null],"cparams":[[["Ident",["SimpleLocal","cparam1"],null],["Address","Address"]],[["Ident",["SimpleLocal","cparam2"],null],["Address","Address"]],[["Ident",["SimpleLocal","cparam3"],null],["Address","Address"]]],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[[["Ident",["SimpleLocal","assign_test_1"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_2"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_3"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_4"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_5"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_6"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_7"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_8"],null],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]],[["Constr",["Ident",["SimpleLocal","Address1"],null],[],[["Ident",["SimpleLocal","cparam1"],null]]],null]],[["Ident",["SimpleLocal","assign_test_9"],null],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Constr",["Ident",["SimpleLocal","Nil"],null],[["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],[]],null]],[["Ident",["SimpleLocal","assign_test_10"],null],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits128"]]],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]],"data":[]}],null]],[["Ident",["SimpleLocal","remote_reads_test_res_1_1"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_2_1"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_1"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_3"],null],["PrimType",["Uint_typ",["Bits32"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_4"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_5"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_6"],null],["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Literal",{"mtype":[["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],"data":[]}],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_7"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],[["Constr",["Ident",["SimpleLocal","True"],null],[],[]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_8"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Let",["Ident",["SimpleLocal","x"],null],null,[["Constr",["Ident",["SimpleLocal","True"],null],[],[]],null],[["Constr",["Ident",["SimpleLocal","Some"],null],[["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","x"],null]]],null]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_9"],null],["MapType",["PrimType",["Uint_typ",["Bits32"]]],["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits32"]]],["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],"data":[]}],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_10"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],[["Constr",["Ident",["SimpleLocal","False"],null],[],[]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_11"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]]],[["Constr",["Ident",["SimpleLocal","None"],null],[["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_12"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],[["Constr",["Ident",["SimpleLocal","False"],null],[],[]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_13"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Constr",["Ident",["SimpleLocal","None"],null],[["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],[]],null]],[["Ident",["SimpleLocal","sender_balance_pre"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","sender_balance_mid"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","sender_balance_post"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]]],"ccomps":[{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","RemoteReadsTest"],null],"comp_params":[[["Ident",["SimpleLocal","remote1"],null],["Address","Address"]],[["Ident",["SimpleLocal","remote2"],null],["Address","Address"]],[["Ident",["SimpleLocal","remote3"],null],["Address","Address"]]],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","tmp_1_1"],null],["Ident",["SimpleLocal","remote1"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_1_1"],null],["Ident",["SimpleLocal","tmp_1_1"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_2_1"],null],["Ident",["SimpleLocal","remote2"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_2_1"],null],["Ident",["SimpleLocal","tmp_2_1"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_1"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_1"],null],["Ident",["SimpleLocal","tmp_3_1"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_3"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","transactionCount"],null]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_3"],null],["Ident",["SimpleLocal","tmp_3_3"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_4"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","admin"],null]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_4"],null],["Ident",["SimpleLocal","tmp_3_4"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_5"],null],["Ident",["SimpleLocal","tmp_3_4"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_5"],null],["Ident",["SimpleLocal","tmp_3_5"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_6"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","owners"],null]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_6"],null],["Ident",["SimpleLocal","tmp_3_6"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_7"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","owners"],null],[["Ident",["SimpleLocal","_sender"],null]],false],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_7"],null],["Ident",["SimpleLocal","tmp_3_7"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_8"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","owners"],null],[["Ident",["SimpleLocal","_sender"],null]],true],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_8"],null],["Ident",["SimpleLocal","tmp_3_8"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_9"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_9"],null],["Ident",["SimpleLocal","tmp_3_9"],null]],null],[["Bind",["Ident",["SimpleLocal","x"],null],[["Literal","0"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_10"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null],[["Ident",["SimpleLocal","x"],null]],false],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_10"],null],["Ident",["SimpleLocal","tmp_3_10"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_11"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null],[["Ident",["SimpleLocal","x"],null]],true],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_11"],null],["Ident",["SimpleLocal","tmp_3_11"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_12"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null],[["Ident",["SimpleLocal","x"],null],["Ident",["SimpleLocal","_origin"],null]],false],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_12"],null],["Ident",["SimpleLocal","tmp_3_12"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_13"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null],[["Ident",["SimpleLocal","x"],null],["Ident",["SimpleLocal","_origin"],null]],true],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_13"],null],["Ident",["SimpleLocal","tmp_3_13"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","RemoteReadsADTTest"],null],"comp_params":[[["Ident",["SimpleLocal","list1"],null],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["Address","Address"]]]],[["Ident",["SimpleLocal","list2"],null],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["Address","Address"]]]],[["Ident",["SimpleLocal","list3"],null],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["Address","Address"]]]],[["Ident",["SimpleLocal","pair1"],null],["ADT",["Ident",["SimpleLocal","Pair"],{"fname":"","lnum":0,"cnum":0}],[["Address","Address"],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]]],[["Ident",["SimpleLocal","adt1"],null],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","remote1"],null],["Address","Address"]]],"comp_body":[],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","OutgoingMsgTest"],null],"comp_params":[],"comp_body":[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit",""]],["_recipient",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["_amount",["MLit","0"]],["param",["MVar",["Ident",["SimpleLocal","cparam3"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["Let",["Ident",["SimpleLocal","n"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["PrimType",["Msg_typ"]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg"],null],["Ident",["SimpleLocal","n"],null]]],null]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null],[["Bind",["Ident",["SimpleLocal","e1"],null],[["Message",[["_eventname",["MLit","TestEvent"]],["info",["MVar",["Ident",["SimpleLocal","cparam2"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e1"],null]],null],[["Bind",["Ident",["SimpleLocal","e2"],null],[["Message",[["_eventname",["MLit","TestEvent"]],["info",["MVar",["Ident",["SimpleLocal","cparam3"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e2"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ExceptionTest"],null],"comp_params":[],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","TestException"]],["value",["MVar",["Ident",["SimpleLocal","cparam3"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","AssignTest"],null],"comp_params":[],"comp_body":[[["Bind",["Ident",["SimpleLocal","x"],null],[["Constr",["Ident",["SimpleLocal","Address2"],null],[],[["Ident",["SimpleLocal","cparam3"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","assign_test_8"],null],["Ident",["SimpleLocal","x"],null]],null],[["Bind",["Ident",["SimpleLocal","y"],null],[["Let",["Ident",["SimpleLocal","n"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","x"],null],["Ident",["SimpleLocal","n"],null]]],null]],null]],null],[["Store",["Ident",["SimpleLocal","assign_test_9"],null],["Ident",["SimpleLocal","y"],null]],null],[["Bind",["Ident",["SimpleLocal","z"],null],[["Let",["Ident",["SimpleLocal","n"],null],null,[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits128"]]],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]],"data":[]}],null],[["Let",["Ident",["SimpleLocal","sub_n"],null],null,[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],"data":[]}],null],[["Let",["Ident",["SimpleLocal","sub_k"],null],null,[["Literal","0"],null],[["Let",["Ident",["SimpleLocal","sub_res"],null],null,[["Builtin",[["Builtin_put"],null],[],[["Ident",["SimpleLocal","sub_n"],null],["Ident",["SimpleLocal","sub_k"],null],["Ident",["SimpleLocal","x"],null]]],null],[["Builtin",[["Builtin_put"],null],[],[["Ident",["SimpleLocal","n"],null],["Ident",["SimpleLocal","sub_k"],null],["Ident",["SimpleLocal","sub_res"],null]]],null]],null]],null]],null]],null]],null],[["Store",["Ident",["SimpleLocal","assign_test_10"],null],["Ident",["SimpleLocal","z"],null]],null],[["Bind",["Ident",["SimpleLocal","k1"],null],[["Literal","1"],null]],null],[["Bind",["Ident",["SimpleLocal","k2"],null],[["Literal","42"],null]],null],[["MapUpdate",["Ident",["SimpleLocal","assign_test_10"],null],[["Ident",["SimpleLocal","k1"],null],["Ident",["SimpleLocal","k2"],null]],["Ident",["SimpleLocal","x"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","SenderBalanceTest"],null],"comp_params":[],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","pre"],null],["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Store",["Ident",["SimpleLocal","sender_balance_pre"],null],["Ident",["SimpleLocal","pre"],null]],null],[["AcceptPayment"],null],[["RemoteLoad",["Ident",["SimpleLocal","mid"],null],["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Store",["Ident",["SimpleLocal","sender_balance_mid"],null],["Ident",["SimpleLocal","mid"],null]],null],[["AcceptPayment"],null],[["RemoteLoad",["Ident",["SimpleLocal","post"],null],["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_balance"],null]],null],[["Store",["Ident",["SimpleLocal","sender_balance_post"],null],["Ident",["SimpleLocal","post"],null]],null]],"comp_return":null}]}} + {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","RRLib"],null],"lentries":[["LibTyp",["Ident",["SimpleLocal","AddressADT"],null],[{"cname":["Ident",["SimpleLocal","Address1"],null],"c_arg_types":[["Address","Address"]]},{"cname":["Ident",["SimpleLocal","Address2"],null],"c_arg_types":[["Address","Address"]]}]]]},"elibs":[],"contr":{"cname":["Ident",["SimpleLocal","RRContract"],null],"cparams":[[["Ident",["SimpleLocal","cparam1"],null],["Address","Address"]],[["Ident",["SimpleLocal","cparam2"],null],["Address","Address"]],[["Ident",["SimpleLocal","cparam3"],null],["Address","Address"]]],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[[["Ident",["SimpleLocal","assign_test_1"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_2"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_3"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_4"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_5"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_6"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_7"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","assign_test_8"],null],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]],[["Constr",["Ident",["SimpleLocal","Address1"],null],[],[["Ident",["SimpleLocal","cparam1"],null]]],null]],[["Ident",["SimpleLocal","assign_test_9"],null],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Constr",["Ident",["SimpleLocal","Nil"],null],[["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],[]],null]],[["Ident",["SimpleLocal","assign_test_10"],null],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits128"]]],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]],"data":[]}],null]],[["Ident",["SimpleLocal","remote_reads_test_res_1_1"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_2_1"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_1"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_3"],null],["PrimType",["Uint_typ",["Bits32"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_4"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","cparam3"],null]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_5"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_6"],null],["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Literal",{"mtype":[["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],"data":[]}],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_7"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],[["Constr",["Ident",["SimpleLocal","True"],null],[],[]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_8"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Let",["Ident",["SimpleLocal","x"],null],null,[["Constr",["Ident",["SimpleLocal","True"],null],[],[]],null],[["Constr",["Ident",["SimpleLocal","Some"],null],[["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","x"],null]]],null]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_9"],null],["MapType",["PrimType",["Uint_typ",["Bits32"]]],["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits32"]]],["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],"data":[]}],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_10"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],[["Constr",["Ident",["SimpleLocal","False"],null],[],[]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_11"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]]],[["Constr",["Ident",["SimpleLocal","None"],null],[["MapType",["Address","Address"],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_12"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],[["Constr",["Ident",["SimpleLocal","False"],null],[],[]],null]],[["Ident",["SimpleLocal","remote_reads_test_res_3_13"],null],["ADT",["Ident",["SimpleLocal","Option"],{"fname":"","lnum":0,"cnum":0}],[["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],[["Constr",["Ident",["SimpleLocal","None"],null],[["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],[]],null]],[["Ident",["SimpleLocal","sender_balance_pre"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","sender_balance_mid"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]],[["Ident",["SimpleLocal","sender_balance_post"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Literal","0"],null]]],"ccomps":[{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","RemoteReadsTest"],null],"comp_params":[[["Ident",["SimpleLocal","remote1"],null],["Address","Address"]],[["Ident",["SimpleLocal","remote2"],null],["Address","Address"]],[["Ident",["SimpleLocal","remote3"],null],["Address","Address"]]],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","tmp_1_1"],null],["Ident",["SimpleLocal","remote1"],null],["Ident",["SimpleLocal","_balance"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_1_1"],null],["Ident",["SimpleLocal","tmp_1_1"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_2_1"],null],["Ident",["SimpleLocal","remote2"],null],["Ident",["SimpleLocal","_balance"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_2_1"],null],["Ident",["SimpleLocal","tmp_2_1"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_1"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","_balance"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_1"],null],["Ident",["SimpleLocal","tmp_3_1"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_3"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","transactionCount"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_3"],null],["Ident",["SimpleLocal","tmp_3_3"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_4"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","admin"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_4"],null],["Ident",["SimpleLocal","tmp_3_4"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_5"],null],["Ident",["SimpleLocal","tmp_3_4"],null],["Ident",["SimpleLocal","_balance"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_5"],null],["Ident",["SimpleLocal","tmp_3_5"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_6"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","owners"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_6"],null],["Ident",["SimpleLocal","tmp_3_6"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_7"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","owners"],null],["Mutable"],[["Ident",["SimpleLocal","_sender"],null]],false],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_7"],null],["Ident",["SimpleLocal","tmp_3_7"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_8"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","owners"],null],["Mutable"],[["Ident",["SimpleLocal","_sender"],null]],true],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_8"],null],["Ident",["SimpleLocal","tmp_3_8"],null]],null],[["RemoteLoad",["Ident",["SimpleLocal","tmp_3_9"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_9"],null],["Ident",["SimpleLocal","tmp_3_9"],null]],null],[["Bind",["Ident",["SimpleLocal","x"],null],[["Literal","0"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_10"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null],["Mutable"],[["Ident",["SimpleLocal","x"],null]],false],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_10"],null],["Ident",["SimpleLocal","tmp_3_10"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_11"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null],["Mutable"],[["Ident",["SimpleLocal","x"],null]],true],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_11"],null],["Ident",["SimpleLocal","tmp_3_11"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_12"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null],["Mutable"],[["Ident",["SimpleLocal","x"],null],["Ident",["SimpleLocal","_origin"],null]],false],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_12"],null],["Ident",["SimpleLocal","tmp_3_12"],null]],null],[["RemoteMapGet",["Ident",["SimpleLocal","tmp_3_13"],null],["Ident",["SimpleLocal","remote3"],null],["Ident",["SimpleLocal","signatures"],null],["Mutable"],[["Ident",["SimpleLocal","x"],null],["Ident",["SimpleLocal","_origin"],null]],true],null],[["Store",["Ident",["SimpleLocal","remote_reads_test_res_3_13"],null],["Ident",["SimpleLocal","tmp_3_13"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","RemoteReadsADTTest"],null],"comp_params":[[["Ident",["SimpleLocal","list1"],null],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["Address","Address"]]]],[["Ident",["SimpleLocal","list2"],null],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["Address","Address"]]]],[["Ident",["SimpleLocal","list3"],null],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["Address","Address"]]]],[["Ident",["SimpleLocal","pair1"],null],["ADT",["Ident",["SimpleLocal","Pair"],{"fname":"","lnum":0,"cnum":0}],[["Address","Address"],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]]],[["Ident",["SimpleLocal","adt1"],null],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","remote1"],null],["Address","Address"]]],"comp_body":[],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","OutgoingMsgTest"],null],"comp_params":[],"comp_body":[[["Bind",["Ident",["SimpleLocal","msg"],null],[["Message",[["_tag",["MLit",""]],["_recipient",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["_amount",["MLit","0"]],["param",["MVar",["Ident",["SimpleLocal","cparam3"],null]]]]],null]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["Let",["Ident",["SimpleLocal","n"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["PrimType",["Msg_typ"]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg"],null],["Ident",["SimpleLocal","n"],null]]],null]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null],[["Bind",["Ident",["SimpleLocal","e1"],null],[["Message",[["_eventname",["MLit","TestEvent"]],["info",["MVar",["Ident",["SimpleLocal","cparam2"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e1"],null]],null],[["Bind",["Ident",["SimpleLocal","e2"],null],[["Message",[["_eventname",["MLit","TestEvent"]],["info",["MVar",["Ident",["SimpleLocal","cparam3"],null]]]]],null]],null],[["CreateEvnt",["Ident",["SimpleLocal","e2"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ExceptionTest"],null],"comp_params":[],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","TestException"]],["value",["MVar",["Ident",["SimpleLocal","cparam3"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","AssignTest"],null],"comp_params":[],"comp_body":[[["Bind",["Ident",["SimpleLocal","x"],null],[["Constr",["Ident",["SimpleLocal","Address2"],null],[],[["Ident",["SimpleLocal","cparam3"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","assign_test_8"],null],["Ident",["SimpleLocal","x"],null]],null],[["Bind",["Ident",["SimpleLocal","y"],null],[["Let",["Ident",["SimpleLocal","n"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","x"],null],["Ident",["SimpleLocal","n"],null]]],null]],null]],null],[["Store",["Ident",["SimpleLocal","assign_test_9"],null],["Ident",["SimpleLocal","y"],null]],null],[["Bind",["Ident",["SimpleLocal","z"],null],[["Let",["Ident",["SimpleLocal","n"],null],null,[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits128"]]],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]]],"data":[]}],null],[["Let",["Ident",["SimpleLocal","sub_n"],null],null,[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","AddressADT"],{"fname":"","lnum":0,"cnum":0}],[]]],"data":[]}],null],[["Let",["Ident",["SimpleLocal","sub_k"],null],null,[["Literal","0"],null],[["Let",["Ident",["SimpleLocal","sub_res"],null],null,[["Builtin",[["Builtin_put"],null],[],[["Ident",["SimpleLocal","sub_n"],null],["Ident",["SimpleLocal","sub_k"],null],["Ident",["SimpleLocal","x"],null]]],null],[["Builtin",[["Builtin_put"],null],[],[["Ident",["SimpleLocal","n"],null],["Ident",["SimpleLocal","sub_k"],null],["Ident",["SimpleLocal","sub_res"],null]]],null]],null]],null]],null]],null]],null],[["Store",["Ident",["SimpleLocal","assign_test_10"],null],["Ident",["SimpleLocal","z"],null]],null],[["Bind",["Ident",["SimpleLocal","k1"],null],[["Literal","1"],null]],null],[["Bind",["Ident",["SimpleLocal","k2"],null],[["Literal","42"],null]],null],[["MapUpdate",["Ident",["SimpleLocal","assign_test_10"],null],[["Ident",["SimpleLocal","k1"],null],["Ident",["SimpleLocal","k2"],null]],["Ident",["SimpleLocal","x"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","SenderBalanceTest"],null],"comp_params":[],"comp_body":[[["RemoteLoad",["Ident",["SimpleLocal","pre"],null],["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_balance"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","sender_balance_pre"],null],["Ident",["SimpleLocal","pre"],null]],null],[["AcceptPayment"],null],[["RemoteLoad",["Ident",["SimpleLocal","mid"],null],["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_balance"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","sender_balance_mid"],null],["Ident",["SimpleLocal","mid"],null]],null],[["AcceptPayment"],null],[["RemoteLoad",["Ident",["SimpleLocal","post"],null],["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_balance"],null],["Mutable"]],null],[["Store",["Ident",["SimpleLocal","sender_balance_post"],null],["Ident",["SimpleLocal","post"],null]],null]],"comp_return":null}]}} diff --git a/tests/formatter/to_json/simple-dex-remote-reads.t/run.t b/tests/formatter/to_json/simple-dex-remote-reads.t/run.t index 171ec5efe..e9e897a26 100644 --- a/tests/formatter/to_json/simple-dex-remote-reads.t/run.t +++ b/tests/formatter/to_json/simple-dex-remote-reads.t/run.t @@ -1,2 +1,2 @@ $ scilla-fmt --json --deannot simple-dex-remote-reads.scilla - {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","SimpleExchangeLib"],null],"lentries":[["LibTyp",["Ident",["SimpleLocal","Order"],null],[{"cname":["Ident",["SimpleLocal","Order"],null],"c_arg_types":[["PrimType",["Bystrx_typ",20]],["Address","Address"],["PrimType",["Uint_typ",["Bits128"]]],["Address","Address"],["PrimType",["Uint_typ",["Bits128"]]]]}]],["LibVar",["Ident",["SimpleLocal","true"],null],null,[["Constr",["Ident",["SimpleLocal","True"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","false"],null],null,[["Constr",["Ident",["SimpleLocal","False"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","zero"],null],null,[["Literal","0"],null]],["LibVar",["Ident",["SimpleLocal","one"],null],null,[["Literal","1"],null]],["LibVar",["Ident",["SimpleLocal","one_msg"],null],["FunType",["PrimType",["Msg_typ"]],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Msg_typ"]]]]],[["Fun",["Ident",["SimpleLocal","msg"],null],["PrimType",["Msg_typ"]],[["Let",["Ident",["SimpleLocal","mty"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["PrimType",["Msg_typ"]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg"],null],["Ident",["SimpleLocal","mty"],null]]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","two_msgs"],null],["FunType",["PrimType",["Msg_typ"]],["FunType",["PrimType",["Msg_typ"]],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Msg_typ"]]]]]],[["Fun",["Ident",["SimpleLocal","msg1"],null],["PrimType",["Msg_typ"]],[["Fun",["Ident",["SimpleLocal","msg2"],null],["PrimType",["Msg_typ"]],[["Let",["Ident",["SimpleLocal","first"],null],null,[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg1"],null]]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg2"],null],["Ident",["SimpleLocal","first"],null]]],null]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","mk_transfer_msg"],null],["FunType",["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Uint_typ",["Bits128"]]],["PrimType",["Msg_typ"]]]]]]],[["Fun",["Ident",["SimpleLocal","transfer_from"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],[["Fun",["Ident",["SimpleLocal","token_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Let",["Ident",["SimpleLocal","tag"],null],null,[["MatchExpr",["Ident",["SimpleLocal","transfer_from"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[["Literal","TransferFrom"],null]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[["Literal","Transfer"],null]]]],null],[["Message",[["_recipient",["MVar",["Ident",["SimpleLocal","token_address"],null]]],["_tag",["MVar",["Ident",["SimpleLocal","tag"],null]]],["_amount",["MLit","0"]],["from",["MVar",["Ident",["SimpleLocal","from"],null]]],["to",["MVar",["Ident",["SimpleLocal","to"],null]]],["amount",["MVar",["Ident",["SimpleLocal","amount"],null]]]]],null]],null]],null]],null]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","mk_place_order_msg"],null],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Msg_typ"]]]]]]]],[["Fun",["Ident",["SimpleLocal","token_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Let",["Ident",["SimpleLocal","msg"],null],null,[["App",["Ident",["SimpleLocal","mk_transfer_msg"],null],[["Ident",["SimpleLocal","true"],null],["Ident",["SimpleLocal","token_address"],null],["Ident",["SimpleLocal","from"],null],["Ident",["SimpleLocal","to"],null],["Ident",["SimpleLocal","amount"],null]]],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null]],null]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","mk_make_order_msgs"],null],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Uint_typ",["Bits128"]]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Uint_typ",["Bits128"]]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Msg_typ"]]]]]]]]]]],[["Fun",["Ident",["SimpleLocal","token_sell_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","sell_amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Fun",["Ident",["SimpleLocal","token_buy_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","buy_amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Fun",["Ident",["SimpleLocal","this_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","order_placer"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","order_maker"],null],["PrimType",["Bystrx_typ",20]],[["Let",["Ident",["SimpleLocal","sell_msg"],null],null,[["App",["Ident",["SimpleLocal","mk_transfer_msg"],null],[["Ident",["SimpleLocal","false"],null],["Ident",["SimpleLocal","token_sell_address"],null],["Ident",["SimpleLocal","this_address"],null],["Ident",["SimpleLocal","order_maker"],null],["Ident",["SimpleLocal","sell_amount"],null]]],null],[["Let",["Ident",["SimpleLocal","buy_msg"],null],null,[["App",["Ident",["SimpleLocal","mk_transfer_msg"],null],[["Ident",["SimpleLocal","true"],null],["Ident",["SimpleLocal","token_buy_address"],null],["Ident",["SimpleLocal","order_maker"],null],["Ident",["SimpleLocal","order_placer"],null],["Ident",["SimpleLocal","buy_amount"],null]]],null],[["App",["Ident",["SimpleLocal","two_msgs"],null],[["Ident",["SimpleLocal","sell_msg"],null],["Ident",["SimpleLocal","buy_msg"],null]]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]]]},"elibs":[[["Ident",["SimpleLocal","IntUtils"],null],null]],"contr":{"cname":["Ident",["SimpleLocal","SimpleExchange"],null],"cparams":[[["Ident",["SimpleLocal","initial_admin"],null],["Address","Address"]]],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[[["Ident",["SimpleLocal","admin"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","initial_admin"],null]],null]],[["Ident",["SimpleLocal","listed_tokens"],null],["MapType",["PrimType",["String_typ"]],["Address","Address"]],[["Literal",{"mtype":[["PrimType",["String_typ"]],["Address","Address"]],"data":[]}],null]],[["Ident",["SimpleLocal","active_orders"],null],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","Order"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","Order"],{"fname":"","lnum":0,"cnum":0}],[]]],"data":[]}],null]],[["Ident",["SimpleLocal","next_order_no"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Var",["Ident",["SimpleLocal","zero"],null]],null]]],"ccomps":[{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","ThrowListingStatusException"],null],"comp_params":[[["Ident",["SimpleLocal","token_code"],null],["PrimType",["String_typ"]]],[["Ident",["SimpleLocal","expected_status"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","actual_status"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","UnexpectedListingStatus"]],["token_code",["MVar",["Ident",["SimpleLocal","token_code"],null]]],["expected",["MVar",["Ident",["SimpleLocal","expected_status"],null]]],["actual",["MVar",["Ident",["SimpleLocal","actual_status"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","ThrowInsufficientAllowanceException"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","expected"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","actual"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","InsufficientAllowance"]],["token",["MVar",["Ident",["SimpleLocal","token"],null]]],["expected",["MVar",["Ident",["SimpleLocal","expected"],null]]],["actual",["MVar",["Ident",["SimpleLocal","actual"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","CheckSenderIsAdmin"],null],"comp_params":[],"comp_body":[[["Load",["Ident",["SimpleLocal","current_admin"],null],["Ident",["SimpleLocal","admin"],null]],null],[["Bind",["Ident",["SimpleLocal","is_admin"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","current_admin"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_admin"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","SenderIsNotAdmin"]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","SetAdmin"],null],"comp_params":[[["Ident",["SimpleLocal","new_admin"],null],["Address","Address"]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckSenderIsAdmin"],null],[]],null],[["Store",["Ident",["SimpleLocal","admin"],null],["Ident",["SimpleLocal","new_admin"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","CheckIsTokenUnlisted"],null],"comp_params":[[["Ident",["SimpleLocal","token_code"],null],["PrimType",["String_typ"]]]],"comp_body":[[["MapGet",["Ident",["SimpleLocal","token_code_is_listed"],null],["Ident",["SimpleLocal","listed_tokens"],null],[["Ident",["SimpleLocal","token_code"],null]],false],null],[["MatchStmt",["Ident",["SimpleLocal","token_code_is_listed"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["CallProc",null,["Ident",["SimpleLocal","ThrowListingStatusException"],null],[["Ident",["SimpleLocal","token_code"],null],["Ident",["SimpleLocal","false"],null],["Ident",["SimpleLocal","token_code_is_listed"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ListToken"],null],"comp_params":[[["Ident",["SimpleLocal","token_code"],null],["PrimType",["String_typ"]]],[["Ident",["SimpleLocal","new_token"],null],["Address","Address"]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckSenderIsAdmin"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","CheckIsTokenUnlisted"],null],[["Ident",["SimpleLocal","token_code"],null]]],null],[["MapUpdate",["Ident",["SimpleLocal","listed_tokens"],null],[["Ident",["SimpleLocal","token_code"],null]],["Ident",["SimpleLocal","new_token"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","CheckAllowance"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["Address","Address"]],[["Ident",["SimpleLocal","expected"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["RemoteMapGet",["Ident",["SimpleLocal","actual_opt"],null],["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","allowances"],null],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_this_address"],null]],true],null],[["Bind",["Ident",["SimpleLocal","actual"],null],[["MatchExpr",["Ident",["SimpleLocal","actual_opt"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","x"],null]]]],[["Var",["Ident",["SimpleLocal","x"],null]],null]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[["Var",["Ident",["SimpleLocal","zero"],null]],null]]]],null]],null],[["Bind",["Ident",["SimpleLocal","is_sufficient"],null],[["App",["Ident",["SimpleLocal","uint128_le"],null],[["Ident",["SimpleLocal","expected"],null],["Ident",["SimpleLocal","actual"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_sufficient"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["CallProc",null,["Ident",["SimpleLocal","ThrowInsufficientAllowanceException"],null],[["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","expected"],null],["Ident",["SimpleLocal","actual"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","AddOrder"],null],"comp_params":[[["Ident",["SimpleLocal","order"],null],["ADT",["Ident",["SimpleLocal","Order"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Load",["Ident",["SimpleLocal","order_no"],null],["Ident",["SimpleLocal","next_order_no"],null]],null],[["MapUpdate",["Ident",["SimpleLocal","active_orders"],null],[["Ident",["SimpleLocal","order_no"],null]],["Ident",["SimpleLocal","order"],null]],null],[["Bind",["Ident",["SimpleLocal","new_order_no"],null],[["Builtin",[["Builtin_add"],null],[],[["Ident",["SimpleLocal","order_no"],null],["Ident",["SimpleLocal","one"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","next_order_no"],null],["Ident",["SimpleLocal","new_order_no"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","PlaceOrder"],null],"comp_params":[[["Ident",["SimpleLocal","token_code_sell"],null],["PrimType",["String_typ"]]],[["Ident",["SimpleLocal","sell_amount"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","token_code_buy"],null],["PrimType",["String_typ"]]],[["Ident",["SimpleLocal","buy_amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["MapGet",["Ident",["SimpleLocal","token_sell_opt"],null],["Ident",["SimpleLocal","listed_tokens"],null],[["Ident",["SimpleLocal","token_code_sell"],null]],true],null],[["MapGet",["Ident",["SimpleLocal","token_buy_opt"],null],["Ident",["SimpleLocal","listed_tokens"],null],[["Ident",["SimpleLocal","token_code_buy"],null]],true],null],[["MatchStmt",["Ident",["SimpleLocal","token_sell_opt"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","token_sell"],null]]]],[[["MatchStmt",["Ident",["SimpleLocal","token_buy_opt"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","token_buy"],null]]]],[[["CallProc",null,["Ident",["SimpleLocal","CheckAllowance"],null],[["Ident",["SimpleLocal","token_sell"],null],["Ident",["SimpleLocal","sell_amount"],null]]],null],[["Bind",["Ident",["SimpleLocal","msg"],null],[["App",["Ident",["SimpleLocal","mk_place_order_msg"],null],[["Ident",["SimpleLocal","token_sell"],null],["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_this_address"],null],["Ident",["SimpleLocal","sell_amount"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msg"],null]],null],[["Bind",["Ident",["SimpleLocal","order"],null],[["Constr",["Ident",["SimpleLocal","Order"],null],[],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","token_sell"],null],["Ident",["SimpleLocal","sell_amount"],null],["Ident",["SimpleLocal","token_buy"],null],["Ident",["SimpleLocal","buy_amount"],null]]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","AddOrder"],null],[["Ident",["SimpleLocal","order"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["CallProc",null,["Ident",["SimpleLocal","ThrowListingStatusException"],null],[["Ident",["SimpleLocal","token_code_buy"],null],["Ident",["SimpleLocal","true"],null],["Ident",["SimpleLocal","false"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["CallProc",null,["Ident",["SimpleLocal","ThrowListingStatusException"],null],[["Ident",["SimpleLocal","token_code_sell"],null],["Ident",["SimpleLocal","true"],null],["Ident",["SimpleLocal","false"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","MatchOrder"],null],"comp_params":[[["Ident",["SimpleLocal","order_id"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["MapGet",["Ident",["SimpleLocal","order"],null],["Ident",["SimpleLocal","active_orders"],null],[["Ident",["SimpleLocal","order_id"],null]],true],null],[["MatchStmt",["Ident",["SimpleLocal","order"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Constructor",["Ident",["SimpleLocal","Order"],null],[["Binder",["Ident",["SimpleLocal","order_placer"],null]],["Binder",["Ident",["SimpleLocal","sell_token"],null]],["Binder",["Ident",["SimpleLocal","sell_amount"],null]],["Binder",["Ident",["SimpleLocal","buy_token"],null]],["Binder",["Ident",["SimpleLocal","buy_amount"],null]]]]]],[[["CallProc",null,["Ident",["SimpleLocal","CheckAllowance"],null],[["Ident",["SimpleLocal","buy_token"],null],["Ident",["SimpleLocal","buy_amount"],null]]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","mk_make_order_msgs"],null],[["Ident",["SimpleLocal","sell_token"],null],["Ident",["SimpleLocal","sell_amount"],null],["Ident",["SimpleLocal","buy_token"],null],["Ident",["SimpleLocal","buy_amount"],null],["Ident",["SimpleLocal","_this_address"],null],["Ident",["SimpleLocal","order_placer"],null],["Ident",["SimpleLocal","_sender"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null],[["MapUpdate",["Ident",["SimpleLocal","active_orders"],null],[["Ident",["SimpleLocal","order_id"],null]],null],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","UnknownOrder"]],["order_id",["MVar",["Ident",["SimpleLocal","order_id"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","CheckInitiator"],null],"comp_params":[[["Ident",["SimpleLocal","initiator"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","initiator_is_this"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","initiator"],null],["Ident",["SimpleLocal","_this_address"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","initiator_is_this"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","UnexpecedTransfer"]],["token_address",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["initiator",["MVar",["Ident",["SimpleLocal","initiator"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","RecipientAcceptTransferFrom"],null],"comp_params":[[["Ident",["SimpleLocal","initiator"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","sender"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckInitiator"],null],[["Ident",["SimpleLocal","initiator"],null]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","TransferFromSuccessCallBack"],null],"comp_params":[[["Ident",["SimpleLocal","initiator"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","sender"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckInitiator"],null],[["Ident",["SimpleLocal","initiator"],null]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","TransferSuccessCallBack"],null],"comp_params":[[["Ident",["SimpleLocal","initiator"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","sender"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckInitiator"],null],[["Ident",["SimpleLocal","initiator"],null]]],null]],"comp_return":null}]}} + {"smver":0,"libs":{"lname":["Ident",["SimpleLocal","SimpleExchangeLib"],null],"lentries":[["LibTyp",["Ident",["SimpleLocal","Order"],null],[{"cname":["Ident",["SimpleLocal","Order"],null],"c_arg_types":[["PrimType",["Bystrx_typ",20]],["Address","Address"],["PrimType",["Uint_typ",["Bits128"]]],["Address","Address"],["PrimType",["Uint_typ",["Bits128"]]]]}]],["LibVar",["Ident",["SimpleLocal","true"],null],null,[["Constr",["Ident",["SimpleLocal","True"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","false"],null],null,[["Constr",["Ident",["SimpleLocal","False"],null],[],[]],null]],["LibVar",["Ident",["SimpleLocal","zero"],null],null,[["Literal","0"],null]],["LibVar",["Ident",["SimpleLocal","one"],null],null,[["Literal","1"],null]],["LibVar",["Ident",["SimpleLocal","one_msg"],null],["FunType",["PrimType",["Msg_typ"]],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Msg_typ"]]]]],[["Fun",["Ident",["SimpleLocal","msg"],null],["PrimType",["Msg_typ"]],[["Let",["Ident",["SimpleLocal","mty"],null],null,[["Constr",["Ident",["SimpleLocal","Nil"],null],[["PrimType",["Msg_typ"]]],[]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg"],null],["Ident",["SimpleLocal","mty"],null]]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","two_msgs"],null],["FunType",["PrimType",["Msg_typ"]],["FunType",["PrimType",["Msg_typ"]],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Msg_typ"]]]]]],[["Fun",["Ident",["SimpleLocal","msg1"],null],["PrimType",["Msg_typ"]],[["Fun",["Ident",["SimpleLocal","msg2"],null],["PrimType",["Msg_typ"]],[["Let",["Ident",["SimpleLocal","first"],null],null,[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg1"],null]]],null],[["Constr",["Ident",["SimpleLocal","Cons"],null],[["PrimType",["Msg_typ"]]],[["Ident",["SimpleLocal","msg2"],null],["Ident",["SimpleLocal","first"],null]]],null]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","mk_transfer_msg"],null],["FunType",["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Uint_typ",["Bits128"]]],["PrimType",["Msg_typ"]]]]]]],[["Fun",["Ident",["SimpleLocal","transfer_from"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]],[["Fun",["Ident",["SimpleLocal","token_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Let",["Ident",["SimpleLocal","tag"],null],null,[["MatchExpr",["Ident",["SimpleLocal","transfer_from"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[["Literal","TransferFrom"],null]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[["Literal","Transfer"],null]]]],null],[["Message",[["_recipient",["MVar",["Ident",["SimpleLocal","token_address"],null]]],["_tag",["MVar",["Ident",["SimpleLocal","tag"],null]]],["_amount",["MLit","0"]],["from",["MVar",["Ident",["SimpleLocal","from"],null]]],["to",["MVar",["Ident",["SimpleLocal","to"],null]]],["amount",["MVar",["Ident",["SimpleLocal","amount"],null]]]]],null]],null]],null]],null]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","mk_place_order_msg"],null],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Msg_typ"]]]]]]]],[["Fun",["Ident",["SimpleLocal","token_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","from"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","to"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Let",["Ident",["SimpleLocal","msg"],null],null,[["App",["Ident",["SimpleLocal","mk_transfer_msg"],null],[["Ident",["SimpleLocal","true"],null],["Ident",["SimpleLocal","token_address"],null],["Ident",["SimpleLocal","from"],null],["Ident",["SimpleLocal","to"],null],["Ident",["SimpleLocal","amount"],null]]],null],[["App",["Ident",["SimpleLocal","one_msg"],null],[["Ident",["SimpleLocal","msg"],null]]],null]],null]],null]],null]],null]],null]],["LibVar",["Ident",["SimpleLocal","mk_make_order_msgs"],null],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Uint_typ",["Bits128"]]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Uint_typ",["Bits128"]]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["FunType",["PrimType",["Bystrx_typ",20]],["ADT",["Ident",["SimpleLocal","List"],{"fname":"","lnum":0,"cnum":0}],[["PrimType",["Msg_typ"]]]]]]]]]]],[["Fun",["Ident",["SimpleLocal","token_sell_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","sell_amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Fun",["Ident",["SimpleLocal","token_buy_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","buy_amount"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Fun",["Ident",["SimpleLocal","this_address"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","order_placer"],null],["PrimType",["Bystrx_typ",20]],[["Fun",["Ident",["SimpleLocal","order_maker"],null],["PrimType",["Bystrx_typ",20]],[["Let",["Ident",["SimpleLocal","sell_msg"],null],null,[["App",["Ident",["SimpleLocal","mk_transfer_msg"],null],[["Ident",["SimpleLocal","false"],null],["Ident",["SimpleLocal","token_sell_address"],null],["Ident",["SimpleLocal","this_address"],null],["Ident",["SimpleLocal","order_maker"],null],["Ident",["SimpleLocal","sell_amount"],null]]],null],[["Let",["Ident",["SimpleLocal","buy_msg"],null],null,[["App",["Ident",["SimpleLocal","mk_transfer_msg"],null],[["Ident",["SimpleLocal","true"],null],["Ident",["SimpleLocal","token_buy_address"],null],["Ident",["SimpleLocal","order_maker"],null],["Ident",["SimpleLocal","order_placer"],null],["Ident",["SimpleLocal","buy_amount"],null]]],null],[["App",["Ident",["SimpleLocal","two_msgs"],null],[["Ident",["SimpleLocal","sell_msg"],null],["Ident",["SimpleLocal","buy_msg"],null]]],null]],null]],null]],null]],null]],null]],null]],null]],null]],null]]]},"elibs":[[["Ident",["SimpleLocal","IntUtils"],null],null]],"contr":{"cname":["Ident",["SimpleLocal","SimpleExchange"],null],"cparams":[[["Ident",["SimpleLocal","initial_admin"],null],["Address","Address"]]],"cconstraint":[["Literal",{"name":["SimpleLocal","True"],"types":[],"lits":[]}],null],"cfields":[[["Ident",["SimpleLocal","admin"],null],["Address","Address"],[["Var",["Ident",["SimpleLocal","initial_admin"],null]],null]],[["Ident",["SimpleLocal","listed_tokens"],null],["MapType",["PrimType",["String_typ"]],["Address","Address"]],[["Literal",{"mtype":[["PrimType",["String_typ"]],["Address","Address"]],"data":[]}],null]],[["Ident",["SimpleLocal","active_orders"],null],["MapType",["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","Order"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Literal",{"mtype":[["PrimType",["Uint_typ",["Bits128"]]],["ADT",["Ident",["SimpleLocal","Order"],{"fname":"","lnum":0,"cnum":0}],[]]],"data":[]}],null]],[["Ident",["SimpleLocal","next_order_no"],null],["PrimType",["Uint_typ",["Bits128"]]],[["Var",["Ident",["SimpleLocal","zero"],null]],null]]],"ccomps":[{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","ThrowListingStatusException"],null],"comp_params":[[["Ident",["SimpleLocal","token_code"],null],["PrimType",["String_typ"]]],[["Ident",["SimpleLocal","expected_status"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]],[["Ident",["SimpleLocal","actual_status"],null],["ADT",["Ident",["SimpleLocal","Bool"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","UnexpectedListingStatus"]],["token_code",["MVar",["Ident",["SimpleLocal","token_code"],null]]],["expected",["MVar",["Ident",["SimpleLocal","expected_status"],null]]],["actual",["MVar",["Ident",["SimpleLocal","actual_status"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","ThrowInsufficientAllowanceException"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","expected"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","actual"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","InsufficientAllowance"]],["token",["MVar",["Ident",["SimpleLocal","token"],null]]],["expected",["MVar",["Ident",["SimpleLocal","expected"],null]]],["actual",["MVar",["Ident",["SimpleLocal","actual"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","CheckSenderIsAdmin"],null],"comp_params":[],"comp_body":[[["Load",["Ident",["SimpleLocal","current_admin"],null],["Ident",["SimpleLocal","admin"],null]],null],[["Bind",["Ident",["SimpleLocal","is_admin"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","current_admin"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_admin"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","SenderIsNotAdmin"]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","SetAdmin"],null],"comp_params":[[["Ident",["SimpleLocal","new_admin"],null],["Address","Address"]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckSenderIsAdmin"],null],[]],null],[["Store",["Ident",["SimpleLocal","admin"],null],["Ident",["SimpleLocal","new_admin"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","CheckIsTokenUnlisted"],null],"comp_params":[[["Ident",["SimpleLocal","token_code"],null],["PrimType",["String_typ"]]]],"comp_body":[[["MapGet",["Ident",["SimpleLocal","token_code_is_listed"],null],["Ident",["SimpleLocal","listed_tokens"],null],[["Ident",["SimpleLocal","token_code"],null]],false],null],[["MatchStmt",["Ident",["SimpleLocal","token_code_is_listed"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[[["CallProc",null,["Ident",["SimpleLocal","ThrowListingStatusException"],null],[["Ident",["SimpleLocal","token_code"],null],["Ident",["SimpleLocal","false"],null],["Ident",["SimpleLocal","token_code_is_listed"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","ListToken"],null],"comp_params":[[["Ident",["SimpleLocal","token_code"],null],["PrimType",["String_typ"]]],[["Ident",["SimpleLocal","new_token"],null],["Address","Address"]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckSenderIsAdmin"],null],[]],null],[["CallProc",null,["Ident",["SimpleLocal","CheckIsTokenUnlisted"],null],[["Ident",["SimpleLocal","token_code"],null]]],null],[["MapUpdate",["Ident",["SimpleLocal","listed_tokens"],null],[["Ident",["SimpleLocal","token_code"],null]],["Ident",["SimpleLocal","new_token"],null]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","CheckAllowance"],null],"comp_params":[[["Ident",["SimpleLocal","token"],null],["Address","Address"]],[["Ident",["SimpleLocal","expected"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["RemoteMapGet",["Ident",["SimpleLocal","actual_opt"],null],["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","allowances"],null],["Mutable"],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_this_address"],null]],true],null],[["Bind",["Ident",["SimpleLocal","actual"],null],[["MatchExpr",["Ident",["SimpleLocal","actual_opt"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","x"],null]]]],[["Var",["Ident",["SimpleLocal","x"],null]],null]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[["Var",["Ident",["SimpleLocal","zero"],null]],null]]]],null]],null],[["Bind",["Ident",["SimpleLocal","is_sufficient"],null],[["App",["Ident",["SimpleLocal","uint128_le"],null],[["Ident",["SimpleLocal","expected"],null],["Ident",["SimpleLocal","actual"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","is_sufficient"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["CallProc",null,["Ident",["SimpleLocal","ThrowInsufficientAllowanceException"],null],[["Ident",["SimpleLocal","token"],null],["Ident",["SimpleLocal","expected"],null],["Ident",["SimpleLocal","actual"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","AddOrder"],null],"comp_params":[[["Ident",["SimpleLocal","order"],null],["ADT",["Ident",["SimpleLocal","Order"],{"fname":"","lnum":0,"cnum":0}],[]]]],"comp_body":[[["Load",["Ident",["SimpleLocal","order_no"],null],["Ident",["SimpleLocal","next_order_no"],null]],null],[["MapUpdate",["Ident",["SimpleLocal","active_orders"],null],[["Ident",["SimpleLocal","order_no"],null]],["Ident",["SimpleLocal","order"],null]],null],[["Bind",["Ident",["SimpleLocal","new_order_no"],null],[["Builtin",[["Builtin_add"],null],[],[["Ident",["SimpleLocal","order_no"],null],["Ident",["SimpleLocal","one"],null]]],null]],null],[["Store",["Ident",["SimpleLocal","next_order_no"],null],["Ident",["SimpleLocal","new_order_no"],null]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","PlaceOrder"],null],"comp_params":[[["Ident",["SimpleLocal","token_code_sell"],null],["PrimType",["String_typ"]]],[["Ident",["SimpleLocal","sell_amount"],null],["PrimType",["Uint_typ",["Bits128"]]]],[["Ident",["SimpleLocal","token_code_buy"],null],["PrimType",["String_typ"]]],[["Ident",["SimpleLocal","buy_amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["MapGet",["Ident",["SimpleLocal","token_sell_opt"],null],["Ident",["SimpleLocal","listed_tokens"],null],[["Ident",["SimpleLocal","token_code_sell"],null]],true],null],[["MapGet",["Ident",["SimpleLocal","token_buy_opt"],null],["Ident",["SimpleLocal","listed_tokens"],null],[["Ident",["SimpleLocal","token_code_buy"],null]],true],null],[["MatchStmt",["Ident",["SimpleLocal","token_sell_opt"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","token_sell"],null]]]],[[["MatchStmt",["Ident",["SimpleLocal","token_buy_opt"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Binder",["Ident",["SimpleLocal","token_buy"],null]]]],[[["CallProc",null,["Ident",["SimpleLocal","CheckAllowance"],null],[["Ident",["SimpleLocal","token_sell"],null],["Ident",["SimpleLocal","sell_amount"],null]]],null],[["Bind",["Ident",["SimpleLocal","msg"],null],[["App",["Ident",["SimpleLocal","mk_place_order_msg"],null],[["Ident",["SimpleLocal","token_sell"],null],["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","_this_address"],null],["Ident",["SimpleLocal","sell_amount"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msg"],null]],null],[["Bind",["Ident",["SimpleLocal","order"],null],[["Constr",["Ident",["SimpleLocal","Order"],null],[],[["Ident",["SimpleLocal","_sender"],null],["Ident",["SimpleLocal","token_sell"],null],["Ident",["SimpleLocal","sell_amount"],null],["Ident",["SimpleLocal","token_buy"],null],["Ident",["SimpleLocal","buy_amount"],null]]],null]],null],[["CallProc",null,["Ident",["SimpleLocal","AddOrder"],null],[["Ident",["SimpleLocal","order"],null]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["CallProc",null,["Ident",["SimpleLocal","ThrowListingStatusException"],null],[["Ident",["SimpleLocal","token_code_buy"],null],["Ident",["SimpleLocal","true"],null],["Ident",["SimpleLocal","false"],null]]],null]]]]],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["CallProc",null,["Ident",["SimpleLocal","ThrowListingStatusException"],null],[["Ident",["SimpleLocal","token_code_sell"],null],["Ident",["SimpleLocal","true"],null],["Ident",["SimpleLocal","false"],null]]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","MatchOrder"],null],"comp_params":[[["Ident",["SimpleLocal","order_id"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["MapGet",["Ident",["SimpleLocal","order"],null],["Ident",["SimpleLocal","active_orders"],null],[["Ident",["SimpleLocal","order_id"],null]],true],null],[["MatchStmt",["Ident",["SimpleLocal","order"],null],[[["Constructor",["Ident",["SimpleLocal","Some"],null],[["Constructor",["Ident",["SimpleLocal","Order"],null],[["Binder",["Ident",["SimpleLocal","order_placer"],null]],["Binder",["Ident",["SimpleLocal","sell_token"],null]],["Binder",["Ident",["SimpleLocal","sell_amount"],null]],["Binder",["Ident",["SimpleLocal","buy_token"],null]],["Binder",["Ident",["SimpleLocal","buy_amount"],null]]]]]],[[["CallProc",null,["Ident",["SimpleLocal","CheckAllowance"],null],[["Ident",["SimpleLocal","buy_token"],null],["Ident",["SimpleLocal","buy_amount"],null]]],null],[["Bind",["Ident",["SimpleLocal","msgs"],null],[["App",["Ident",["SimpleLocal","mk_make_order_msgs"],null],[["Ident",["SimpleLocal","sell_token"],null],["Ident",["SimpleLocal","sell_amount"],null],["Ident",["SimpleLocal","buy_token"],null],["Ident",["SimpleLocal","buy_amount"],null],["Ident",["SimpleLocal","_this_address"],null],["Ident",["SimpleLocal","order_placer"],null],["Ident",["SimpleLocal","_sender"],null]]],null]],null],[["SendMsgs",["Ident",["SimpleLocal","msgs"],null]],null],[["MapUpdate",["Ident",["SimpleLocal","active_orders"],null],[["Ident",["SimpleLocal","order_id"],null]],null],null]]],[["Constructor",["Ident",["SimpleLocal","None"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","UnknownOrder"]],["order_id",["MVar",["Ident",["SimpleLocal","order_id"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompProc"],"comp_name":["Ident",["SimpleLocal","CheckInitiator"],null],"comp_params":[[["Ident",["SimpleLocal","initiator"],null],["PrimType",["Bystrx_typ",20]]]],"comp_body":[[["Bind",["Ident",["SimpleLocal","initiator_is_this"],null],[["Builtin",[["Builtin_eq"],null],[],[["Ident",["SimpleLocal","initiator"],null],["Ident",["SimpleLocal","_this_address"],null]]],null]],null],[["MatchStmt",["Ident",["SimpleLocal","initiator_is_this"],null],[[["Constructor",["Ident",["SimpleLocal","True"],null],[]],[]],[["Constructor",["Ident",["SimpleLocal","False"],null],[]],[[["Bind",["Ident",["SimpleLocal","e"],null],[["Message",[["_exception",["MLit","UnexpecedTransfer"]],["token_address",["MVar",["Ident",["SimpleLocal","_sender"],null]]],["initiator",["MVar",["Ident",["SimpleLocal","initiator"],null]]]]],null]],null],[["Throw",["Ident",["SimpleLocal","e"],null]],null]]]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","RecipientAcceptTransferFrom"],null],"comp_params":[[["Ident",["SimpleLocal","initiator"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","sender"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckInitiator"],null],[["Ident",["SimpleLocal","initiator"],null]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","TransferFromSuccessCallBack"],null],"comp_params":[[["Ident",["SimpleLocal","initiator"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","sender"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckInitiator"],null],[["Ident",["SimpleLocal","initiator"],null]]],null]],"comp_return":null},{"comp_type":["CompTrans"],"comp_name":["Ident",["SimpleLocal","TransferSuccessCallBack"],null],"comp_params":[[["Ident",["SimpleLocal","initiator"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","sender"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","recipient"],null],["PrimType",["Bystrx_typ",20]]],[["Ident",["SimpleLocal","amount"],null],["PrimType",["Uint_typ",["Bits128"]]]]],"comp_body":[[["CallProc",null,["Ident",["SimpleLocal","CheckInitiator"],null],[["Ident",["SimpleLocal","initiator"],null]]],null]],"comp_return":null}]}} diff --git a/tests/ipc/StateIPCTest.ml b/tests/ipc/StateIPCTest.ml index 06a3583a1..7dcf777cd 100644 --- a/tests/ipc/StateIPCTest.ml +++ b/tests/ipc/StateIPCTest.ml @@ -93,38 +93,47 @@ let rec pb_to_json pb = | Ipcmessage_types.Bval s -> json_from_string (Bytes.to_string s) (* Parse a state JSON file into (fname, ftyp, fval) where fval is protobuf encoded. *) +type json_parsed_field = + (* A field mutable belonging to this contract. *) + | ThisContr of string * IPCTestType.t * Ipcmessage_types.proto_scilla_val + (* External contracts and their mutable or immutable fields. *) + | ExtrContrs of (string * (string * bool * IPCTestType.t * Ipcmessage_types.proto_scilla_val) list) list + let json_file_to_state path = - let j = json_from_file path in + let j = json_from_file path |> json_to_list in - let rec jlist_to_states js = - List.map js ~f:(fun sv -> - let fname = json_member "vname" sv |> json_to_string in - let jval = json_member "value" sv in - if String.equal fname "_external" then - let exts = json_to_list jval in - let addr_states = - List.map exts ~f:(fun addr_states -> - let addr = - json_member "address" addr_states |> json_to_string - in - let state = json_member "state" addr_states |> json_to_list in - let state' = jlist_to_states state in - List.map state' ~f:(function - | [ (None, s) ] -> (Some addr, s) - | _ -> - assert_failure - "External state cannot contain nested external states")) - in - List.concat addr_states - else - let ftyp = - json_member "type" sv |> json_to_string |> parse_typ_wrapper - in - let fval = json_to_pb ftyp jval in - [ (None, (fname, ftyp, fval)) ]) + let rec recurser js = + let fname = json_member "vname" js |> json_to_string in + let jval = json_member "value" js in + if String.equal fname "_external" then + let exts = json_to_list jval in + let addr_states = + List.map exts ~f:(fun addr_states -> + let addr = + json_member "address" addr_states |> json_to_string + in + let cparams = json_member "cparams" addr_states |> json_to_list in + let cparams' = List.map cparams ~f:(recurser_mapper false) in + let state = json_member "state" addr_states |> json_to_list in + let all_fields = List.rev_map_append state cparams' ~f:(recurser_mapper true) in + (addr, all_fields)) + in + ExtrContrs addr_states + else + let ftyp = + json_member "type" js |> json_to_string |> parse_typ_wrapper + in + let fval = json_to_pb ftyp jval in + ThisContr (fname, ftyp, fval) + and recurser_mapper is_mutable json = + match recurser json with + | ThisContr (n, t, l) -> (n, is_mutable, t, l) + | _ -> + assert_failure + "External state cannot contain nested external states" in - List.concat @@ jlist_to_states (json_to_list j) - + List.map j ~f:recurser + let state_to_json s = let open IPCTestType in `List @@ -249,11 +258,10 @@ let setup_and_initialize ~start_mock_server ~sock_addr ~state_json_path if start_mock_server then StateIPCTestServer.start_server ~sock_addr; let fields = - List.filter_map state ~f:(fun (addr_opt, (s, t, _)) -> - if - Option.is_some addr_opt || String.(s = CUName.as_string balance_label) - then None - else Some (s, t)) + List.filter_map state ~f:(function + | ThisContr (s, t, _) when not String.(s = CUName.as_string balance_label) -> + Some (s, t) + | _ -> None) in let () = StateIPCTestClient.initialize ~fields ~sock_addr in @@ -267,19 +275,22 @@ let setup_and_initialize ~start_mock_server ~sock_addr ~state_json_path bcinfo; (* Update the server (via the test client) with the state values we want. *) - List.iter state ~f:(fun (addr_opt, (fname, tp, value)) -> - match addr_opt with - | Some caddr -> StateIPCTestClient.update_ext ~caddr ~fname ~value ~tp - | None -> - if String.(fname <> CUName.as_string balance_label) then - StateIPCTestClient.update ~fname ~value); + List.iter state ~f:(function + | ThisContr (fname, _tp, value) when String.(fname <> CUName.as_string balance_label) -> + StateIPCTestClient.update ~fname ~value + | ExtrContrs extrs -> + List.iter extrs ~f:(fun (caddr, fields) -> + List.iter fields ~f:(function + | (fname, is_mutable, tp, value) -> + StateIPCTestClient.update_ext ~caddr ~fname ~is_mutable ~value ~tp)) + | _ -> ()); (* Find the balance from state and return it. *) match - List.find state ~f:(fun (addr_opt, (fname, _, _)) -> - Option.is_none addr_opt - && String.(fname = CUName.as_string balance_label)) + List.find state ~f:(function + | ThisContr (fname, _, _) when String.(fname = CUName.as_string balance_label) -> true + | _ -> false) with - | Some (_, (_, _, balpb)) -> ( + | Some (ThisContr (_, _, balpb)) -> ( match balpb with | Ipcmessage_types.Bval bal -> json_from_string (Bytes.to_string bal) |> json_to_string @@ -288,7 +299,7 @@ let setup_and_initialize ~start_mock_server ~sock_addr ~state_json_path ("Incorrect type of " ^ CUName.as_error_string balance_label ^ " in state.json")) - | None -> + | _ -> assert_failure ("Unable to find " ^ CUName.as_error_string balance_label diff --git a/tests/ipc/StateIPCTestClient.ml b/tests/ipc/StateIPCTestClient.ml index 44068b905..875a39080 100644 --- a/tests/ipc/StateIPCTestClient.ml +++ b/tests/ipc/StateIPCTestClient.ml @@ -112,6 +112,7 @@ let fetch ~fname = let q = { name = fname; + is_mutable = true; mapdepth = TypeUtilities.map_depth tp; indices = []; ignoreval = false; @@ -140,6 +141,7 @@ let update ~fname ~value = let q = { name = fname; + is_mutable = true; mapdepth = TypeUtilities.map_depth tp; indices = []; ignoreval = false; @@ -151,12 +153,13 @@ let update ~fname ~value = @@ IPCClient.update_state_value (binary_rpc ~sock_addr) q' value' (* Update full state variable (of another contract) to server (no indexing). *) -let update_ext ~caddr ~fname ~value ~tp = +let update_ext ~caddr ~fname ~is_mutable ~value ~tp = let open Ipcmessage_types in let sock_addr, _ = assert_init () in let q = { name = fname; + is_mutable; mapdepth = TypeUtilities.map_depth tp; indices = []; ignoreval = false; diff --git a/tests/ipc/StateIPCTestServer.ml b/tests/ipc/StateIPCTestServer.ml index 7d9275487..7f260c22c 100644 --- a/tests/ipc/StateIPCTestServer.ml +++ b/tests/ipc/StateIPCTestServer.ml @@ -30,10 +30,11 @@ open StateIPCIdl open IPCUtil module Hashtbl = Caml.Hashtbl -type value_table = (string, value_type) Hashtbl.t -and value_type = NonMapVal of string | MapVal of value_table +type map_value_table = (string, value_type) Hashtbl.t +and value_type = NonMapVal of string | MapVal of map_value_table -type type_table = (string, string) Hashtbl.t +type value_table = (string * bool, value_type) Hashtbl.t +type type_table = (string * bool, string) Hashtbl.t (* State of the full blockchain, i.e., for all addresses. * None indicates *this* address and Some indicates "external state". @@ -130,18 +131,19 @@ module MakeServer () = struct match contr_state with | Some (vt, tt, _bcinfo) -> ( let query = decode_serialized_query query in - let t = Hashtbl.find_opt tt query.name in match query with - | { name; indices; ignoreval; _ } -> ( - let string_indices_list = - name :: List.map indices ~f:Bytes.to_string - in - let%bind vopt = recurser (MapVal vt) string_indices_list in - match vopt with - | Some v -> - if ignoreval then pure @@ (true, "", t) - else - pure @@ (true, encode_serialized_value (serialize_value v), t) + | { name; is_mutable; indices; ignoreval; _ } -> ( + let t = Hashtbl.find_opt tt (name, is_mutable) in + let string_indices_list = List.map indices ~f:Bytes.to_string in + match Hashtbl.find_opt vt (name, is_mutable) with + | Some mvt -> ( + let%bind vopt = recurser mvt string_indices_list in + match vopt with + | Some v -> + if ignoreval then pure @@ (true, "", t) + else + pure @@ (true, encode_serialized_value (serialize_value v), t) + | None -> pure @@ (false, "", t)) | None -> pure @@ (false, "", t))) | None -> pure (false, "", None) @@ -175,7 +177,7 @@ module MakeServer () = struct let query = decode_serialized_query query in let vt, tt, _bcinfo = match Hashtbl.find_opt table addr_opt with - | Some (vt, tt, bcinfo) -> (vt, tt, bcinfo) + | Some (tvt, tt, bcinfo) -> (tvt, tt, bcinfo) | None -> let vt, tt, bcinfo = (Hashtbl.create 8, Hashtbl.create 8, Hashtbl.create 1) @@ -186,19 +188,30 @@ module MakeServer () = struct (* Update type if provided *) let () = match ty_opt with - | Some ty -> Hashtbl.replace tt query.name ty + | Some ty -> Hashtbl.replace tt (query.name, query.is_mutable) ty | None -> () in (* Update value *) match query with - | { name; indices; ignoreval; _ } -> ( + | { name; is_mutable; indices; ignoreval; _ } -> let string_indices_list = List.map indices ~f:Bytes.to_string in - match ignoreval with - | true -> recurser_update vt (name :: string_indices_list) - | false -> - let new_val = deserialize_value (decode_serialized_value value) in - recurser_update ~new_val:(Some new_val) vt - (name :: string_indices_list)) + if ignoreval then + if List.is_empty string_indices_list then + pure @@ Hashtbl.remove vt (name, is_mutable) + else + match Hashtbl.find_opt vt (name, is_mutable) with + | Some (MapVal m) -> recurser_update m string_indices_list + | Some (NonMapVal _) -> fail RPCError.{ code = 0; message = update_message } + | None -> pure () + else + let new_val = deserialize_value (decode_serialized_value value) in + if List.is_empty string_indices_list then + pure @@ Hashtbl.replace vt (name, is_mutable) new_val + else + match Hashtbl.find_opt vt (name, is_mutable) with + | Some (MapVal m) -> recurser_update ~new_val:(Some new_val) m string_indices_list + | Some (NonMapVal _) + | None -> fail RPCError.{ code = 0; message = update_message } let fetch_state_value query = let%bind f, v, _t = fetch_state_value_helper None query in diff --git a/tests/merge/static/gold/remote_collisions1.scilla.gold b/tests/merge/static/gold/remote_collisions1.scilla.gold index 31c71fa40..5d1f91fbe 100644 --- a/tests/merge/static/gold/remote_collisions1.scilla.gold +++ b/tests/merge/static/gold/remote_collisions1.scilla.gold @@ -5,9 +5,17 @@ import BoolUtils library MergedLib -contract MergedContr () +contract MergedContr + ( + remoteCollisions12_param1 : Uint128, + remoteCollisions12_param2 : Uint128 + ) +field remoteCollisions11_param1_read_res : Uint128 = Uint128 0 + +field remoteCollisions11_param2_read_res : Uint128 = Uint128 0 + field remoteCollisions11_f : Bool = False field remoteCollisions11_z : Uint32 = Uint32 0 @@ -29,10 +37,14 @@ transition remoteCollisions11_tr (a : ByStr20) remoteCollisions11_f <- (remoteCollisions12_a_f|remoteCollisions13_a_f); remoteCollisions11_f <- remoteCollisions12_a_f2; k <- remoteCollisions11_z; - remoteCollisions11_f <- (remoteCollisions12_m_f|remoteCollisions13_m_f)[k] + remoteCollisions11_f <- (remoteCollisions12_m_f|remoteCollisions13_m_f)[k]; + param1_tmp = remoteCollisions12_param1; + remoteCollisions11_param1_read_res := param1_tmp; + param2_tmp = remoteCollisions12_param2; + remoteCollisions11_param2_read_res := param2_tmp | None => end end -merge/static/remote_collisions11.scilla:21:15: warning: [2] Name collision: Please disambiguate `m_f` in the configuration file -merge/static/remote_collisions11.scilla:18:15: warning: [2] Name collision: Please disambiguate `a_f` in the configuration file +merge/static/remote_collisions11.scilla:25:15: warning: [2] Name collision: Please disambiguate `m_f` in the configuration file +merge/static/remote_collisions11.scilla:22:15: warning: [2] Name collision: Please disambiguate `a_f` in the configuration file diff --git a/tests/merge/static/remote_collisions11.scilla b/tests/merge/static/remote_collisions11.scilla index 14e4820c9..d9d4ad022 100644 --- a/tests/merge/static/remote_collisions11.scilla +++ b/tests/merge/static/remote_collisions11.scilla @@ -4,21 +4,32 @@ library RemoteCollisions11 contract RemoteCollisions11() +field param1_read_res: Uint128 = Uint128 0 +field param2_read_res: Uint128 = Uint128 0 field f: Bool = False field z: Uint32 = Uint32 0 transition tr(a: ByStr20) - a_opt <- & a as ByStr20 with contract + a_opt <- & a as ByStr20 with contract (param1: Uint128, + param2: Uint128) field a_f: Bool, field a_f2: Bool, field m_f: Map Uint32 Bool end; match a_opt with | Some aa => + (* Read mutables *) f <- & aa.a_f; f <- & aa.a_f2; k <- z; - f <- & aa.m_f[k] + f <- & aa.m_f[k]; + (* Read immutables + This doesn't require disambiguation, because contract parameters + in remote_collisions12.scilla are renamed. *) + param1_tmp <-& aa.(param1); + param1_read_res := param1_tmp; + param2_tmp <-& aa.(param2); + param2_read_res := param2_tmp | None => end end diff --git a/tests/merge/static/remote_collisions12.scilla b/tests/merge/static/remote_collisions12.scilla index 35c9251e4..399845841 100644 --- a/tests/merge/static/remote_collisions12.scilla +++ b/tests/merge/static/remote_collisions12.scilla @@ -2,7 +2,7 @@ scilla_version 0 library RemoteCollisions12 -contract RemoteCollisions12() +contract RemoteCollisions12(param1: Uint128, param2: Uint128) field a_f: Bool = False field a_f2: Bool = False diff --git a/tests/runner/Testcontracts.ml b/tests/runner/Testcontracts.ml index bdd8a73ef..0fcedc876 100644 --- a/tests/runner/Testcontracts.ml +++ b/tests/runner/Testcontracts.ml @@ -460,6 +460,15 @@ let contract_tests env = "remote_state_reads" >: build_contract_init_test env succ_code "remote_state_reads" "init_balance_and_nonce" ~is_library:false ~ipc_mode:true; + "remote_state_reads_cparam" + >: build_contract_init_test env succ_code "remote_state_reads_cparam" + "init" ~is_library:false ~ipc_mode:true; + "remote_state_reads_cparam" + >: build_contract_init_test env succ_code "remote_state_reads_cparam" + "init_extra_cparam" ~is_library:false ~ipc_mode:true; + "remote_state_reads_cparam" + >::: build_contract_tests ~pplit:false env "remote_state_reads_cparam" + succ_code 1 18 []; "address_eq_test" >::: build_contract_tests ~pplit:false env "address_eq_test" succ_code 1 11 []; @@ -470,7 +479,7 @@ let contract_tests env = >::: build_contract_tests ~pplit:false env "address_list_traversal" succ_code 1 2 []; "type_casts" - >::: build_contract_tests env "type_casts" succ_code 1 37 []; + >::: build_contract_tests env "type_casts" succ_code 1 42 []; "addfunds_proxy" >::: build_contract_tests env "addfunds_proxy" succ_code 1 2 []; "addfunds" @@ -575,6 +584,16 @@ let contract_tests env = "remote_state_reads" >::: build_contract_tests env "remote_state_reads" fail_code 101 131 []; + "remote_state_reads_cparam" + >: build_contract_init_test env fail_code "remote_state_reads_cparam" + "init_missing_cparam" ~is_library:false + ~ipc_mode:true; + "remote_state_reads_cparam" + >: build_contract_init_test env fail_code "remote_state_reads_cparam" + "init_wrong_field_type" ~is_library:false ~ipc_mode:true; + "remote_state_reads_cparam" + >::: build_contract_tests env "remote_state_reads_cparam" + fail_code 100 103 []; "map_as_cparam" >: build_contract_init_test env fail_code "map_as_cparam" "init_illegal_key" ~is_library:false ~ipc_mode:true; diff --git a/tests/runner/addfunds/state_1.json b/tests/runner/addfunds/state_1.json index 6efc2d4a1..37d9ed936 100644 --- a/tests/runner/addfunds/state_1.json +++ b/tests/runner/addfunds/state_1.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "142" } ] diff --git a/tests/runner/addfunds_proxy/state_1.json b/tests/runner/addfunds_proxy/state_1.json index dd1bfd858..0dd9282fc 100644 --- a/tests/runner/addfunds_proxy/state_1.json +++ b/tests/runner/addfunds_proxy/state_1.json @@ -15,6 +15,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "142" } ] diff --git a/tests/runner/addfunds_proxy/state_2.json b/tests/runner/addfunds_proxy/state_2.json index dd1bfd858..0dd9282fc 100644 --- a/tests/runner/addfunds_proxy/state_2.json +++ b/tests/runner/addfunds_proxy/state_2.json @@ -15,6 +15,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "142" } ] diff --git a/tests/runner/address_eq_test/state_1.json b/tests/runner/address_eq_test/state_1.json index 54fee51fb..a1a90963a 100644 --- a/tests/runner/address_eq_test/state_1.json +++ b/tests/runner/address_eq_test/state_1.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_10.json b/tests/runner/address_eq_test/state_10.json index 1d24cb989..1043546c9 100644 --- a/tests/runner/address_eq_test/state_10.json +++ b/tests/runner/address_eq_test/state_10.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_11.json b/tests/runner/address_eq_test/state_11.json index 4fdd1f65d..b06f4a4ca 100644 --- a/tests/runner/address_eq_test/state_11.json +++ b/tests/runner/address_eq_test/state_11.json @@ -86,6 +86,7 @@ "value": [ { "address": "0x4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_2.json b/tests/runner/address_eq_test/state_2.json index a1fc1aaf1..9075f14d7 100644 --- a/tests/runner/address_eq_test/state_2.json +++ b/tests/runner/address_eq_test/state_2.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -97,6 +98,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_3.json b/tests/runner/address_eq_test/state_3.json index 1d24cb989..1043546c9 100644 --- a/tests/runner/address_eq_test/state_3.json +++ b/tests/runner/address_eq_test/state_3.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_4.json b/tests/runner/address_eq_test/state_4.json index 1d24cb989..1043546c9 100644 --- a/tests/runner/address_eq_test/state_4.json +++ b/tests/runner/address_eq_test/state_4.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_5.json b/tests/runner/address_eq_test/state_5.json index 1d24cb989..1043546c9 100644 --- a/tests/runner/address_eq_test/state_5.json +++ b/tests/runner/address_eq_test/state_5.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_6.json b/tests/runner/address_eq_test/state_6.json index 1d24cb989..1043546c9 100644 --- a/tests/runner/address_eq_test/state_6.json +++ b/tests/runner/address_eq_test/state_6.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_7.json b/tests/runner/address_eq_test/state_7.json index 1d24cb989..1043546c9 100644 --- a/tests/runner/address_eq_test/state_7.json +++ b/tests/runner/address_eq_test/state_7.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_8.json b/tests/runner/address_eq_test/state_8.json index 1d24cb989..1043546c9 100644 --- a/tests/runner/address_eq_test/state_8.json +++ b/tests/runner/address_eq_test/state_8.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_eq_test/state_9.json b/tests/runner/address_eq_test/state_9.json index 1d24cb989..1043546c9 100644 --- a/tests/runner/address_eq_test/state_9.json +++ b/tests/runner/address_eq_test/state_9.json @@ -86,6 +86,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_list_as_cparam/init_address_type_state.json b/tests/runner/address_list_as_cparam/init_address_type_state.json index 26979dbf3..1f67699c8 100644 --- a/tests/runner/address_list_as_cparam/init_address_type_state.json +++ b/tests/runner/address_list_as_cparam/init_address_type_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_list_as_cparam/init_illegal_nested_type_state.json b/tests/runner/address_list_as_cparam/init_illegal_nested_type_state.json index 26979dbf3..1f67699c8 100644 --- a/tests/runner/address_list_as_cparam/init_illegal_nested_type_state.json +++ b/tests/runner/address_list_as_cparam/init_illegal_nested_type_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_list_as_cparam/init_illegal_type_state.json b/tests/runner/address_list_as_cparam/init_illegal_type_state.json index 26979dbf3..1f67699c8 100644 --- a/tests/runner/address_list_as_cparam/init_illegal_type_state.json +++ b/tests/runner/address_list_as_cparam/init_illegal_type_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_list_as_cparam/init_illegal_value_state.json b/tests/runner/address_list_as_cparam/init_illegal_value_state.json index fa1677b96..22593a0a6 100644 --- a/tests/runner/address_list_as_cparam/init_illegal_value_state.json +++ b/tests/runner/address_list_as_cparam/init_illegal_value_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_list_as_cparam/init_state.json b/tests/runner/address_list_as_cparam/init_state.json index 26979dbf3..1f67699c8 100644 --- a/tests/runner/address_list_as_cparam/init_state.json +++ b/tests/runner/address_list_as_cparam/init_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_list_traversal/state_1.json b/tests/runner/address_list_traversal/state_1.json index 0368ded2f..34d54f3ac 100644 --- a/tests/runner/address_list_traversal/state_1.json +++ b/tests/runner/address_list_traversal/state_1.json @@ -16,6 +16,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564322", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -24,6 +25,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -33,6 +35,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_list_traversal/state_2.json b/tests/runner/address_list_traversal/state_2.json index 0368ded2f..34d54f3ac 100644 --- a/tests/runner/address_list_traversal/state_2.json +++ b/tests/runner/address_list_traversal/state_2.json @@ -16,6 +16,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564322", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -24,6 +25,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -33,6 +35,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/address_list_traversal/state_3.json b/tests/runner/address_list_traversal/state_3.json index 42e36d53a..ee8807566 100644 --- a/tests/runner/address_list_traversal/state_3.json +++ b/tests/runner/address_list_traversal/state_3.json @@ -16,6 +16,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564322", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -24,6 +25,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -33,6 +35,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -42,6 +45,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/ark/state_1.json b/tests/runner/ark/state_1.json index 9bc13937c..8e529f64b 100644 --- a/tests/runner/ark/state_1.json +++ b/tests/runner/ark/state_1.json @@ -32,6 +32,7 @@ { "address": "0x8a79bac7a6383211ae902f34e86c6b729906346d", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/ark/state_2.json b/tests/runner/ark/state_2.json index 4a6bc5da5..dda4d7915 100644 --- a/tests/runner/ark/state_2.json +++ b/tests/runner/ark/state_2.json @@ -59,6 +59,7 @@ { "address": "0x8a79bac7a6383211ae902f34e86c6b729906346d", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/auction/state_1.json b/tests/runner/auction/state_1.json index be6b92de3..87fa36ca1 100644 --- a/tests/runner/auction/state_1.json +++ b/tests/runner/auction/state_1.json @@ -26,6 +26,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/auction/state_2.json b/tests/runner/auction/state_2.json index 1d614fbd2..c104c27b7 100644 --- a/tests/runner/auction/state_2.json +++ b/tests/runner/auction/state_2.json @@ -26,6 +26,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/auction/state_3.json b/tests/runner/auction/state_3.json index 69cc7944a..f69a1a219 100644 --- a/tests/runner/auction/state_3.json +++ b/tests/runner/auction/state_3.json @@ -28,6 +28,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678cd", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/auction/state_4.json b/tests/runner/auction/state_4.json index 6bf19c078..64dbe4e0f 100644 --- a/tests/runner/auction/state_4.json +++ b/tests/runner/auction/state_4.json @@ -28,6 +28,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678cd", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "542" } ] diff --git a/tests/runner/auction/state_5.json b/tests/runner/auction/state_5.json index 1be085cc1..faac141d8 100644 --- a/tests/runner/auction/state_5.json +++ b/tests/runner/auction/state_5.json @@ -26,6 +26,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678cd", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "642" } ] diff --git a/tests/runner/cfinvoke/state_1.json b/tests/runner/cfinvoke/state_1.json index 0f1496945..8c00337dd 100644 --- a/tests/runner/cfinvoke/state_1.json +++ b/tests/runner/cfinvoke/state_1.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/cfinvoke/state_4.json b/tests/runner/cfinvoke/state_4.json index 85dcaf7e3..98dbddee9 100644 --- a/tests/runner/cfinvoke/state_4.json +++ b/tests/runner/cfinvoke/state_4.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x8992d4dfafd282e8a8b3c776eb9fc907d321e21a", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/chain-call-balance-1/state_1.json b/tests/runner/chain-call-balance-1/state_1.json index bc1954bba..fb5f46619 100644 --- a/tests/runner/chain-call-balance-1/state_1.json +++ b/tests/runner/chain-call-balance-1/state_1.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x02345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", diff --git a/tests/runner/chain-call-balance-2/state_1.json b/tests/runner/chain-call-balance-2/state_1.json index a01821b6a..3053fa2f6 100644 --- a/tests/runner/chain-call-balance-2/state_1.json +++ b/tests/runner/chain-call-balance-2/state_1.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", diff --git a/tests/runner/chain-call-balance-3/state_1.json b/tests/runner/chain-call-balance-3/state_1.json index bc1954bba..fb5f46619 100644 --- a/tests/runner/chain-call-balance-3/state_1.json +++ b/tests/runner/chain-call-balance-3/state_1.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x02345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", diff --git a/tests/runner/codehash/state_1.json b/tests/runner/codehash/state_1.json index 43cd40242..a6125d5ff 100644 --- a/tests/runner/codehash/state_1.json +++ b/tests/runner/codehash/state_1.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/codehash/state_100.json b/tests/runner/codehash/state_100.json index 0e41d127a..0aeb35ee0 100644 --- a/tests/runner/codehash/state_100.json +++ b/tests/runner/codehash/state_100.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/codehash/state_101.json b/tests/runner/codehash/state_101.json index 0e41d127a..0aeb35ee0 100644 --- a/tests/runner/codehash/state_101.json +++ b/tests/runner/codehash/state_101.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/codehash/state_102.json b/tests/runner/codehash/state_102.json index 1b6605355..ef8ac1770 100644 --- a/tests/runner/codehash/state_102.json +++ b/tests/runner/codehash/state_102.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/codehash/state_2.json b/tests/runner/codehash/state_2.json index 43cd40242..a6125d5ff 100644 --- a/tests/runner/codehash/state_2.json +++ b/tests/runner/codehash/state_2.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/codehash/state_3.json b/tests/runner/codehash/state_3.json index 43cd40242..a6125d5ff 100644 --- a/tests/runner/codehash/state_3.json +++ b/tests/runner/codehash/state_3.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/codehash/state_4.json b/tests/runner/codehash/state_4.json index 7dda9fcb5..86be9514a 100644 --- a/tests/runner/codehash/state_4.json +++ b/tests/runner/codehash/state_4.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/crowdfunding/state_1.json b/tests/runner/crowdfunding/state_1.json index 93f8134a7..a08883d80 100644 --- a/tests/runner/crowdfunding/state_1.json +++ b/tests/runner/crowdfunding/state_1.json @@ -16,6 +16,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "142" } ] diff --git a/tests/runner/crowdfunding/state_2.json b/tests/runner/crowdfunding/state_2.json index e3d8c0674..410191055 100644 --- a/tests/runner/crowdfunding/state_2.json +++ b/tests/runner/crowdfunding/state_2.json @@ -18,6 +18,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678cd", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/crowdfunding/state_3.json b/tests/runner/crowdfunding/state_3.json index 642f6132d..348965147 100644 --- a/tests/runner/crowdfunding/state_3.json +++ b/tests/runner/crowdfunding/state_3.json @@ -23,6 +23,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678cd", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/crowdfunding/state_6.json b/tests/runner/crowdfunding/state_6.json index 3ab74f6d9..e72a98bc1 100644 --- a/tests/runner/crowdfunding/state_6.json +++ b/tests/runner/crowdfunding/state_6.json @@ -22,6 +22,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678cd", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/crowdfunding_proc/state_1.json b/tests/runner/crowdfunding_proc/state_1.json index abdf0542a..bb959a326 100644 --- a/tests/runner/crowdfunding_proc/state_1.json +++ b/tests/runner/crowdfunding_proc/state_1.json @@ -16,6 +16,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678ab", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/crowdfunding_proc/state_2.json b/tests/runner/crowdfunding_proc/state_2.json index e3d8c0674..410191055 100644 --- a/tests/runner/crowdfunding_proc/state_2.json +++ b/tests/runner/crowdfunding_proc/state_2.json @@ -18,6 +18,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678cd", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/crowdfunding_proc/state_3.json b/tests/runner/crowdfunding_proc/state_3.json index 642f6132d..348965147 100644 --- a/tests/runner/crowdfunding_proc/state_3.json +++ b/tests/runner/crowdfunding_proc/state_3.json @@ -23,6 +23,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678cd", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/crowdfunding_proc/state_6.json b/tests/runner/crowdfunding_proc/state_6.json index 3ab74f6d9..e72a98bc1 100644 --- a/tests/runner/crowdfunding_proc/state_6.json +++ b/tests/runner/crowdfunding_proc/state_6.json @@ -22,6 +22,7 @@ "value": [ { "address": "0x12345678901234567890123456789012345678cd", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/earmarked-coin/state_1.json b/tests/runner/earmarked-coin/state_1.json index 4b2e0ee70..bc1a156b2 100644 --- a/tests/runner/earmarked-coin/state_1.json +++ b/tests/runner/earmarked-coin/state_1.json @@ -12,6 +12,7 @@ "value": [ { "address": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/map_as_cparam/init_illegal_key_state.json b/tests/runner/map_as_cparam/init_illegal_key_state.json index 28c87ea20..599ee1648 100644 --- a/tests/runner/map_as_cparam/init_illegal_key_state.json +++ b/tests/runner/map_as_cparam/init_illegal_key_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -16,6 +17,7 @@ }, { "address": "0x1234567890123456789012345678901234567891", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -25,6 +27,7 @@ }, { "address": "0x1234567890123456789012345678901234567892", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -35,6 +38,7 @@ }, { "address": "0x1234567890123456789012345678901234567893", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/map_as_cparam/init_illegal_value_state.json b/tests/runner/map_as_cparam/init_illegal_value_state.json index 0a2790294..a8291c8a2 100644 --- a/tests/runner/map_as_cparam/init_illegal_value_state.json +++ b/tests/runner/map_as_cparam/init_illegal_value_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -15,6 +16,7 @@ }, { "address": "0x1234567890123456789012345678901234567891", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -25,6 +27,7 @@ }, { "address": "0x1234567890123456789012345678901234567892", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -34,6 +37,7 @@ }, { "address": "0x1234567890123456789012345678901234567893", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/map_as_cparam/init_state.json b/tests/runner/map_as_cparam/init_state.json index 9c4b91f20..9bc906018 100644 --- a/tests/runner/map_as_cparam/init_state.json +++ b/tests/runner/map_as_cparam/init_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -15,6 +16,7 @@ }, { "address": "0x1234567890123456789012345678901234567891", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -24,6 +26,7 @@ }, { "address": "0x1234567890123456789012345678901234567892", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -33,6 +36,7 @@ }, { "address": "0x1234567890123456789012345678901234567893", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/map_as_cparam/init_unassignable_2_state.json b/tests/runner/map_as_cparam/init_unassignable_2_state.json index 9c4b91f20..9bc906018 100644 --- a/tests/runner/map_as_cparam/init_unassignable_2_state.json +++ b/tests/runner/map_as_cparam/init_unassignable_2_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -15,6 +16,7 @@ }, { "address": "0x1234567890123456789012345678901234567891", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -24,6 +26,7 @@ }, { "address": "0x1234567890123456789012345678901234567892", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -33,6 +36,7 @@ }, { "address": "0x1234567890123456789012345678901234567893", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/map_as_cparam/init_unassignable_state.json b/tests/runner/map_as_cparam/init_unassignable_state.json index 9c4b91f20..9bc906018 100644 --- a/tests/runner/map_as_cparam/init_unassignable_state.json +++ b/tests/runner/map_as_cparam/init_unassignable_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -15,6 +16,7 @@ }, { "address": "0x1234567890123456789012345678901234567891", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -24,6 +26,7 @@ }, { "address": "0x1234567890123456789012345678901234567892", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -33,6 +36,7 @@ }, { "address": "0x1234567890123456789012345678901234567893", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/polymorphic_address/state_1.json b/tests/runner/polymorphic_address/state_1.json index ab5f88b27..1dc2c219e 100644 --- a/tests/runner/polymorphic_address/state_1.json +++ b/tests/runner/polymorphic_address/state_1.json @@ -16,6 +16,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint128", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/polymorphic_address/state_2.json b/tests/runner/polymorphic_address/state_2.json index 4e50a6596..f2efb3622 100644 --- a/tests/runner/polymorphic_address/state_2.json +++ b/tests/runner/polymorphic_address/state_2.json @@ -16,6 +16,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint128", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_address_type_state.json b/tests/runner/remote_state_reads/init_address_type_state.json index 2c68c5993..7f22f783c 100644 --- a/tests/runner/remote_state_reads/init_address_type_state.json +++ b/tests/runner/remote_state_reads/init_address_type_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_assignable_map_types_state.json b/tests/runner/remote_state_reads/init_assignable_map_types_state.json index d1fe1129f..3fc3798d7 100644 --- a/tests/runner/remote_state_reads/init_assignable_map_types_state.json +++ b/tests/runner/remote_state_reads/init_assignable_map_types_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_balance_and_nonce_state.json b/tests/runner/remote_state_reads/init_balance_and_nonce_state.json index c131d6889..9af7e5eb2 100644 --- a/tests/runner/remote_state_reads/init_balance_and_nonce_state.json +++ b/tests/runner/remote_state_reads/init_balance_and_nonce_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "3" }, { "vname": "_balance", "type": "Uint128", "value": "42" } @@ -13,6 +14,7 @@ }, { "address": "0x1234567890123456789012345678901234567889", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_balance_no_nonce_state.json b/tests/runner/remote_state_reads/init_balance_no_nonce_state.json index 6e46c5311..ea1f187b2 100644 --- a/tests/runner/remote_state_reads/init_balance_no_nonce_state.json +++ b/tests/runner/remote_state_reads/init_balance_no_nonce_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" } @@ -13,6 +14,7 @@ }, { "address": "0x1234567890123456789012345678901234567889", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_missing_field_state.json b/tests/runner/remote_state_reads/init_missing_field_state.json index b75f7c83c..a9d431556 100644 --- a/tests/runner/remote_state_reads/init_missing_field_state.json +++ b/tests/runner/remote_state_reads/init_missing_field_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_no_address_state.json b/tests/runner/remote_state_reads/init_no_address_state.json index 3be8b43e3..e59902cbe 100644 --- a/tests/runner/remote_state_reads/init_no_address_state.json +++ b/tests/runner/remote_state_reads/init_no_address_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" } @@ -13,6 +14,7 @@ }, { "address": "0x1234567890123456789012345678901234567889", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_nonce_no_balance_state.json b/tests/runner/remote_state_reads/init_nonce_no_balance_state.json index 733c0f0f3..5b5c40e2f 100644 --- a/tests/runner/remote_state_reads/init_nonce_no_balance_state.json +++ b/tests/runner/remote_state_reads/init_nonce_no_balance_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "0" } @@ -13,6 +14,7 @@ }, { "address": "0x1234567890123456789012345678901234567889", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_state.json b/tests/runner/remote_state_reads/init_state.json index 2c68c5993..7f22f783c 100644 --- a/tests/runner/remote_state_reads/init_state.json +++ b/tests/runner/remote_state_reads/init_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_wrong_address_field_type_state.json b/tests/runner/remote_state_reads/init_wrong_address_field_type_state.json index 173da9b48..48f58900e 100644 --- a/tests/runner/remote_state_reads/init_wrong_address_field_type_state.json +++ b/tests/runner/remote_state_reads/init_wrong_address_field_type_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_wrong_field_type_state.json b/tests/runner/remote_state_reads/init_wrong_field_type_state.json index f57bc2eb7..7c92a0add 100644 --- a/tests/runner/remote_state_reads/init_wrong_field_type_state.json +++ b/tests/runner/remote_state_reads/init_wrong_field_type_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/init_wrong_map_type_state.json b/tests/runner/remote_state_reads/init_wrong_map_type_state.json index 9e9c33511..00fb8b018 100644 --- a/tests/runner/remote_state_reads/init_wrong_map_type_state.json +++ b/tests/runner/remote_state_reads/init_wrong_map_type_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/remote_state_reads/state_1.json b/tests/runner/remote_state_reads/state_1.json index 4883f4216..4a4efa883 100644 --- a/tests/runner/remote_state_reads/state_1.json +++ b/tests/runner/remote_state_reads/state_1.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" } @@ -146,6 +147,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -154,6 +156,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -189,6 +192,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_10.json b/tests/runner/remote_state_reads/state_10.json index 9c75b97a0..f397deaa5 100644 --- a/tests/runner/remote_state_reads/state_10.json +++ b/tests/runner/remote_state_reads/state_10.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "22" }, { "vname": "_balance", "type": "Uint128", "value": "0" } @@ -146,6 +147,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -154,6 +156,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -189,6 +192,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_100.json b/tests/runner/remote_state_reads/state_100.json index 032f137e7..ad4da8d3a 100644 --- a/tests/runner/remote_state_reads/state_100.json +++ b/tests/runner/remote_state_reads/state_100.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } @@ -106,6 +107,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "transactionCount", "type": "Uint32", "value": "5" }, @@ -139,6 +141,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" } ] diff --git a/tests/runner/remote_state_reads/state_101.json b/tests/runner/remote_state_reads/state_101.json index f0c663d87..0225f7cc3 100644 --- a/tests/runner/remote_state_reads/state_101.json +++ b/tests/runner/remote_state_reads/state_101.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -107,6 +108,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" } @@ -114,6 +116,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -149,6 +152,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_102.json b/tests/runner/remote_state_reads/state_102.json index bc7333d51..91137e043 100644 --- a/tests/runner/remote_state_reads/state_102.json +++ b/tests/runner/remote_state_reads/state_102.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -107,6 +108,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -115,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -149,6 +152,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_103.json b/tests/runner/remote_state_reads/state_103.json index b40faefe1..ba95ccb6f 100644 --- a/tests/runner/remote_state_reads/state_103.json +++ b/tests/runner/remote_state_reads/state_103.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -107,6 +108,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -115,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -150,6 +153,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_104.json b/tests/runner/remote_state_reads/state_104.json index 4681716a0..a458d0585 100644 --- a/tests/runner/remote_state_reads/state_104.json +++ b/tests/runner/remote_state_reads/state_104.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -107,6 +108,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -115,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -150,6 +153,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_105.json b/tests/runner/remote_state_reads/state_105.json index 48b60c2d3..cde8276e0 100644 --- a/tests/runner/remote_state_reads/state_105.json +++ b/tests/runner/remote_state_reads/state_105.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -107,6 +108,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -115,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -150,6 +153,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_106.json b/tests/runner/remote_state_reads/state_106.json index fb3da1b3f..d74487fc3 100644 --- a/tests/runner/remote_state_reads/state_106.json +++ b/tests/runner/remote_state_reads/state_106.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -107,6 +108,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -115,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -150,6 +153,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_107.json b/tests/runner/remote_state_reads/state_107.json index 3233dcb1d..f6639ab08 100644 --- a/tests/runner/remote_state_reads/state_107.json +++ b/tests/runner/remote_state_reads/state_107.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -107,6 +108,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -115,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -135,6 +138,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_108.json b/tests/runner/remote_state_reads/state_108.json index 892c16b4b..6cda13be6 100644 --- a/tests/runner/remote_state_reads/state_108.json +++ b/tests/runner/remote_state_reads/state_108.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -107,6 +108,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -115,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -150,6 +153,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_109.json b/tests/runner/remote_state_reads/state_109.json index 0123bdb07..d3c5464d4 100644 --- a/tests/runner/remote_state_reads/state_109.json +++ b/tests/runner/remote_state_reads/state_109.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, @@ -170,6 +174,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564327", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" } diff --git a/tests/runner/remote_state_reads/state_11.json b/tests/runner/remote_state_reads/state_11.json index 693c52028..ebf3b9db9 100644 --- a/tests/runner/remote_state_reads/state_11.json +++ b/tests/runner/remote_state_reads/state_11.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "22" }, { "vname": "_balance", "type": "Uint128", "value": "10" } @@ -146,6 +147,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -154,6 +156,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -189,6 +192,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_110.json b/tests/runner/remote_state_reads/state_110.json index 396060e24..8653cf513 100644 --- a/tests/runner/remote_state_reads/state_110.json +++ b/tests/runner/remote_state_reads/state_110.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_111.json b/tests/runner/remote_state_reads/state_111.json index 657e7922c..a47d14622 100644 --- a/tests/runner/remote_state_reads/state_111.json +++ b/tests/runner/remote_state_reads/state_111.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_112.json b/tests/runner/remote_state_reads/state_112.json index 02325137c..c96928325 100644 --- a/tests/runner/remote_state_reads/state_112.json +++ b/tests/runner/remote_state_reads/state_112.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "42" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, @@ -115,6 +116,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, @@ -131,6 +133,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, @@ -158,6 +161,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, diff --git a/tests/runner/remote_state_reads/state_113.json b/tests/runner/remote_state_reads/state_113.json index 02325137c..c96928325 100644 --- a/tests/runner/remote_state_reads/state_113.json +++ b/tests/runner/remote_state_reads/state_113.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "42" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, @@ -115,6 +116,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, @@ -131,6 +133,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, @@ -158,6 +161,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, diff --git a/tests/runner/remote_state_reads/state_114.json b/tests/runner/remote_state_reads/state_114.json index 02325137c..c96928325 100644 --- a/tests/runner/remote_state_reads/state_114.json +++ b/tests/runner/remote_state_reads/state_114.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "42" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, @@ -115,6 +116,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, @@ -131,6 +133,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, @@ -158,6 +161,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, diff --git a/tests/runner/remote_state_reads/state_115.json b/tests/runner/remote_state_reads/state_115.json index 16b36b98c..add3665bd 100644 --- a/tests/runner/remote_state_reads/state_115.json +++ b/tests/runner/remote_state_reads/state_115.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -132,6 +134,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -160,6 +163,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_116.json b/tests/runner/remote_state_reads/state_116.json index cfc253ebc..382abc4f1 100644 --- a/tests/runner/remote_state_reads/state_116.json +++ b/tests/runner/remote_state_reads/state_116.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_117.json b/tests/runner/remote_state_reads/state_117.json index 0123bdb07..d3c5464d4 100644 --- a/tests/runner/remote_state_reads/state_117.json +++ b/tests/runner/remote_state_reads/state_117.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, @@ -170,6 +174,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564327", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" } diff --git a/tests/runner/remote_state_reads/state_118.json b/tests/runner/remote_state_reads/state_118.json index be7996979..c94611867 100644 --- a/tests/runner/remote_state_reads/state_118.json +++ b/tests/runner/remote_state_reads/state_118.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -125,6 +127,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -153,6 +156,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_119.json b/tests/runner/remote_state_reads/state_119.json index b22ab3dab..d378359a7 100644 --- a/tests/runner/remote_state_reads/state_119.json +++ b/tests/runner/remote_state_reads/state_119.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "42" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, @@ -115,6 +116,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, @@ -131,6 +133,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, @@ -158,6 +161,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, diff --git a/tests/runner/remote_state_reads/state_120.json b/tests/runner/remote_state_reads/state_120.json index fca88d57d..c86215130 100644 --- a/tests/runner/remote_state_reads/state_120.json +++ b/tests/runner/remote_state_reads/state_120.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "42" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, @@ -115,6 +116,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, @@ -131,6 +133,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, @@ -158,6 +161,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, diff --git a/tests/runner/remote_state_reads/state_121.json b/tests/runner/remote_state_reads/state_121.json index 0123bdb07..d3c5464d4 100644 --- a/tests/runner/remote_state_reads/state_121.json +++ b/tests/runner/remote_state_reads/state_121.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, @@ -170,6 +174,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564327", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" } diff --git a/tests/runner/remote_state_reads/state_122.json b/tests/runner/remote_state_reads/state_122.json index 0123bdb07..d3c5464d4 100644 --- a/tests/runner/remote_state_reads/state_122.json +++ b/tests/runner/remote_state_reads/state_122.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, @@ -170,6 +174,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564327", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" } diff --git a/tests/runner/remote_state_reads/state_123.json b/tests/runner/remote_state_reads/state_123.json index b5feea083..2f285e03e 100644 --- a/tests/runner/remote_state_reads/state_123.json +++ b/tests/runner/remote_state_reads/state_123.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_124.json b/tests/runner/remote_state_reads/state_124.json index 02537903f..b54fa2611 100644 --- a/tests/runner/remote_state_reads/state_124.json +++ b/tests/runner/remote_state_reads/state_124.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "42" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, @@ -115,6 +116,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, @@ -131,6 +133,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, @@ -158,6 +161,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, diff --git a/tests/runner/remote_state_reads/state_125.json b/tests/runner/remote_state_reads/state_125.json index d2a1d4bf5..afd4501d3 100644 --- a/tests/runner/remote_state_reads/state_125.json +++ b/tests/runner/remote_state_reads/state_125.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_126.json b/tests/runner/remote_state_reads/state_126.json index 47eb2202f..038b137aa 100644 --- a/tests/runner/remote_state_reads/state_126.json +++ b/tests/runner/remote_state_reads/state_126.json @@ -115,6 +115,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "42" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, @@ -131,6 +132,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, @@ -147,6 +149,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, @@ -174,6 +177,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, diff --git a/tests/runner/remote_state_reads/state_127.json b/tests/runner/remote_state_reads/state_127.json index d493e09cb..0219330dc 100644 --- a/tests/runner/remote_state_reads/state_127.json +++ b/tests/runner/remote_state_reads/state_127.json @@ -115,6 +115,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564322", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "50" } ] diff --git a/tests/runner/remote_state_reads/state_128.json b/tests/runner/remote_state_reads/state_128.json index 023a1aefa..e7ffe06ce 100644 --- a/tests/runner/remote_state_reads/state_128.json +++ b/tests/runner/remote_state_reads/state_128.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" } @@ -146,6 +147,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -154,6 +156,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -189,6 +192,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_129.json b/tests/runner/remote_state_reads/state_129.json index d2a1d4bf5..afd4501d3 100644 --- a/tests/runner/remote_state_reads/state_129.json +++ b/tests/runner/remote_state_reads/state_129.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_130.json b/tests/runner/remote_state_reads/state_130.json index af127b23b..23a5b60c9 100644 --- a/tests/runner/remote_state_reads/state_130.json +++ b/tests/runner/remote_state_reads/state_130.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, @@ -170,6 +174,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564327", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "1" }, { "vname": "_balance", "type": "Uint128", "value": "0" } diff --git a/tests/runner/remote_state_reads/state_131.json b/tests/runner/remote_state_reads/state_131.json index 3b6610c60..b19714519 100644 --- a/tests/runner/remote_state_reads/state_131.json +++ b/tests/runner/remote_state_reads/state_131.json @@ -99,6 +99,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -116,6 +117,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -133,6 +135,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -161,6 +164,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, @@ -170,6 +174,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564327", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "1" } diff --git a/tests/runner/remote_state_reads/state_2.json b/tests/runner/remote_state_reads/state_2.json index dc0d61e7f..cb4a9612b 100644 --- a/tests/runner/remote_state_reads/state_2.json +++ b/tests/runner/remote_state_reads/state_2.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -147,6 +148,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -155,6 +157,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -191,6 +194,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" } diff --git a/tests/runner/remote_state_reads/state_3.json b/tests/runner/remote_state_reads/state_3.json index c79212e21..a82884e97 100644 --- a/tests/runner/remote_state_reads/state_3.json +++ b/tests/runner/remote_state_reads/state_3.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -147,6 +148,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -155,6 +157,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -190,6 +193,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_4.json b/tests/runner/remote_state_reads/state_4.json index c8ffc25f1..ac7b5f564 100644 --- a/tests/runner/remote_state_reads/state_4.json +++ b/tests/runner/remote_state_reads/state_4.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -147,6 +148,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -155,6 +157,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -190,6 +193,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_5.json b/tests/runner/remote_state_reads/state_5.json index c8ffc25f1..ac7b5f564 100644 --- a/tests/runner/remote_state_reads/state_5.json +++ b/tests/runner/remote_state_reads/state_5.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -147,6 +148,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -155,6 +157,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -190,6 +193,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_6.json b/tests/runner/remote_state_reads/state_6.json index 534874e6a..fb5ca2599 100644 --- a/tests/runner/remote_state_reads/state_6.json +++ b/tests/runner/remote_state_reads/state_6.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -156,6 +157,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -173,6 +175,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, @@ -201,6 +204,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "128" }, diff --git a/tests/runner/remote_state_reads/state_7.json b/tests/runner/remote_state_reads/state_7.json index 059c2cdda..27e086b69 100644 --- a/tests/runner/remote_state_reads/state_7.json +++ b/tests/runner/remote_state_reads/state_7.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "42" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, @@ -155,6 +156,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, @@ -171,6 +173,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, @@ -198,6 +201,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, diff --git a/tests/runner/remote_state_reads/state_8.json b/tests/runner/remote_state_reads/state_8.json index 059c2cdda..27e086b69 100644 --- a/tests/runner/remote_state_reads/state_8.json +++ b/tests/runner/remote_state_reads/state_8.json @@ -139,6 +139,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "42" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, @@ -155,6 +156,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "64" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, @@ -171,6 +173,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "31" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, @@ -198,6 +201,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "128" }, { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, diff --git a/tests/runner/remote_state_reads/state_9.json b/tests/runner/remote_state_reads/state_9.json index 0998c8aec..8e7fb1ff4 100644 --- a/tests/runner/remote_state_reads/state_9.json +++ b/tests/runner/remote_state_reads/state_9.json @@ -139,6 +139,7 @@ "value": [ { "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "1000000" } ] diff --git a/tests/runner/remote_state_reads_2/init_state.json b/tests/runner/remote_state_reads_2/init_state.json index f29c97f1a..a4e383d77 100644 --- a/tests/runner/remote_state_reads_2/init_state.json +++ b/tests/runner/remote_state_reads_2/init_state.json @@ -6,6 +6,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "42" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -17,6 +18,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -28,6 +30,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, diff --git a/tests/runner/remote_state_reads_2/state_1.json b/tests/runner/remote_state_reads_2/state_1.json index 356cbbdc5..71e06e3e0 100644 --- a/tests/runner/remote_state_reads_2/state_1.json +++ b/tests/runner/remote_state_reads_2/state_1.json @@ -26,6 +26,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -37,6 +38,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -48,6 +50,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, diff --git a/tests/runner/remote_state_reads_2/state_2.json b/tests/runner/remote_state_reads_2/state_2.json index 1b3c106fe..3f332b688 100644 --- a/tests/runner/remote_state_reads_2/state_2.json +++ b/tests/runner/remote_state_reads_2/state_2.json @@ -26,6 +26,7 @@ "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -37,6 +38,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -48,6 +50,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, diff --git a/tests/runner/remote_state_reads_2/state_3.json b/tests/runner/remote_state_reads_2/state_3.json index 4df7cd50b..74a648d4d 100644 --- a/tests/runner/remote_state_reads_2/state_3.json +++ b/tests/runner/remote_state_reads_2/state_3.json @@ -26,6 +26,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -37,6 +38,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -48,6 +50,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, diff --git a/tests/runner/remote_state_reads_2/state_4.json b/tests/runner/remote_state_reads_2/state_4.json index 4df7cd50b..74a648d4d 100644 --- a/tests/runner/remote_state_reads_2/state_4.json +++ b/tests/runner/remote_state_reads_2/state_4.json @@ -26,6 +26,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -37,6 +38,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -48,6 +50,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, diff --git a/tests/runner/remote_state_reads_2/state_5.json b/tests/runner/remote_state_reads_2/state_5.json index 4df7cd50b..74a648d4d 100644 --- a/tests/runner/remote_state_reads_2/state_5.json +++ b/tests/runner/remote_state_reads_2/state_5.json @@ -26,6 +26,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, @@ -37,6 +38,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "64" }, @@ -48,6 +50,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "31" }, diff --git a/tests/runner/remote_state_reads_cparam/blockchain_1.json b/tests/runner/remote_state_reads_cparam/blockchain_1.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_1.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_10.json b/tests/runner/remote_state_reads_cparam/blockchain_10.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_10.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_100.json b/tests/runner/remote_state_reads_cparam/blockchain_100.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_100.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_101.json b/tests/runner/remote_state_reads_cparam/blockchain_101.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_101.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_102.json b/tests/runner/remote_state_reads_cparam/blockchain_102.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_102.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_103.json b/tests/runner/remote_state_reads_cparam/blockchain_103.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_103.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_11.json b/tests/runner/remote_state_reads_cparam/blockchain_11.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_11.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_12.json b/tests/runner/remote_state_reads_cparam/blockchain_12.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_12.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_13.json b/tests/runner/remote_state_reads_cparam/blockchain_13.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_13.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_14.json b/tests/runner/remote_state_reads_cparam/blockchain_14.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_14.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_15.json b/tests/runner/remote_state_reads_cparam/blockchain_15.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_15.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_16.json b/tests/runner/remote_state_reads_cparam/blockchain_16.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_16.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_17.json b/tests/runner/remote_state_reads_cparam/blockchain_17.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_17.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_18.json b/tests/runner/remote_state_reads_cparam/blockchain_18.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_18.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_2.json b/tests/runner/remote_state_reads_cparam/blockchain_2.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_2.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_3.json b/tests/runner/remote_state_reads_cparam/blockchain_3.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_3.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_4.json b/tests/runner/remote_state_reads_cparam/blockchain_4.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_4.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_5.json b/tests/runner/remote_state_reads_cparam/blockchain_5.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_5.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_6.json b/tests/runner/remote_state_reads_cparam/blockchain_6.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_6.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_7.json b/tests/runner/remote_state_reads_cparam/blockchain_7.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_7.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_8.json b/tests/runner/remote_state_reads_cparam/blockchain_8.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_8.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/blockchain_9.json b/tests/runner/remote_state_reads_cparam/blockchain_9.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/blockchain_9.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads_cparam/init.json b/tests/runner/remote_state_reads_cparam/init.json new file mode 100644 index 000000000..ccabc1956 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init.json @@ -0,0 +1,22 @@ +[ + { + "vname" : "_scilla_version", + "type" : "Uint32", + "value" : "0" + }, + { + "vname" : "_this_address", + "type" : "ByStr20", + "value" : "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname" : "_creation_block", + "type" : "BNum", + "value" : "1" + }, + { + "vname" : "cparam1", + "type" : "ByStr20", + "value" : "0x1234567890123456789012345678901234567890" + } +] diff --git a/tests/runner/remote_state_reads_cparam/init_extra_cparam.json b/tests/runner/remote_state_reads_cparam/init_extra_cparam.json new file mode 100644 index 000000000..ccabc1956 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_extra_cparam.json @@ -0,0 +1,22 @@ +[ + { + "vname" : "_scilla_version", + "type" : "Uint32", + "value" : "0" + }, + { + "vname" : "_this_address", + "type" : "ByStr20", + "value" : "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname" : "_creation_block", + "type" : "BNum", + "value" : "1" + }, + { + "vname" : "cparam1", + "type" : "ByStr20", + "value" : "0x1234567890123456789012345678901234567890" + } +] diff --git a/tests/runner/remote_state_reads_cparam/init_extra_cparam_ipc_output.json b/tests/runner/remote_state_reads_cparam/init_extra_cparam_ipc_output.json new file mode 100644 index 000000000..cf5e138ed --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_extra_cparam_ipc_output.json @@ -0,0 +1,10 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "58463", + "_accepted": "false", + "messages": null, + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" } + ], + "events": [] +} diff --git a/tests/runner/remote_state_reads_cparam/init_extra_cparam_state.json b/tests/runner/remote_state_reads_cparam/init_extra_cparam_state.json new file mode 100644 index 000000000..992b7a8d4 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_extra_cparam_state.json @@ -0,0 +1,21 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "x", "type": "String", "value": "Hello World!" }, + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567123" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "42" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/init_ipc_output.json b/tests/runner/remote_state_reads_cparam/init_ipc_output.json new file mode 100644 index 000000000..cf5e138ed --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_ipc_output.json @@ -0,0 +1,10 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "58463", + "_accepted": "false", + "messages": null, + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" } + ], + "events": [] +} diff --git a/tests/runner/remote_state_reads_cparam/init_missing_cparam.json b/tests/runner/remote_state_reads_cparam/init_missing_cparam.json new file mode 100644 index 000000000..ccabc1956 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_missing_cparam.json @@ -0,0 +1,22 @@ +[ + { + "vname" : "_scilla_version", + "type" : "Uint32", + "value" : "0" + }, + { + "vname" : "_this_address", + "type" : "ByStr20", + "value" : "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname" : "_creation_block", + "type" : "BNum", + "value" : "1" + }, + { + "vname" : "cparam1", + "type" : "ByStr20", + "value" : "0x1234567890123456789012345678901234567890" + } +] diff --git a/tests/runner/remote_state_reads_cparam/init_missing_cparam_ipc_output.json b/tests/runner/remote_state_reads_cparam/init_missing_cparam_ipc_output.json new file mode 100644 index 000000000..ae03962bb --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_missing_cparam_ipc_output.json @@ -0,0 +1,12 @@ +{ + "gas_remaining": "7307", + "errors": [ + { + "error_message": + "Address does not satisfy type: address is 0x1234567890123456789012345678901234567890, expected type is ByStr20 with contract (admin : ByStr20) end", + "start_location": { "file": "", "line": 0, "column": 0 }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} diff --git a/tests/runner/remote_state_reads_cparam/init_missing_cparam_state.json b/tests/runner/remote_state_reads_cparam/init_missing_cparam_state.json new file mode 100644 index 000000000..14ed831cb --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_missing_cparam_state.json @@ -0,0 +1,18 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "42" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/init_state.json b/tests/runner/remote_state_reads_cparam/init_state.json new file mode 100644 index 000000000..6e774313a --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_state.json @@ -0,0 +1,20 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567123" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "42" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/init_wrong_field_type.json b/tests/runner/remote_state_reads_cparam/init_wrong_field_type.json new file mode 100644 index 000000000..ccabc1956 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_wrong_field_type.json @@ -0,0 +1,22 @@ +[ + { + "vname" : "_scilla_version", + "type" : "Uint32", + "value" : "0" + }, + { + "vname" : "_this_address", + "type" : "ByStr20", + "value" : "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname" : "_creation_block", + "type" : "BNum", + "value" : "1" + }, + { + "vname" : "cparam1", + "type" : "ByStr20", + "value" : "0x1234567890123456789012345678901234567890" + } +] diff --git a/tests/runner/remote_state_reads_cparam/init_wrong_field_type_ipc_output.json b/tests/runner/remote_state_reads_cparam/init_wrong_field_type_ipc_output.json new file mode 100644 index 000000000..ae03962bb --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_wrong_field_type_ipc_output.json @@ -0,0 +1,12 @@ +{ + "gas_remaining": "7307", + "errors": [ + { + "error_message": + "Address does not satisfy type: address is 0x1234567890123456789012345678901234567890, expected type is ByStr20 with contract (admin : ByStr20) end", + "start_location": { "file": "", "line": 0, "column": 0 }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} diff --git a/tests/runner/remote_state_reads_cparam/init_wrong_field_type_state.json b/tests/runner/remote_state_reads_cparam/init_wrong_field_type_state.json new file mode 100644 index 000000000..fd5320fa6 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/init_wrong_field_type_state.json @@ -0,0 +1,20 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "String", "value": "0x1234567890123456789012345678901234567123" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "42" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/message_1.json b/tests/runner/remote_state_reads_cparam/message_1.json new file mode 100644 index 000000000..697d9d5cd --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_1.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest1", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote1", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_10.json b/tests/runner/remote_state_reads_cparam/message_10.json new file mode 100644 index 000000000..4421b0fe1 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_10.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest7", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote7", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_100.json b/tests/runner/remote_state_reads_cparam/message_100.json new file mode 100644 index 000000000..4421b0fe1 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_100.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest7", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote7", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_101.json b/tests/runner/remote_state_reads_cparam/message_101.json new file mode 100644 index 000000000..0437f84c3 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_101.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest6", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote6", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_102.json b/tests/runner/remote_state_reads_cparam/message_102.json new file mode 100644 index 000000000..89d7945b5 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_102.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest8", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_103.json b/tests/runner/remote_state_reads_cparam/message_103.json new file mode 100644 index 000000000..5861ec618 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_103.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest9", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_11.json b/tests/runner/remote_state_reads_cparam/message_11.json new file mode 100644 index 000000000..5861ec618 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_11.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest9", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_12.json b/tests/runner/remote_state_reads_cparam/message_12.json new file mode 100644 index 000000000..5861ec618 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_12.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest9", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_13.json b/tests/runner/remote_state_reads_cparam/message_13.json new file mode 100644 index 000000000..5861ec618 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_13.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest9", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_14.json b/tests/runner/remote_state_reads_cparam/message_14.json new file mode 100644 index 000000000..f25912b3d --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_14.json @@ -0,0 +1,7 @@ +{ + "_tag": "RemoteReadContractParameterTest10", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_15.json b/tests/runner/remote_state_reads_cparam/message_15.json new file mode 100644 index 000000000..99486aa3a --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_15.json @@ -0,0 +1,7 @@ +{ + "_tag": "AddressTypeErasureTest1", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_16.json b/tests/runner/remote_state_reads_cparam/message_16.json new file mode 100644 index 000000000..a5fe86d25 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_16.json @@ -0,0 +1,7 @@ +{ + "_tag": "AddressTypeErasureTest2", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_17.json b/tests/runner/remote_state_reads_cparam/message_17.json new file mode 100644 index 000000000..4250bb89f --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_17.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest11", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_18.json b/tests/runner/remote_state_reads_cparam/message_18.json new file mode 100644 index 000000000..5861ec618 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_18.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest9", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_2.json b/tests/runner/remote_state_reads_cparam/message_2.json new file mode 100644 index 000000000..f02ed3638 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_2.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest2", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote2", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_3.json b/tests/runner/remote_state_reads_cparam/message_3.json new file mode 100644 index 000000000..a92f9a04e --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_3.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest3", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote3", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_4.json b/tests/runner/remote_state_reads_cparam/message_4.json new file mode 100644 index 000000000..a47aff9ad --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_4.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest4", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote4", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_5.json b/tests/runner/remote_state_reads_cparam/message_5.json new file mode 100644 index 000000000..685882ad3 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_5.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest5", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote5", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_6.json b/tests/runner/remote_state_reads_cparam/message_6.json new file mode 100644 index 000000000..685882ad3 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_6.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest5", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote5", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_7.json b/tests/runner/remote_state_reads_cparam/message_7.json new file mode 100644 index 000000000..0437f84c3 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_7.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest6", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote6", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_8.json b/tests/runner/remote_state_reads_cparam/message_8.json new file mode 100644 index 000000000..4421b0fe1 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_8.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest7", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote7", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/message_9.json b/tests/runner/remote_state_reads_cparam/message_9.json new file mode 100644 index 000000000..4421b0fe1 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/message_9.json @@ -0,0 +1,13 @@ +{ + "_tag": "RemoteReadContractParameterTest7", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote7", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads_cparam/output_1.json b/tests/runner/remote_state_reads_cparam/output_1.json new file mode 100644 index 000000000..30f90b580 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_1.json @@ -0,0 +1,87 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7948", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "42" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_10.json b/tests/runner/remote_state_reads_cparam/output_10.json new file mode 100644 index 000000000..cc37842e6 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_10.json @@ -0,0 +1,91 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7944", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "True", "argtypes": [], "arguments": [] } + ] + } + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "False", "argtypes": [], "arguments": [] } + ] + } + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_100.json b/tests/runner/remote_state_reads_cparam/output_100.json new file mode 100644 index 000000000..d5d0aafce --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_100.json @@ -0,0 +1,12 @@ +{ + "gas_remaining": "7952", + "errors": [ + { + "error_message": + "Address does not satisfy type: address is 0xabfeccdc9012345678901234567890f777564323, expected type is ByStr20 with contract (x : Uint128, y : Uint64) field x : Uint128, field y : Uint64 end", + "start_location": { "file": "", "line": 0, "column": 0 }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_101.json b/tests/runner/remote_state_reads_cparam/output_101.json new file mode 100644 index 000000000..f396c336f --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_101.json @@ -0,0 +1,12 @@ +{ + "gas_remaining": "7952", + "errors": [ + { + "error_message": + "Address does not satisfy type: address is 0xabfeccdc9012345678901234567890f777564323, expected type is ByStr20 with contract (x : Uint128) field x : String end", + "start_location": { "file": "", "line": 0, "column": 0 }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_102.json b/tests/runner/remote_state_reads_cparam/output_102.json new file mode 100644 index 000000000..0342e2966 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_102.json @@ -0,0 +1,12 @@ +{ + "gas_remaining": "7953", + "errors": [ + { + "error_message": + "Address does not satisfy type: address is 0xabfeccdc9012345678901234567890f777564323, expected type is ByStr20 with contract (admin : ByStr20 with contract (f : ByStr20 with contract (g : Uint128) end) end) end", + "start_location": { "file": "", "line": 0, "column": 0 }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_103.json b/tests/runner/remote_state_reads_cparam/output_103.json new file mode 100644 index 000000000..014a7ad82 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_103.json @@ -0,0 +1,12 @@ +{ + "gas_remaining": "7953", + "errors": [ + { + "error_message": + "Address does not satisfy type: address is 0xabfeccdc9012345678901234567890f777564323, expected type is ByStr20 with contract (admin : ByStr20 with contract (f : ByStr20 with contract (g : Map (Uint128) (Uint128)) end) end) end", + "start_location": { "file": "", "line": 0, "column": 0 }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_11.json b/tests/runner/remote_state_reads_cparam/output_11.json new file mode 100644 index 000000000..ab922e6b2 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_11.json @@ -0,0 +1,87 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7943", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "Some", + "argtypes": [ "Uint128" ], + "arguments": [ "1982" ] + } + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_12.json b/tests/runner/remote_state_reads_cparam/output_12.json new file mode 100644 index 000000000..24579a69e --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_12.json @@ -0,0 +1,87 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7947", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_13.json b/tests/runner/remote_state_reads_cparam/output_13.json new file mode 100644 index 000000000..ab922e6b2 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_13.json @@ -0,0 +1,87 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7943", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "Some", + "argtypes": [ "Uint128" ], + "arguments": [ "1982" ] + } + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_14.json b/tests/runner/remote_state_reads_cparam/output_14.json new file mode 100644 index 000000000..dbf538f8e --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_14.json @@ -0,0 +1,87 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7967", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x1234567890123456789012345678901234567891" + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_15.json b/tests/runner/remote_state_reads_cparam/output_15.json new file mode 100644 index 000000000..f96a72816 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_15.json @@ -0,0 +1,89 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7971", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [ + { "key": "0", "val": "0x1234567890123456789012345678901234567890" } + ] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_16.json b/tests/runner/remote_state_reads_cparam/output_16.json new file mode 100644 index 000000000..196651ab7 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_16.json @@ -0,0 +1,89 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7969", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [ + { "key": "0", "val": "0x1234567890123456789012345678901234567890" } + ] + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_17.json b/tests/runner/remote_state_reads_cparam/output_17.json new file mode 100644 index 000000000..40eecfff4 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_17.json @@ -0,0 +1,87 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7952", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_18.json b/tests/runner/remote_state_reads_cparam/output_18.json new file mode 100644 index 000000000..f91040a1c --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_18.json @@ -0,0 +1,87 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7943", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "Some", + "argtypes": [ "Uint128" ], + "arguments": [ "1982" ] + } + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} diff --git a/tests/runner/remote_state_reads_cparam/output_2.json b/tests/runner/remote_state_reads_cparam/output_2.json new file mode 100644 index 000000000..44e936610 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_2.json @@ -0,0 +1,87 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7947", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address2", + "argtypes": [], + "arguments": [ "0xabfeccdc9012345678901234567890f777564324" ] + } + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_3.json b/tests/runner/remote_state_reads_cparam/output_3.json new file mode 100644 index 000000000..0db5ea89c --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_3.json @@ -0,0 +1,95 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7944", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "381" + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "523" + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_4.json b/tests/runner/remote_state_reads_cparam/output_4.json new file mode 100644 index 000000000..f4b590146 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_4.json @@ -0,0 +1,95 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7943", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "dnineopro" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "4819" + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_5.json b/tests/runner/remote_state_reads_cparam/output_5.json new file mode 100644 index 000000000..be9887e99 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_5.json @@ -0,0 +1,91 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7951", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "Some", + "argtypes": [ "Option (Bool)" ], + "arguments": [ + { "constructor": "None", "argtypes": [ "Bool" ], "arguments": [] } + ] + } + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "False", "argtypes": [], "arguments": [] } + ] + } + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_6.json b/tests/runner/remote_state_reads_cparam/output_6.json new file mode 100644 index 000000000..38b8db618 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_6.json @@ -0,0 +1,102 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7947", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "Some", + "argtypes": [ "Option (Bool)" ], + "arguments": [ + { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "True", "argtypes": [], "arguments": [] } + ] + } + ] + } + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "True", "argtypes": [], "arguments": [] } + ] + } + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [ + { + "key": "0", + "val": { "constructor": "True", "argtypes": [], "arguments": [] } + } + ] + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_7.json b/tests/runner/remote_state_reads_cparam/output_7.json new file mode 100644 index 000000000..17af5146a --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_7.json @@ -0,0 +1,95 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7943", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "Incongruentially" + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "2801" + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_8.json b/tests/runner/remote_state_reads_cparam/output_8.json new file mode 100644 index 000000000..6c00992d4 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_8.json @@ -0,0 +1,91 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7944", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "False", "argtypes": [], "arguments": [] } + ] + } + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "False", "argtypes": [], "arguments": [] } + ] + } + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/output_9.json b/tests/runner/remote_state_reads_cparam/output_9.json new file mode 100644 index 000000000..89ca48a69 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/output_9.json @@ -0,0 +1,91 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7944", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "False", "argtypes": [], "arguments": [] } + ] + } + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "True", "argtypes": [], "arguments": [] } + ] + } + }, + { "vname": "remote_reads_test_res_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { "vname": "remote_reads_test_res_3_2", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint64", "value": "0" }, + { "vname": "remote_reads_test_res_4_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_4_2", "type": "String", "value": "" }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option (Bool))", + "value": { + "constructor": "None", + "argtypes": [ "Option (Bool)" ], + "arguments": [] + } + }, + { "vname": "remote_reads_test_res_6_1", "type": "Uint128", "value": "0" }, + { "vname": "remote_reads_test_res_6_2", "type": "String", "value": "" }, + { "vname": "remote_reads_test_res_8", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_9", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map (Uint128) (ByStr20 with end)", + "value": [] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads_cparam/state_1.json b/tests/runner/remote_state_reads_cparam/state_1.json new file mode 100644 index 000000000..6cd4f3861 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_1.json @@ -0,0 +1,140 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "x", "type": "Uint128", "value": "42" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_10.json b/tests/runner/remote_state_reads_cparam/state_10.json new file mode 100644 index 000000000..5bc54a1a1 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_10.json @@ -0,0 +1,143 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "x", "type": "Uint128", "value": "2801" }, + { "vname": "y", "type": "Uint64", "value": "1" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, + { "vname": "x", "type": "Uint128", "value": "54" }, + { "vname": "y", "type": "Uint64", "value": "1" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_100.json b/tests/runner/remote_state_reads_cparam/state_100.json new file mode 100644 index 000000000..bea79c669 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_100.json @@ -0,0 +1,142 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "y", "type": "Uint64", "value": "1" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, + { "vname": "x", "type": "Uint128", "value": "54" }, + { "vname": "y", "type": "Uint64", "value": "1234" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_101.json b/tests/runner/remote_state_reads_cparam/state_101.json new file mode 100644 index 000000000..005ee9b1a --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_101.json @@ -0,0 +1,143 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "x", "type": "String", "value": "2801" }, + { "vname": "y", "type": "Uint64", "value": "1234" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, + { "vname": "x", "type": "String", "value": "54" }, + { "vname": "y", "type": "Uint64", "value": "1234" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_102.json b/tests/runner/remote_state_reads_cparam/state_102.json new file mode 100644 index 000000000..83d3deb9c --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_102.json @@ -0,0 +1,179 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { + "vname": "admin", + "type": "ByStr20 with contract (f : ByStr20 with contract (g : Map Uint128 Uint128) end) end", + "value": "0xabfeccdc9012345678901234567890f777564324" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [ + { + "vname": "f", + "type": "ByStr20 with contract (g : Map Uint128 Uint128) end", + "value": "0xabfeccdc9012345678901234567890f777564325" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [ + { + "vname": "g", + "type": "Map Uint128 Uint128", + "value": [ + { + "key" : "0", + "val" : "1982" + } + ] + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_103.json b/tests/runner/remote_state_reads_cparam/state_103.json new file mode 100644 index 000000000..55a727474 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_103.json @@ -0,0 +1,179 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { + "vname": "admin", + "type": "ByStr20 with contract (f : ByStr20 with contract (g : Map String Uint128) end) end", + "value": "0xabfeccdc9012345678901234567890f777564324" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [ + { + "vname": "f", + "type": "ByStr20 with contract (g : Map String Uint128) end", + "value": "0xabfeccdc9012345678901234567890f777564325" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [ + { + "vname": "g", + "type": "Map String Uint128", + "value": [ + { + "key" : "0", + "val" : "1982" + } + ] + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_11.json b/tests/runner/remote_state_reads_cparam/state_11.json new file mode 100644 index 000000000..83d3deb9c --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_11.json @@ -0,0 +1,179 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { + "vname": "admin", + "type": "ByStr20 with contract (f : ByStr20 with contract (g : Map Uint128 Uint128) end) end", + "value": "0xabfeccdc9012345678901234567890f777564324" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [ + { + "vname": "f", + "type": "ByStr20 with contract (g : Map Uint128 Uint128) end", + "value": "0xabfeccdc9012345678901234567890f777564325" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [ + { + "vname": "g", + "type": "Map Uint128 Uint128", + "value": [ + { + "key" : "0", + "val" : "1982" + } + ] + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_12.json b/tests/runner/remote_state_reads_cparam/state_12.json new file mode 100644 index 000000000..450395989 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_12.json @@ -0,0 +1,174 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { + "vname": "admin", + "type": "ByStr20 with contract (f : ByStr20 with contract (g : Map Uint128 Uint128) end) end", + "value": "0xabfeccdc9012345678901234567890f777564324" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [ + { + "vname": "f", + "type": "ByStr20 with contract (g : Map Uint128 Uint128) end", + "value": "0xabfeccdc9012345678901234567890f777564325" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [ + { + "vname": "g", + "type": "Map Uint128 Uint128", + "value": [] + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_13.json b/tests/runner/remote_state_reads_cparam/state_13.json new file mode 100644 index 000000000..42d0db3a3 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_13.json @@ -0,0 +1,194 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { + "vname": "admin", + "type": "ByStr20 with contract (f : ByStr20 with contract (g : Map Uint128 Uint128) end) end", + "value": "0xabfeccdc9012345678901234567890f777564324" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [ + { + "vname": "f", + "type": "ByStr20 with contract (g : Map Uint128 Uint128) end", + "value": "0xabfeccdc9012345678901234567890f777564325" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [ + { + "vname": "g1", + "type": "Map Uint128 Uint128", + "value": [ + { + "key" : "0", + "val" : "193282" + } + ] + }, + { + "vname": "f", + "type": "Uint128", + "value": "34" + }, + { + "vname": "g", + "type": "Map Uint128 Uint128", + "value": [ + { + "key" : "0", + "val" : "1982" + } + ] + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_14.json b/tests/runner/remote_state_reads_cparam/state_14.json new file mode 100644 index 000000000..fee1bc9b3 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_14.json @@ -0,0 +1,129 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_15.json b/tests/runner/remote_state_reads_cparam/state_15.json new file mode 100644 index 000000000..fee1bc9b3 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_15.json @@ -0,0 +1,129 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_16.json b/tests/runner/remote_state_reads_cparam/state_16.json new file mode 100644 index 000000000..fee1bc9b3 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_16.json @@ -0,0 +1,129 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_17.json b/tests/runner/remote_state_reads_cparam/state_17.json new file mode 100644 index 000000000..490b70ecd --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_17.json @@ -0,0 +1,142 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "x", "type": "Uint128", "value": "0" }, + { "vname": "y", "type": "Uint128", "value": "0" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, + { "vname": "y", "type": "String", "value": "0" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_18.json b/tests/runner/remote_state_reads_cparam/state_18.json new file mode 100644 index 000000000..330e66cbf --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_18.json @@ -0,0 +1,184 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { + "vname": "admin", + "type": "ByStr20 with contract (f : ByStr20 with contract (h: String, g : Map Uint128 Uint128) end) end", + "value": "0xabfeccdc9012345678901234567890f777564324" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [ + { + "vname": "f", + "type": "ByStr20 with contract (h: String, g : Map Uint128 Uint128) end", + "value": "0xabfeccdc9012345678901234567890f777564325" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [ + { + "vname": "g", + "type": "Map Uint128 Uint128", + "value": [ + { + "key" : "0", + "val" : "1982" + } + ] + }, + { + "vname": "h", + "type": "String", + "value": "Hello world!" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_2.json b/tests/runner/remote_state_reads_cparam/state_2.json new file mode 100644 index 000000000..9434df82e --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_2.json @@ -0,0 +1,187 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { + "vname": "x", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address2", + "argtypes": [], + "arguments": [ "0xabfeccdc9012345678901234567890f777564324" ] + } + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [ + { + "vname": "param", + "type": "ByStr20", + "value": "0xabfeccdc9012345678901234567890f777564325" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, + { "vname": "admin", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564325", + "cparams": [ + { + "vname": "x", + "type": "Uint128", + "value": "100" + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564326", + "cparams": [], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "10" }, + { "vname": "_balance", "type": "Uint128", "value": "64" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_3.json b/tests/runner/remote_state_reads_cparam/state_3.json new file mode 100644 index 000000000..175ad957a --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_3.json @@ -0,0 +1,152 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "x", "type": "ByStr20 with contract (x : Uint128) field y : Uint64 end", "value": "0xabfeccdc9012345678901234567890f777564324" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [ + { "vname": "x", "type": "Uint128", "value": "523" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, + { "vname": "y", "type": "Uint64", "value": "381" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_4.json b/tests/runner/remote_state_reads_cparam/state_4.json new file mode 100644 index 000000000..72f069485 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_4.json @@ -0,0 +1,141 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "x", "type": "Uint128", "value": "4819" }, + { "vname": "y", "type": "String", "value": "dnineopro" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_5.json b/tests/runner/remote_state_reads_cparam/state_5.json new file mode 100644 index 000000000..dcc132453 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_5.json @@ -0,0 +1,144 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { + "vname": "x", + "type": "Map Uint128 Bool", + "value": [] + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_6.json b/tests/runner/remote_state_reads_cparam/state_6.json new file mode 100644 index 000000000..b465bc54f --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_6.json @@ -0,0 +1,149 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { + "vname": "x", + "type": "Map Uint128 Bool", + "value": [ + { + "key": "0", + "val": { "constructor": "True", "argtypes": [], "arguments": [] } + } + ] + } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_7.json b/tests/runner/remote_state_reads_cparam/state_7.json new file mode 100644 index 000000000..26111af9d --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_7.json @@ -0,0 +1,141 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "x", "type": "Uint128", "value": "2801" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, + { "vname": "x", "type": "String", "value": "Incongruentially" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_8.json b/tests/runner/remote_state_reads_cparam/state_8.json new file mode 100644 index 000000000..c6b3a2ad5 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_8.json @@ -0,0 +1,143 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "x", "type": "Uint128", "value": "2801" }, + { "vname": "y", "type": "Uint64", "value": "1" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, + { "vname": "x", "type": "Uint128", "value": "54" }, + { "vname": "y", "type": "Uint64", "value": "1234" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads_cparam/state_9.json b/tests/runner/remote_state_reads_cparam/state_9.json new file mode 100644 index 000000000..8d9857c02 --- /dev/null +++ b/tests/runner/remote_state_reads_cparam/state_9.json @@ -0,0 +1,143 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_2", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_3", + "type": "Uint64", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_4_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_5_1", + "type": "Map (Uint128) (Bool)", + "value": [] + }, + { + "vname": "remote_reads_test_res_5_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_5_5", + "type": "Option (Option Bool)", + "value": { + "constructor": "None", + "argtypes": ["Option (Bool)"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_6_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_6_2", + "type": "String", + "value": "" + }, + { + "vname": "remote_reads_test_res_7_3", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_7_6", + "type": "Option Bool", + "value": { + "constructor": "None", + "argtypes": ["Bool"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_8", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_9", + "type": "Option Uint128", + "value": { + "constructor": "None", + "argtypes": ["Uint128"], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_10", + "type": "ByStr20", + "value": "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname": "address_type_erasure_test_res_1", + "type": "Map Uint128 (ByStr20 with end)", + "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "cparams": [ + { "vname": "admin", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567891" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x1234567890123456789012345678901234567890" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "x", "type": "Uint128", "value": "2801" }, + { "vname": "y", "type": "Uint64", "value": "1" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, + { "vname": "x", "type": "Uint128", "value": "2801" }, + { "vname": "y", "type": "Uint64", "value": "1234" } + ] + } + ] + } +] diff --git a/tests/runner/replicate/state_1.json b/tests/runner/replicate/state_1.json index 024e41f41..d15f172c1 100644 --- a/tests/runner/replicate/state_1.json +++ b/tests/runner/replicate/state_1.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x55345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/replicate/state_100.json b/tests/runner/replicate/state_100.json index 024e41f41..d15f172c1 100644 --- a/tests/runner/replicate/state_100.json +++ b/tests/runner/replicate/state_100.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x55345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/replicate/state_101.json b/tests/runner/replicate/state_101.json index 024e41f41..d15f172c1 100644 --- a/tests/runner/replicate/state_101.json +++ b/tests/runner/replicate/state_101.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x55345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/replicate/state_2.json b/tests/runner/replicate/state_2.json index 024e41f41..d15f172c1 100644 --- a/tests/runner/replicate/state_2.json +++ b/tests/runner/replicate/state_2.json @@ -10,6 +10,7 @@ "value": [ { "address": "0x55345678901234567890123456789012345678ff", + "cparams": [], "state": [ { "vname": "_nonce", diff --git a/tests/runner/salarybot/state_0.json b/tests/runner/salarybot/state_0.json index da09b8a0e..98e10b0cb 100644 --- a/tests/runner/salarybot/state_0.json +++ b/tests/runner/salarybot/state_0.json @@ -15,6 +15,7 @@ "value": [ { "address": "0x1234567890123456789012345678901234567890", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "100000242" } ] diff --git a/tests/runner/type_casts/blockchain_38.json b/tests/runner/type_casts/blockchain_38.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/type_casts/blockchain_38.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/type_casts/blockchain_39.json b/tests/runner/type_casts/blockchain_39.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/type_casts/blockchain_39.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/type_casts/blockchain_40.json b/tests/runner/type_casts/blockchain_40.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/type_casts/blockchain_40.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/type_casts/blockchain_41.json b/tests/runner/type_casts/blockchain_41.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/type_casts/blockchain_41.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/type_casts/blockchain_42.json b/tests/runner/type_casts/blockchain_42.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/type_casts/blockchain_42.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/type_casts/message_38.json b/tests/runner/type_casts/message_38.json new file mode 100644 index 000000000..f0eeeaf89 --- /dev/null +++ b/tests/runner/type_casts/message_38.json @@ -0,0 +1,13 @@ +{ + "_tag": "CastTest9", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "x", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/type_casts/message_39.json b/tests/runner/type_casts/message_39.json new file mode 100644 index 000000000..aaa199a19 --- /dev/null +++ b/tests/runner/type_casts/message_39.json @@ -0,0 +1,13 @@ +{ + "_tag": "CastTest10", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "x", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/type_casts/message_40.json b/tests/runner/type_casts/message_40.json new file mode 100644 index 000000000..f951b7039 --- /dev/null +++ b/tests/runner/type_casts/message_40.json @@ -0,0 +1,13 @@ +{ + "_tag": "CastTest11", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "x", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/type_casts/message_41.json b/tests/runner/type_casts/message_41.json new file mode 100644 index 000000000..f951b7039 --- /dev/null +++ b/tests/runner/type_casts/message_41.json @@ -0,0 +1,13 @@ +{ + "_tag": "CastTest11", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "x", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/type_casts/message_42.json b/tests/runner/type_casts/message_42.json new file mode 100644 index 000000000..f951b7039 --- /dev/null +++ b/tests/runner/type_casts/message_42.json @@ -0,0 +1,13 @@ +{ + "_tag": "CastTest11", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "x", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/type_casts/output_1.json b/tests/runner/type_casts/output_1.json index 3875cb9d4..ca87caa77 100644 --- a/tests/runner/type_casts/output_1.json +++ b/tests/runner/type_casts/output_1.json @@ -189,7 +189,71 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} + diff --git a/tests/runner/type_casts/output_10.json b/tests/runner/type_casts/output_10.json index b2124c292..791688ebf 100644 --- a/tests/runner/type_casts/output_10.json +++ b/tests/runner/type_casts/output_10.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_11.json b/tests/runner/type_casts/output_11.json index a8b439af3..b4c037de7 100644 --- a/tests/runner/type_casts/output_11.json +++ b/tests/runner/type_casts/output_11.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_12.json b/tests/runner/type_casts/output_12.json index a8b439af3..b4c037de7 100644 --- a/tests/runner/type_casts/output_12.json +++ b/tests/runner/type_casts/output_12.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_13.json b/tests/runner/type_casts/output_13.json index 15c160564..3a81132c4 100644 --- a/tests/runner/type_casts/output_13.json +++ b/tests/runner/type_casts/output_13.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_14.json b/tests/runner/type_casts/output_14.json index 6ae149dbf..2085f57cb 100644 --- a/tests/runner/type_casts/output_14.json +++ b/tests/runner/type_casts/output_14.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_15.json b/tests/runner/type_casts/output_15.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_15.json +++ b/tests/runner/type_casts/output_15.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_16.json b/tests/runner/type_casts/output_16.json index f04427596..ab6db676a 100644 --- a/tests/runner/type_casts/output_16.json +++ b/tests/runner/type_casts/output_16.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_17.json b/tests/runner/type_casts/output_17.json index f04427596..ab6db676a 100644 --- a/tests/runner/type_casts/output_17.json +++ b/tests/runner/type_casts/output_17.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_18.json b/tests/runner/type_casts/output_18.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_18.json +++ b/tests/runner/type_casts/output_18.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_19.json b/tests/runner/type_casts/output_19.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_19.json +++ b/tests/runner/type_casts/output_19.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_2.json b/tests/runner/type_casts/output_2.json index 3875cb9d4..9190d7f54 100644 --- a/tests/runner/type_casts/output_2.json +++ b/tests/runner/type_casts/output_2.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_20.json b/tests/runner/type_casts/output_20.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_20.json +++ b/tests/runner/type_casts/output_20.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_21.json b/tests/runner/type_casts/output_21.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_21.json +++ b/tests/runner/type_casts/output_21.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_22.json b/tests/runner/type_casts/output_22.json index 8bb1f30b0..6da25e9ed 100644 --- a/tests/runner/type_casts/output_22.json +++ b/tests/runner/type_casts/output_22.json @@ -191,7 +191,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_23.json b/tests/runner/type_casts/output_23.json index 8bb1f30b0..6da25e9ed 100644 --- a/tests/runner/type_casts/output_23.json +++ b/tests/runner/type_casts/output_23.json @@ -191,7 +191,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_24.json b/tests/runner/type_casts/output_24.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_24.json +++ b/tests/runner/type_casts/output_24.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_25.json b/tests/runner/type_casts/output_25.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_25.json +++ b/tests/runner/type_casts/output_25.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_26.json b/tests/runner/type_casts/output_26.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_26.json +++ b/tests/runner/type_casts/output_26.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_27.json b/tests/runner/type_casts/output_27.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_27.json +++ b/tests/runner/type_casts/output_27.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_28.json b/tests/runner/type_casts/output_28.json index f1477a1e0..643f1fda2 100644 --- a/tests/runner/type_casts/output_28.json +++ b/tests/runner/type_casts/output_28.json @@ -191,7 +191,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_29.json b/tests/runner/type_casts/output_29.json index f1477a1e0..643f1fda2 100644 --- a/tests/runner/type_casts/output_29.json +++ b/tests/runner/type_casts/output_29.json @@ -191,7 +191,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_3.json b/tests/runner/type_casts/output_3.json index c2177f165..848a65c10 100644 --- a/tests/runner/type_casts/output_3.json +++ b/tests/runner/type_casts/output_3.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_30.json b/tests/runner/type_casts/output_30.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_30.json +++ b/tests/runner/type_casts/output_30.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_31.json b/tests/runner/type_casts/output_31.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_31.json +++ b/tests/runner/type_casts/output_31.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_32.json b/tests/runner/type_casts/output_32.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_32.json +++ b/tests/runner/type_casts/output_32.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_33.json b/tests/runner/type_casts/output_33.json index c04102479..f4246539c 100644 --- a/tests/runner/type_casts/output_33.json +++ b/tests/runner/type_casts/output_33.json @@ -191,7 +191,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_34.json b/tests/runner/type_casts/output_34.json index c04102479..f4246539c 100644 --- a/tests/runner/type_casts/output_34.json +++ b/tests/runner/type_casts/output_34.json @@ -191,7 +191,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_35.json b/tests/runner/type_casts/output_35.json index b3cb02660..6af5b631f 100644 --- a/tests/runner/type_casts/output_35.json +++ b/tests/runner/type_casts/output_35.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_36.json b/tests/runner/type_casts/output_36.json index bc0022ce7..233374c4e 100644 --- a/tests/runner/type_casts/output_36.json +++ b/tests/runner/type_casts/output_36.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_37.json b/tests/runner/type_casts/output_37.json index e71a38f58..f132c8f14 100644 --- a/tests/runner/type_casts/output_37.json +++ b/tests/runner/type_casts/output_37.json @@ -191,7 +191,70 @@ "vname": "test_6_4_failed_cast", "type": "Bool", "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_38.json b/tests/runner/type_casts/output_38.json new file mode 100644 index 000000000..999542252 --- /dev/null +++ b/tests/runner/type_casts/output_38.json @@ -0,0 +1,258 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7951", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "Some", + "argtypes": [ "Uint128" ], + "arguments": [ "1289" ] + } + }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with end" ], + "arguments": [] + } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_4_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_1_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_2_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_7_h_res", + "type": "Option (Int256)", + "value": { + "constructor": "None", + "argtypes": [ "Int256" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/type_casts/output_39.json b/tests/runner/type_casts/output_39.json new file mode 100644 index 000000000..4babffbe1 --- /dev/null +++ b/tests/runner/type_casts/output_39.json @@ -0,0 +1,260 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7939", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "Some", + "argtypes": [ "String" ], + "arguments": [ "0xabfeccdc9012345678901234567890f777564324" ] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "True", "argtypes": [], "arguments": [] } + ] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "Some", + "argtypes": [ "Uint128" ], + "arguments": [ "1281" ] + } + }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with end" ], + "arguments": [] + } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_4_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_1_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_2_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_7_h_res", + "type": "Option (Int256)", + "value": { + "constructor": "None", + "argtypes": [ "Int256" ], + "arguments": [] + } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/type_casts/output_4.json b/tests/runner/type_casts/output_4.json index c2177f165..848a65c10 100644 --- a/tests/runner/type_casts/output_4.json +++ b/tests/runner/type_casts/output_4.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_40.json b/tests/runner/type_casts/output_40.json new file mode 100644 index 000000000..478c859f4 --- /dev/null +++ b/tests/runner/type_casts/output_40.json @@ -0,0 +1,260 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7941", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "Some", + "argtypes": [ "String" ], + "arguments": [ "0xabfeccdc9012345678567890f777564324" ] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "Some", + "argtypes": [ "Bool" ], + "arguments": [ + { "constructor": "False", "argtypes": [], "arguments": [] } + ] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "Some", + "argtypes": [ "Uint128" ], + "arguments": [ "128" ] + } + }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with end" ], + "arguments": [] + } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_4_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_1_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_2_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_7_h_res", + "type": "Option (Int256)", + "value": { + "constructor": "None", + "argtypes": [ "Int256" ], + "arguments": [] + } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/type_casts/output_41.json b/tests/runner/type_casts/output_41.json new file mode 100644 index 000000000..fc0342667 --- /dev/null +++ b/tests/runner/type_casts/output_41.json @@ -0,0 +1,258 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7955", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with end" ], + "arguments": [] + } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_4_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_1_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_2_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_7_h_res", + "type": "Option (Int256)", + "value": { + "constructor": "None", + "argtypes": [ "Int256" ], + "arguments": [] + } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/type_casts/output_42.json b/tests/runner/type_casts/output_42.json new file mode 100644 index 000000000..6af5b631f --- /dev/null +++ b/tests/runner/type_casts/output_42.json @@ -0,0 +1,258 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7955", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with end" ], + "arguments": [] + } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { + "constructor": "None", + "argtypes": [ "ByStr20 with contract end" ], + "arguments": [] + } + }, + { + "vname": "test_4_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_1_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_5_2_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_1_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_2_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_3_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_7_h_res", + "type": "Option (Int256)", + "value": { + "constructor": "None", + "argtypes": [ "Int256" ], + "arguments": [] + } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + } + ], + "events": [] +} diff --git a/tests/runner/type_casts/output_5.json b/tests/runner/type_casts/output_5.json index c2177f165..848a65c10 100644 --- a/tests/runner/type_casts/output_5.json +++ b/tests/runner/type_casts/output_5.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_6.json b/tests/runner/type_casts/output_6.json index 1e3ad08ab..22bef9686 100644 --- a/tests/runner/type_casts/output_6.json +++ b/tests/runner/type_casts/output_6.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_7.json b/tests/runner/type_casts/output_7.json index a8b439af3..b4c037de7 100644 --- a/tests/runner/type_casts/output_7.json +++ b/tests/runner/type_casts/output_7.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_8.json b/tests/runner/type_casts/output_8.json index b2124c292..791688ebf 100644 --- a/tests/runner/type_casts/output_8.json +++ b/tests/runner/type_casts/output_8.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/output_9.json b/tests/runner/type_casts/output_9.json index b2124c292..791688ebf 100644 --- a/tests/runner/type_casts/output_9.json +++ b/tests/runner/type_casts/output_9.json @@ -189,7 +189,70 @@ "argtypes": [ "Int256" ], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option (Uint128)", + "value": { + "constructor": "None", + "argtypes": [ "Uint128" ], + "arguments": [] + } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option (String)", + "value": { + "constructor": "None", + "argtypes": [ "String" ], + "arguments": [] + } } ], "events": [] -} \ No newline at end of file +} diff --git a/tests/runner/type_casts/state_1.json b/tests/runner/type_casts/state_1.json index ee6a60749..83fac3e8a 100644 --- a/tests/runner/type_casts/state_1.json +++ b/tests/runner/type_casts/state_1.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/type_casts/state_10.json b/tests/runner/type_casts/state_10.json index e3adf85b7..5b1f04bbd 100644 --- a/tests/runner/type_casts/state_10.json +++ b/tests/runner/type_casts/state_10.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/type_casts/state_11.json b/tests/runner/type_casts/state_11.json index d735d1114..79b958f0c 100644 --- a/tests/runner/type_casts/state_11.json +++ b/tests/runner/type_casts/state_11.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" } diff --git a/tests/runner/type_casts/state_12.json b/tests/runner/type_casts/state_12.json index 18181296a..3cae975fa 100644 --- a/tests/runner/type_casts/state_12.json +++ b/tests/runner/type_casts/state_12.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" } diff --git a/tests/runner/type_casts/state_13.json b/tests/runner/type_casts/state_13.json index ee6a60749..83fac3e8a 100644 --- a/tests/runner/type_casts/state_13.json +++ b/tests/runner/type_casts/state_13.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/type_casts/state_14.json b/tests/runner/type_casts/state_14.json index d85b7920d..8bfe900cc 100644 --- a/tests/runner/type_casts/state_14.json +++ b/tests/runner/type_casts/state_14.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/type_casts/state_15.json b/tests/runner/type_casts/state_15.json index 18181296a..3cae975fa 100644 --- a/tests/runner/type_casts/state_15.json +++ b/tests/runner/type_casts/state_15.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" } diff --git a/tests/runner/type_casts/state_16.json b/tests/runner/type_casts/state_16.json index 9ddf1b421..776113104 100644 --- a/tests/runner/type_casts/state_16.json +++ b/tests/runner/type_casts/state_16.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/type_casts/state_17.json b/tests/runner/type_casts/state_17.json index 6b4a45d00..6bab042f4 100644 --- a/tests/runner/type_casts/state_17.json +++ b/tests/runner/type_casts/state_17.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/type_casts/state_18.json b/tests/runner/type_casts/state_18.json index d735d1114..79b958f0c 100644 --- a/tests/runner/type_casts/state_18.json +++ b/tests/runner/type_casts/state_18.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" } diff --git a/tests/runner/type_casts/state_19.json b/tests/runner/type_casts/state_19.json index 18181296a..3cae975fa 100644 --- a/tests/runner/type_casts/state_19.json +++ b/tests/runner/type_casts/state_19.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" } diff --git a/tests/runner/type_casts/state_2.json b/tests/runner/type_casts/state_2.json index e3adf85b7..5b1f04bbd 100644 --- a/tests/runner/type_casts/state_2.json +++ b/tests/runner/type_casts/state_2.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/type_casts/state_20.json b/tests/runner/type_casts/state_20.json index 667ecce99..4b992f673 100644 --- a/tests/runner/type_casts/state_20.json +++ b/tests/runner/type_casts/state_20.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/type_casts/state_21.json b/tests/runner/type_casts/state_21.json index fd99c6e24..930db1422 100644 --- a/tests/runner/type_casts/state_21.json +++ b/tests/runner/type_casts/state_21.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/type_casts/state_22.json b/tests/runner/type_casts/state_22.json index d85b7920d..8bfe900cc 100644 --- a/tests/runner/type_casts/state_22.json +++ b/tests/runner/type_casts/state_22.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/type_casts/state_23.json b/tests/runner/type_casts/state_23.json index e0d9951b1..410bf13fe 100644 --- a/tests/runner/type_casts/state_23.json +++ b/tests/runner/type_casts/state_23.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/type_casts/state_24.json b/tests/runner/type_casts/state_24.json index d33fc4dc8..66d7453e1 100644 --- a/tests/runner/type_casts/state_24.json +++ b/tests/runner/type_casts/state_24.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" }, diff --git a/tests/runner/type_casts/state_25.json b/tests/runner/type_casts/state_25.json index ddcd674f6..57ac6b621 100644 --- a/tests/runner/type_casts/state_25.json +++ b/tests/runner/type_casts/state_25.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "2442" } diff --git a/tests/runner/type_casts/state_26.json b/tests/runner/type_casts/state_26.json index 92e41058c..5c2740eb9 100644 --- a/tests/runner/type_casts/state_26.json +++ b/tests/runner/type_casts/state_26.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_27.json b/tests/runner/type_casts/state_27.json index 759b04c62..3f6034fdb 100644 --- a/tests/runner/type_casts/state_27.json +++ b/tests/runner/type_casts/state_27.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_28.json b/tests/runner/type_casts/state_28.json index b66c46d86..c01ec00e3 100644 --- a/tests/runner/type_casts/state_28.json +++ b/tests/runner/type_casts/state_28.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_29.json b/tests/runner/type_casts/state_29.json index e0472fdab..42dca9bf5 100644 --- a/tests/runner/type_casts/state_29.json +++ b/tests/runner/type_casts/state_29.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_3.json b/tests/runner/type_casts/state_3.json index ee6a60749..83fac3e8a 100644 --- a/tests/runner/type_casts/state_3.json +++ b/tests/runner/type_casts/state_3.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/type_casts/state_30.json b/tests/runner/type_casts/state_30.json index 2037832ca..356268f56 100644 --- a/tests/runner/type_casts/state_30.json +++ b/tests/runner/type_casts/state_30.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_31.json b/tests/runner/type_casts/state_31.json index 0ff0a0b24..d1f4b4770 100644 --- a/tests/runner/type_casts/state_31.json +++ b/tests/runner/type_casts/state_31.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_32.json b/tests/runner/type_casts/state_32.json index 60219c97d..4bc18084b 100644 --- a/tests/runner/type_casts/state_32.json +++ b/tests/runner/type_casts/state_32.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_33.json b/tests/runner/type_casts/state_33.json index b66c46d86..c01ec00e3 100644 --- a/tests/runner/type_casts/state_33.json +++ b/tests/runner/type_casts/state_33.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_34.json b/tests/runner/type_casts/state_34.json index c73872174..69562cd4f 100644 --- a/tests/runner/type_casts/state_34.json +++ b/tests/runner/type_casts/state_34.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_35.json b/tests/runner/type_casts/state_35.json index 8030d6be8..c0c96eb36 100644 --- a/tests/runner/type_casts/state_35.json +++ b/tests/runner/type_casts/state_35.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_36.json b/tests/runner/type_casts/state_36.json index 60219c97d..4bc18084b 100644 --- a/tests/runner/type_casts/state_36.json +++ b/tests/runner/type_casts/state_36.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, diff --git a/tests/runner/type_casts/state_37.json b/tests/runner/type_casts/state_37.json index c9bc69887..4e74cdd0b 100644 --- a/tests/runner/type_casts/state_37.json +++ b/tests/runner/type_casts/state_37.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "242" }, @@ -120,6 +156,7 @@ }, { "address": "0xabfeccdc9012345678901234567890f777564324", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "22" }, diff --git a/tests/runner/type_casts/state_38.json b/tests/runner/type_casts/state_38.json new file mode 100644 index 000000000..2568e45c9 --- /dev/null +++ b/tests/runner/type_casts/state_38.json @@ -0,0 +1,162 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with end"], "arguments": [] } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_4_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_1_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_2_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_7_h_res", + "type": "Option Int256", + "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "f", "type": "Uint128", "value": "1289" }, + { "vname": "g", "type": "Bool", "value": { "constructor": "True", "argtypes": [], "arguments": [] } } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "242" }, + { "vname": "f", "type": "String", "value": "0xabfeccdc9012345678901234567890f777564324" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + } + ] + } +] diff --git a/tests/runner/type_casts/state_39.json b/tests/runner/type_casts/state_39.json new file mode 100644 index 000000000..b4d78435f --- /dev/null +++ b/tests/runner/type_casts/state_39.json @@ -0,0 +1,162 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with end"], "arguments": [] } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_4_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_1_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_2_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_7_h_res", + "type": "Option Int256", + "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "f", "type": "Uint128", "value": "1281" }, + { "vname": "g", "type": "Bool", "value": { "constructor": "True", "argtypes": [], "arguments": [] } } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "242" }, + { "vname": "f", "type": "String", "value": "0xabfeccdc9012345678901234567890f777564324" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + } + ] + } +] diff --git a/tests/runner/type_casts/state_4.json b/tests/runner/type_casts/state_4.json index e3adf85b7..5b1f04bbd 100644 --- a/tests/runner/type_casts/state_4.json +++ b/tests/runner/type_casts/state_4.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/type_casts/state_40.json b/tests/runner/type_casts/state_40.json new file mode 100644 index 000000000..ed45c7b6d --- /dev/null +++ b/tests/runner/type_casts/state_40.json @@ -0,0 +1,162 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with end"], "arguments": [] } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_4_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_1_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_2_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_7_h_res", + "type": "Option Int256", + "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "f", "type": "Uint128", "value": "128" }, + { "vname": "g", "type": "Bool", "value": { "constructor": "False", "argtypes": [], "arguments": [] } } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "242" }, + { "vname": "f", "type": "String", "value": "0xabfeccdc9012345678567890f777564324" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + } + ] + } +] diff --git a/tests/runner/type_casts/state_41.json b/tests/runner/type_casts/state_41.json new file mode 100644 index 000000000..9240edb56 --- /dev/null +++ b/tests/runner/type_casts/state_41.json @@ -0,0 +1,161 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with end"], "arguments": [] } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_4_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_1_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_2_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_7_h_res", + "type": "Option Int256", + "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "f", "type": "Uint128", "value": "128" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "242" }, + { "vname": "f", "type": "String", "value": "0xabfeccdc9012345678567890f777564324" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + } + ] + } +] diff --git a/tests/runner/type_casts/state_42.json b/tests/runner/type_casts/state_42.json new file mode 100644 index 000000000..fcc6ed359 --- /dev/null +++ b/tests/runner/type_casts/state_42.json @@ -0,0 +1,162 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_1_res", + "type": "Option (ByStr20 with end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with end"], "arguments": [] } + }, + { + "vname": "test_2_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_3_res", + "type": "Option (ByStr20 with contract end)", + "value": { "constructor": "None", "argtypes": ["ByStr20 with contract end"], "arguments": [] } + }, + { + "vname": "test_4_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_1_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_5_2_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_1_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_2_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_2_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_3_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_3_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_bal_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_6_4_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_6_4_failed_cast", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "test_7_g_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_7_h_res", + "type": "Option Int256", + "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } + }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [ + { "vname": "f", "type": "Uint128", "value": "128" }, + { "vname": "g", "type": "String", "value": "constructor" } + ], + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "242" }, + { "vname": "f", "type": "String", "value": "0xabfeccdc9012345678567890f777564324" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" } + ] + } + ] + } +] diff --git a/tests/runner/type_casts/state_5.json b/tests/runner/type_casts/state_5.json index ee6a60749..83fac3e8a 100644 --- a/tests/runner/type_casts/state_5.json +++ b/tests/runner/type_casts/state_5.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/type_casts/state_6.json b/tests/runner/type_casts/state_6.json index e3adf85b7..5b1f04bbd 100644 --- a/tests/runner/type_casts/state_6.json +++ b/tests/runner/type_casts/state_6.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/type_casts/state_7.json b/tests/runner/type_casts/state_7.json index d735d1114..79b958f0c 100644 --- a/tests/runner/type_casts/state_7.json +++ b/tests/runner/type_casts/state_7.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "0" } diff --git a/tests/runner/type_casts/state_8.json b/tests/runner/type_casts/state_8.json index 18181296a..3cae975fa 100644 --- a/tests/runner/type_casts/state_8.json +++ b/tests/runner/type_casts/state_8.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" } diff --git a/tests/runner/type_casts/state_9.json b/tests/runner/type_casts/state_9.json index ee6a60749..83fac3e8a 100644 --- a/tests/runner/type_casts/state_9.json +++ b/tests/runner/type_casts/state_9.json @@ -105,12 +105,48 @@ "type": "Option Int256", "value": { "constructor": "None", "argtypes": ["Int256"], "arguments": [] } }, + { + "vname": "test_9_f_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_10_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_10_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, + { + "vname": "test_11_f_immut_res", + "type": "Option Uint128", + "value": { "constructor": "None", "argtypes": ["Uint128"], "arguments": [] } + }, + { + "vname": "test_11_g_immut_res", + "type": "Option Bool", + "value": { "constructor": "None", "argtypes": ["Bool"], "arguments": [] } + }, + { + "vname": "test_11_f_mut_res", + "type": "Option String", + "value": { "constructor": "None", "argtypes": ["String"], "arguments": [] } + }, { "vname": "_external", "type": "Unit", "value": [ { "address": "0xabfeccdc9012345678901234567890f777564323", + "cparams": [], "state": [ { "vname": "_nonce", "type": "Uint64", "value": "0" }, { "vname": "_balance", "type": "Uint128", "value": "42" }, diff --git a/tests/runner/wallet/state_1.json b/tests/runner/wallet/state_1.json index fde9abdcf..b70815b5b 100644 --- a/tests/runner/wallet/state_1.json +++ b/tests/runner/wallet/state_1.json @@ -34,6 +34,7 @@ "value": [ { "address": "0x1234567890123456789012345678906784567890", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/wallet/state_6.json b/tests/runner/wallet/state_6.json index 37041c6d1..001afe2e9 100644 --- a/tests/runner/wallet/state_6.json +++ b/tests/runner/wallet/state_6.json @@ -51,6 +51,7 @@ "value": [ { "address": "0x1234567890123456789012345678906784567890", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/wallet_2/state_1.json b/tests/runner/wallet_2/state_1.json index 133afd24e..1e7d12a09 100644 --- a/tests/runner/wallet_2/state_1.json +++ b/tests/runner/wallet_2/state_1.json @@ -41,6 +41,7 @@ "value": [ { "address": "0x1234567890123456789012345678906784567890", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ] diff --git a/tests/runner/wallet_2/state_2.json b/tests/runner/wallet_2/state_2.json index d0204c548..c6459293f 100644 --- a/tests/runner/wallet_2/state_2.json +++ b/tests/runner/wallet_2/state_2.json @@ -41,6 +41,7 @@ "value": [ { "address": "0x1234567890123456789012345678906000000000", + "cparams": [], "state": [ { "vname": "_balance", "type": "Uint128", "value": "242" } ]