diff --git a/src/base/PrettyPrinters.ml b/src/base/PrettyPrinters.ml index 08b7835ad..6866c0eed 100644 --- a/src/base/PrettyPrinters.ml +++ b/src/base/PrettyPrinters.ml @@ -93,7 +93,8 @@ and literal_to_json lit = ("argtypes", `List argtl); ("arguments", `List argl); ] - | _ -> `Null + | Msg m -> `Assoc (List.map m ~f:(fun (s, _t, l') -> (s, literal_to_json l'))) + | Clo _ | TAbs _ -> `Null let literal_to_jstring ?(pp = false) lit = let j = literal_to_json lit in diff --git a/src/eval/Eval.ml b/src/eval/Eval.ml index 42cf68bc8..0c57fa717 100644 --- a/src/eval/Eval.ml +++ b/src/eval/Eval.ml @@ -376,7 +376,7 @@ let rec stmt_eval conf stmts = 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 s' r in let conf' = Configuration.bind conf (get_id x) l in stmt_eval conf' sts | _ -> @@ -947,8 +947,6 @@ let handle_message (tenv, incoming_funds, procedures, stmts, tname) cstate = in let new_msgs = conf'.emitted in let new_events = conf'.events in - (* Make sure that we aren't too generous and subract funds *) - let%bind cstate'' = post_process_msgs cstate' new_msgs in (*Return new contract state, messages and events *) - pure (cstate'', new_msgs, new_events, conf'.accepted) + pure (cstate', new_msgs, new_events, conf'.accepted) diff --git a/src/eval/EvalUtil.ml b/src/eval/EvalUtil.ml index a5d82be50..628c298db 100644 --- a/src/eval/EvalUtil.ml +++ b/src/eval/EvalUtil.ml @@ -191,40 +191,19 @@ module Configuration = struct ~inst:(EvalName.as_error_string i) (ER.get_loc (get_rep k)) - let remote_load st caddr k = + let remote_load caddr k = let%bind fval = fromR @@ StateService.external_fetch ~caddr ~fname:k ~keys:[] ~ignoreval:false in match fval with - | Some v, _ -> - (* _sender._balance is a special case if funds have been accepted. _amount must be deducted. *) - let%bind sender_addr = lookup_sender_addr st in - if - st.accepted - && EvalLiteral.Bystrx.equal sender_addr caddr - && EvalName.equal (get_id k) balance_label - then - let%bind amount_lit = - fromR - @@ lookup st - (mk_loc_id (label_name_of_string MessagePayload.amount_label)) - in - match (v, amount_lit) with - | UintLit (Uint128L sender_balance), UintLit (Uint128L amount) - when Uint128.compare sender_balance amount >= 0 -> - pure - @@ EvalLiteral.UintLit - (Uint128L Uint128.(sender_balance - amount)) - | _ -> - fail0 ~kind:"Unexpected sender balance or amount literal" - ~inst: - (sprintf "sender balance = %s, amount = %s" (pp_literal v) - (pp_literal amount_lit)) - else pure v + | Some v, _ -> pure v | _ -> - fail1 ~kind:"Error loading field" - ~inst:(EvalName.as_error_string (get_id k)) + fail1 ~kind:"Error loading remote field" + ~inst: + (Printf.sprintf "%s at address %s" + (EvalName.as_error_string (get_id k)) + (SLiteral.Bystrx.hex_encoding caddr)) (ER.get_loc (get_rep k)) let remote_field_type caddr k = @@ -394,37 +373,11 @@ module Configuration = struct if st.accepted then (* Do nothing *) pure st else - (* 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) - in let incoming' = st.incoming_funds in - match sender_balance_l with - | UintLit (Uint128L sender_balance) -> - if Uint128.compare incoming' sender_balance > 0 then - fail0 ~kind:"Insufficient sender balance for acceptance" - ~inst: - ("Incoming vs sender_balance: " - ^ Uint128.to_string incoming' - ^ " vs " - ^ Uint128.to_string sender_balance) - else if - (* Although unsigned integer is used, and this check isn't - * necessary, we have it just in case, somehow a malformed - * Uint128 literal manages to reach here. *) - Uint128.compare incoming' Uint128.zero >= 0 - then - let balance = Uint128.add st.balance incoming' in - let accepted = true in - let incoming_funds = Uint128.zero in - pure @@ { st with balance; accepted; incoming_funds } - else - fail0 ~kind:"Incoming balance is negative (somehow)" - ~inst:(Uint128.to_string incoming') - | _ -> - fail0 ~kind:"Unrecognized balance literal at sender" - ~inst:(pp_literal sender_balance_l) + let balance = Uint128.add st.balance incoming' in + let accepted = true in + let incoming_funds = Uint128.zero in + pure @@ { st with balance; accepted; incoming_funds } (* Finds a procedure proc_name, and returns the procedure and the list of procedures in scope for that procedure *) @@ -460,7 +413,7 @@ module Configuration = struct String.compare s t) in if tag_found && amount_found && recipient_found && uniq_entries then - pure m' + pure () else fail0 ~kind:"Message is missing a mandatory field or has duplicate fields" @@ -471,10 +424,32 @@ module Configuration = struct let send_messages conf ms = let%bind ls' = fromR @@ Datatypes.scilla_list_to_ocaml ms in - let%bind ls = mapM ~f:validate_outgoing_message ls' in + let%bind () = forallM ~f:validate_outgoing_message ls' in + let%bind out_funds = + foldM ls' ~init:Uint128.zero ~f:(fun run_total msg_lit -> + match msg_lit with + | SLiteral.Msg msg -> + let%bind amount = fromR @@ MessagePayload.get_amount msg in + pure Uint128.(run_total + amount) + | _ -> + fail0 + ~kind: + "Literal verified as a message, but is not a message literal" + ~inst:(pp_literal msg_lit)) + in let old_emitted = conf.emitted in - let emitted = old_emitted @ ls in - pure { conf with emitted } + let emitted = old_emitted @ ls' in + let old_balance = conf.balance in + let%bind balance = + if Uint128.compare old_balance out_funds < 0 then + fail0 ~kind:"Balance too low for outgoing message" + ~inst: + (sprintf "Current balance: %s. Required balance: %s" + (Uint128.to_string old_balance) + (Uint128.to_string out_funds)) + else pure @@ Uint128.(old_balance - out_funds) + in + pure { conf with emitted; balance } let validate_event m' = let open EvalLiteral in diff --git a/tests/checker/good/Good.ml b/tests/checker/good/Good.ml index b7f84349c..75947eba1 100644 --- a/tests/checker/good/Good.ml +++ b/tests/checker/good/Good.ml @@ -94,6 +94,8 @@ module Tests = Scilla_test.Util.DiffBasedTests (struct "unbox_result5.scilla"; "simple-dex-remote-reads.scilla"; "type_casts.scilla"; + "accounting_tests.scilla"; + "accounting_tests_support.scilla"; "timestamp.scilla"; "codehash.scilla"; "chainid.scilla"; diff --git a/tests/checker/good/gold/accounting_tests.scilla.gold b/tests/checker/good/gold/accounting_tests.scilla.gold new file mode 100644 index 000000000..77e2620e0 --- /dev/null +++ b/tests/checker/good/gold/accounting_tests.scilla.gold @@ -0,0 +1,177 @@ +{ + "cashflow_tags": { + "State variables": [ + { "field": "support_contract", "tag": "NotMoney" }, + { "field": "test_string_1", "tag": "NoInfo" }, + { "field": "test_string_2", "tag": "NoInfo" }, + { "field": "outgoing_amount", "tag": "Money" }, + { "field": "max_outgoing_msgs", "tag": "NotMoney" } + ], + "ADT constructors": [] + }, + "contract_info": { + "scilla_major_version": "0", + "vname": "AccountingTests", + "params": [ + { + "vname": "support_contract", + "type": + "ByStr20 with contract field stored_strings : List (String) end" + } + ], + "fields": [ + { "vname": "test_string_1", "type": "String", "depth": 0 }, + { "vname": "test_string_2", "type": "String", "depth": 0 }, + { "vname": "outgoing_amount", "type": "Uint128", "depth": 0 }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "depth": 0 } + ], + "transitions": [ + { "vname": "Reset", "params": [] }, + { "vname": "Test_Insufficient_Balance", "params": [] }, + { "vname": "Test_Send_1", "params": [] }, + { "vname": "Finalize_Test_Send_1", "params": [] }, + { "vname": "Test_Send_2", "params": [] }, + { "vname": "Finalize_Test_Send_2", "params": [] }, + { "vname": "Test_Send_3", "params": [] }, + { "vname": "Test_Send_3_Helper", "params": [] }, + { "vname": "Finalize_Test_Send_3", "params": [] }, + { + "vname": "CheckSenderBalance", + "params": [ { "vname": "expected_balance", "type": "Uint128" } ] + }, + { + "vname": "CheckRecipientBalance", + "params": [ { "vname": "expected_balance", "type": "Uint128" } ] + }, + { "vname": "Test_Send_4", "params": [] }, + { "vname": "Test_Send_5", "params": [] }, + { "vname": "Test_Send_6", "params": [] }, + { "vname": "Test_Send_7", "params": [] }, + { "vname": "Test_Send_8", "params": [] }, + { "vname": "Test_Send_9", "params": [] }, + { "vname": "Test_Send_10", "params": [] }, + { "vname": "Test_Send_11", "params": [] }, + { "vname": "Test_Send_12", "params": [] }, + { "vname": "Test_Send_13", "params": [] }, + { "vname": "Test_Send_14", "params": [] }, + { "vname": "Test_Send_15", "params": [] }, + { "vname": "Test_Send_16", "params": [] }, + { "vname": "Test_Send_17", "params": [] }, + { "vname": "Test_Send_18", "params": [] }, + { "vname": "Test_Send_19", "params": [] } + ], + "procedures": [ + { "vname": "AssertReset", "params": [] }, + { + "vname": "Finalize_Test_Send_Helper_2_Msgs", + "params": [ { "vname": "test_no", "type": "Uint128" } ] + }, + { + "vname": "CheckBalance", + "params": [ { "vname": "expected_balance", "type": "Uint128" } ] + }, + { + "vname": "CheckSupportBalance", + "params": [ { "vname": "expected_balance", "type": "Uint128" } ] + } + ], + "events": [], + "ADTs": [ + { + "tname": "Option", + "tparams": [ "'A" ], + "tmap": [ + { "cname": "Some", "argtypes": [ "'A" ] }, + { "cname": "None", "argtypes": [] } + ] + }, + { + "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": + "Read only field, consider making it a contract parameter: test_string_2", + "start_location": { + "file": "contracts/accounting_tests.scilla", + "line": 83, + "column": 9 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": + "Read only field, consider making it a contract parameter: test_string_1", + "start_location": { + "file": "contracts/accounting_tests.scilla", + "line": 76, + "column": 9 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": + "Read only field, consider making it a contract parameter: outgoing_amount", + "start_location": { + "file": "contracts/accounting_tests.scilla", + "line": 45, + "column": 13 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": + "Read only field, consider making it a contract parameter: max_outgoing_msgs", + "start_location": { + "file": "contracts/accounting_tests.scilla", + "line": 46, + "column": 15 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + }, + { + "warning_message": "Unused load statement to: s1", + "start_location": { + "file": "contracts/accounting_tests.scilla", + "line": 152, + "column": 3 + }, + "end_location": { "file": "", "line": 0, "column": 0 }, + "warning_id": 3 + } + ], + "gas_remaining": "7916" +} + diff --git a/tests/checker/good/gold/accounting_tests_support.scilla.gold b/tests/checker/good/gold/accounting_tests_support.scilla.gold new file mode 100644 index 000000000..1f48c4c14 --- /dev/null +++ b/tests/checker/good/gold/accounting_tests_support.scilla.gold @@ -0,0 +1,121 @@ +{ + "cashflow_tags": { + "State variables": [ + { "field": "stored_strings", "tag": "(List NoInfo)" } + ], + "ADT constructors": [] + }, + "contract_info": { + "scilla_major_version": "0", + "vname": "AccountingTestsSupport", + "params": [], + "fields": [ + { "vname": "stored_strings", "type": "List (String)", "depth": 0 } + ], + "transitions": [ + { "vname": "Reset", "params": [] }, + { + "vname": "StoreString", + "params": [ { "vname": "s", "type": "String" } ] + }, + { "vname": "Accept", "params": [] }, + { "vname": "AcceptTwice", "params": [] }, + { "vname": "NonAccept", "params": [] }, + { "vname": "AcceptAndCheckBalance", "params": [] }, + { "vname": "AcceptTwiceAndCheckBalance", "params": [] }, + { "vname": "AcceptAndCheckSenderBalance", "params": [] }, + { + "vname": "NoAcceptAndCheckSenderBalance", + "params": [ { "vname": "expected_balance", "type": "Uint128" } ] + }, + { + "vname": "AcceptAndCheckSenderBalanceAgainstExpected", + "params": [ { "vname": "expected_balance", "type": "Uint128" } ] + } + ], + "procedures": [ + { + "vname": "CheckBalance", + "params": [ { "vname": "expected_balance", "type": "Uint128" } ] + }, + { + "vname": "CheckSenderBalance", + "params": [ { "vname": "expected_balance", "type": "Uint128" } ] + } + ], + "events": [], + "ADTs": [ + { + "tname": "Option", + "tparams": [ "'A" ], + "tmap": [ + { "cname": "Some", "argtypes": [ "'A" ] }, + { "cname": "None", "argtypes": [] } + ] + }, + { + "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": + "transition AcceptTwiceAndCheckBalance has a potential code path with duplicate accept statements:\n Accept at contracts/accounting_tests_support.scilla:65:3\n Accept at contracts/accounting_tests_support.scilla:68:3\n", + "start_location": { + "file": "contracts/accounting_tests_support.scilla", + "line": 65, + "column": 3 + }, + "end_location": { + "file": "contracts/accounting_tests_support.scilla", + "line": 68, + "column": 9 + }, + "warning_id": 1 + }, + { + "warning_message": + "transition AcceptTwice has a potential code path with duplicate accept statements:\n Accept at contracts/accounting_tests_support.scilla:23:3\n Accept at contracts/accounting_tests_support.scilla:24:3\n", + "start_location": { + "file": "contracts/accounting_tests_support.scilla", + "line": 23, + "column": 3 + }, + "end_location": { + "file": "contracts/accounting_tests_support.scilla", + "line": 24, + "column": 9 + }, + "warning_id": 1 + } + ], + "gas_remaining": "7999" +} + diff --git a/tests/checker/good/gold/remote_state_reads.scilla.gold b/tests/checker/good/gold/remote_state_reads.scilla.gold index d4841488c..8a9c1ca47 100644 --- a/tests/checker/good/gold/remote_state_reads.scilla.gold +++ b/tests/checker/good/gold/remote_state_reads.scilla.gold @@ -42,7 +42,8 @@ { "vname": "cparam2", "type": "ByStr20 with contract end" }, { "vname": "cparam3", - "type": "ByStr20 with contract field admin : ByStr20 with end, field other_map : Map (Uint128) (ByStr20 with end), field owners : Map (ByStr20 with end) (Bool), field signatures : Map (Uint32) (Map (ByStr20 with end) (Bool)), field transactionCount : Uint32 end" + "type": + "ByStr20 with contract field admin : ByStr20 with end, field other_map : Map (Uint128) (ByStr20 with end), field owners : Map (ByStr20 with end) (Bool), field signatures : Map (Uint32) (Map (ByStr20 with end) (Bool)), field transactionCount : Uint32 end" } ], "fields": [ @@ -64,17 +65,20 @@ }, { "vname": "assign_test_5", - "type": "ByStr20 with contract field owners : Map (ByStr20) (Bool) end", + "type": + "ByStr20 with contract field owners : Map (ByStr20) (Bool) end", "depth": 0 }, { "vname": "assign_test_6", - "type": "ByStr20 with contract field signatures : Map (Uint32) (Map (ByStr20) (Bool)) end", + "type": + "ByStr20 with contract field signatures : Map (Uint32) (Map (ByStr20) (Bool)) end", "depth": 0 }, { "vname": "assign_test_7", - "type": "ByStr20 with contract field other_map : Map (Uint128) (ByStr20) end", + "type": + "ByStr20 with contract field other_map : Map (Uint128) (ByStr20) end", "depth": 0 }, { @@ -89,7 +93,8 @@ }, { "vname": "assign_test_10", - "type": "Map (Uint128) (Map (Uint128) (remote_state_reads.AddressADT))", + "type": + "Map (Uint128) (Map (Uint128) (remote_state_reads.AddressADT))", "depth": 2 }, { "vname": "remote_reads_test_res_1_1", "type": "Uint128", "depth": 0 }, @@ -142,7 +147,8 @@ { "vname": "remote2", "type": "ByStr20 with contract end" }, { "vname": "remote3", - "type": "ByStr20 with contract field admin : ByStr20 with end, field owners : Map (ByStr20 with end) (Bool), field signatures : Map (Uint32) (Map (ByStr20 with end) (Bool)), field transactionCount : Uint32 end" + "type": + "ByStr20 with contract field admin : ByStr20 with end, field owners : Map (ByStr20 with end) (Bool), field signatures : Map (Uint32) (Map (ByStr20 with end) (Bool)), field transactionCount : Uint32 end" } ] }, @@ -156,7 +162,8 @@ }, { "vname": "list3", - "type": "List (ByStr20 with contract field g : remote_state_reads.AddressADT end)" + "type": + "List (ByStr20 with contract field g : remote_state_reads.AddressADT end)" }, { "vname": "pair1", @@ -165,14 +172,14 @@ { "vname": "adt1", "type": "remote_state_reads.AddressADT" }, { "vname": "remote1", - "type": "ByStr20 with contract field h : Map (Uint128) (remote_state_reads.AddressADT) end" + "type": + "ByStr20 with contract field h : Map (Uint128) (remote_state_reads.AddressADT) end" } ] }, { "vname": "OutgoingMsgTest", "params": [] }, { "vname": "ExceptionTest", "params": [] }, - { "vname": "AssignTest", "params": [] }, - { "vname": "SenderBalanceTest", "params": [] } + { "vname": "AssignTest", "params": [] } ], "procedures": [], "events": [ @@ -239,101 +246,101 @@ }, "warnings": [ { - "warning_message": "Unused field: assign_test_7", + "warning_message": "Unused field: sender_balance_post", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 31, + "line": 53, "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Unused field: assign_test_6", + "warning_message": "Unused field: sender_balance_mid", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 30, + "line": 52, "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Unused field: assign_test_5", + "warning_message": "Unused field: sender_balance_pre", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 29, + "line": 51, "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Unused field: assign_test_4", + "warning_message": "Unused field: assign_test_7", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 28, + "line": 31, "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Unused field: assign_test_3", + "warning_message": "Unused field: assign_test_6", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 27, + "line": 30, "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Unused field: assign_test_2", + "warning_message": "Unused field: assign_test_5", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 26, + "line": 29, "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Unused field: assign_test_1", + "warning_message": "Unused field: assign_test_4", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 25, + "line": 28, "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Write only field: sender_balance_pre", + "warning_message": "Unused field: assign_test_3", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 167, - "column": 3 + "line": 27, + "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Write only field: sender_balance_post", + "warning_message": "Unused field: assign_test_2", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 175, - "column": 3 + "line": 26, + "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 }, { - "warning_message": "Write only field: sender_balance_mid", + "warning_message": "Unused field: assign_test_1", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 171, - "column": 3 + "line": 25, + "column": 7 }, "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 3 @@ -569,7 +576,8 @@ "warning_id": 3 }, { - "warning_message": "Consider using \"AddFunds\" tag instead of empty tag as suggested by ZRC-5", + "warning_message": + "Consider using \"AddFunds\" tag instead of empty tag as suggested by ZRC-5", "start_location": { "file": "contracts/remote_state_reads.scilla", "line": 125, @@ -579,17 +587,14 @@ "warning_id": 3 }, { - "warning_message": "transition SenderBalanceTest has a potential code path with duplicate accept statements:\n Accept at contracts/remote_state_reads.scilla:169:3\n Accept at contracts/remote_state_reads.scilla:173:3\n", + "warning_message": + "No transition in contract RRContract contains an accept statement\n", "start_location": { "file": "contracts/remote_state_reads.scilla", - "line": 169, - "column": 3 - }, - "end_location": { - "file": "contracts/remote_state_reads.scilla", - "line": 173, - "column": 9 + "line": 11, + "column": 10 }, + "end_location": { "file": "", "line": 0, "column": 0 }, "warning_id": 1 } ], diff --git a/tests/contracts/accounting_tests.scilla b/tests/contracts/accounting_tests.scilla new file mode 100644 index 000000000..0669ab9a4 --- /dev/null +++ b/tests/contracts/accounting_tests.scilla @@ -0,0 +1,540 @@ +scilla_version 0 + +import ListUtils + +library Lib + +let one_msg : Message -> List Message = + fun (m : Message) => + let mty = Nil { Message } in + Cons { Message } m mty + +let list_head_string = @list_head String +let list_eq_string = + let string_eq = fun (x : String) => fun (y : String) => builtin eq x y in + let list_eq_string = @list_eq String in + list_eq_string string_eq + +contract AccountingTests(support_contract : ByStr20 with contract field stored_strings : List String end) + +field test_string_1 : String = "Hello" +field test_string_2 : String = "World" + +field outgoing_amount : Uint128 = Uint128 10 +field max_outgoing_msgs : Uint128 = Uint128 3 + +transition Reset() + msg = { _recipient : support_contract; + _tag : "Reset"; + _amount : Uint128 0 }; + msgs = one_msg msg; + send msgs; + accept +end + +procedure AssertReset() + ss <- & support_contract.stored_strings; + cur_head = list_head_string ss; + match cur_head with + | None => (* OK *) + | Some _ => + e = { _exception : "Support contract not reset" }; + throw e + end; + (* Ensure that sufficient balance is available *) + amount <- outgoing_amount; + max_msgs <- max_outgoing_msgs; + minimum = builtin mul amount max_msgs; + bal <- _balance; + insufficient_balance = builtin lt bal minimum; + match insufficient_balance with + | False => (* OK *) + | True => + e = { _exception : "Insufficient balance for tests" }; + throw e + end +end + +(* Simple test that an error is thrown on the Scilla side if the contract has insufficient balance to cover the outgoing amounts. + Ignore when testing at blockchain level. *) +transition Test_Insufficient_Balance() + amount <- outgoing_amount; + msg1 = { _recipient : support_contract; + _tag : "NonAccept"; + _amount : amount}; + msgs = one_msg msg1; + send msgs +end + +(* ********************************************************* *) +(* TESTS OF THE ORDER OF SENT MESSAGES *) +(* ********************************************************* *) + +(* Test that multiple sends result in messages being processed in the order of the sends *) +transition Test_Send_1() + AssertReset; + s1 <- test_string_1; + msg1 = { _recipient : support_contract; + _tag : "StoreString"; + _amount : Uint128 0; + s : s1}; + msgs1 = one_msg msg1; + send msgs1; + s2 <- test_string_2; + msg2 = { _recipient : support_contract; + _tag : "StoreString"; + _amount : Uint128 0; + s : s2}; + msgs2 = one_msg msg2; + send msgs2; + msg_final = { _recipient : _this_address; + _tag : "Finalize_Test_Send_1"; + _amount : Uint128 0}; + msgs_final = one_msg msg_final; + send msgs_final +end + +procedure Finalize_Test_Send_Helper_2_Msgs(test_no : Uint128) + s1 <- test_string_1; + s2 <- test_string_2; + expected = + let mty = Nil { String } in + let fst = Cons { String } s1 mty in + Cons { String } s2 fst; + actual <- & support_contract.stored_strings; + res = list_eq_string expected actual; + match res with + | True => (* Ok *) + | False => + e = { _exception : "Test_Send failed"; test_no: test_no; expected : expected; actual : actual }; + throw e + end +end + +(* Check that the stored strings at the support contract are in the correct order *) +transition Finalize_Test_Send_1() + x = Uint128 1; + Finalize_Test_Send_Helper_2_Msgs x +end + +(* Test that a send with multiple messages result in messages being processed in the order that the messages appear in in the argument list *) +transition Test_Send_2() + AssertReset; + s1 <- test_string_1; + msg1 = { _recipient : support_contract; + _tag : "StoreString"; + _amount : Uint128 0; + s : s1}; + s2 <- test_string_2; + msg2 = { _recipient : support_contract; + _tag : "StoreString"; + _amount : Uint128 0; + s : s2}; + msgs_tmp = one_msg msg2; + msgs = Cons { Message } msg1 msgs_tmp; + send msgs; + msg_final = { _recipient : _this_address; + _tag : "Finalize_Test_Send_2"; + _amount : Uint128 0}; + msgs_final = one_msg msg_final; + send msgs_final +end + +(* Check that the stored strings at the support contract are in the correct order *) +transition Finalize_Test_Send_2() + x = Uint128 2; + Finalize_Test_Send_Helper_2_Msgs x +end + +(* Test that outgoing messages are processed depth-first *) +transition Test_Send_3() + AssertReset; + s1 <- test_string_1; + msg1 = { _recipient : _this_address; + _tag : "Test_Send_3_Helper"; + _amount : Uint128 0}; + msgs1 = one_msg msg1; + send msgs1; + s2 <- test_string_2; + msg2 = { _recipient : support_contract; + _tag : "StoreString"; + _amount : Uint128 0; + s : s2}; + msgs2 = one_msg msg2; + send msgs2; + msg_final = { _recipient : _this_address; + _tag : "Finalize_Test_Send_3"; + _amount : Uint128 0}; + msgs_final = one_msg msg_final; + send msgs_final +end + +(* Test that outgoing messages are processed depth-first *) +transition Test_Send_3_Helper() + s1 <- test_string_1; + msg1 = { _recipient : support_contract; + _tag : "StoreString"; + _amount : Uint128 0; + s : s1}; + msgs1 = one_msg msg1; + send msgs1 +end + +(* Check that the stored strings at the support contract are in the correct order *) +transition Finalize_Test_Send_3() + x = Uint128 3; + Finalize_Test_Send_Helper_2_Msgs x +end + +(* ********************************************************* *) +(* TESTS OF SEND AND ACCEPT OF ZIL *) +(* ********************************************************* *) + +(* Send should deduct from the current contract's balance. Message construction should not *) +(* Send of multiple messages should deduct all sent money from the current contract's balance. *) +(* Remote read of current contract's balance should be identical to _balance at all times - THIS DOESN'T WORK AFTER ACCEPT BECAUSE OF A MISSING CORNER CASE IN EvalUtil.ml *) +(* Accept should increase current contract's balance, but not decrease sender's balance - THIS DOESN'T WORK BECAUSE OF A CORNER CASE THAT SHOULDN'T BE TREATED AS A CORNER CASE *) +(* Non-acceptance should result in an increase of the sender's balance by the amount in the message *) + +procedure CheckBalance(expected_balance : Uint128) + cur_balance <- _balance; + is_expected = builtin eq expected_balance cur_balance; + match is_expected with + | True => (* OK *) + | False => + e = { _exception : "Unexpected balance"; + expected : expected_balance; + actual : cur_balance }; + throw e + end +end + +transition CheckSenderBalance(expected_balance : Uint128) + CheckBalance expected_balance +end + +procedure CheckSupportBalance(expected_balance : Uint128) + cur_balance <- & support_contract._balance; + is_expected = builtin eq expected_balance cur_balance; + match is_expected with + | True => (* OK *) + | False => + e = { _exception : "Main contract read unexpected support contract balance"; + expected : expected_balance; + actual : cur_balance }; + throw e + end +end + +transition CheckRecipientBalance(expected_balance : Uint128) + CheckSupportBalance expected_balance +end + +(* Check that the current contract's balance is decreased when sending funds in single messages *) +transition Test_Send_4() + AssertReset; + amount <- outgoing_amount; + init_bal <- _balance; + msg1 = { _recipient : support_contract; + _tag : "Accept"; + _amount : amount}; + msgs1 = one_msg msg1; + send msgs1; + expected_intermediate_balance = builtin sub init_bal amount; + CheckBalance expected_intermediate_balance; + msg2 = { _recipient : support_contract; + _tag : "NonAccept"; + _amount : amount}; + msgs2 = one_msg msg2; + send msgs2; + expected_final_balance = builtin sub expected_intermediate_balance amount; + CheckBalance expected_final_balance +end + +(* Check that the current contract's balance is decreased when sending funds in multiple messages in a single send *) +transition Test_Send_5() + AssertReset; + amount <- outgoing_amount; + init_bal <- _balance; + msg1 = { _recipient : support_contract; + _tag : "Accept"; + _amount : amount}; + msg2 = { _recipient : support_contract; + _tag : "NonAccept"; + _amount : amount}; + msgs_tmp = one_msg msg2; + msgs = Cons {Message} msg1 msgs_tmp; + send msgs; + expected_intermediate_balance = builtin sub init_bal amount; + expected_final_balance = builtin sub expected_intermediate_balance amount; + CheckBalance expected_final_balance +end + +(* Check that funds are transferred on acceptance *) +transition Test_Send_6() + AssertReset; + amount <- outgoing_amount; + bal <- _balance; + msg1 = { _recipient : support_contract; + _tag : "Accept"; + _amount : amount}; + msgs1 = one_msg msg1; + send msgs1; + expected_balance = builtin sub bal amount; + msg2 = { _recipient : _this_address; + _tag : "CheckSenderBalance"; + _amount : Uint128 0; + expected_balance : expected_balance }; + msgs2 = one_msg msg2; + send msgs2 +end + +(* Check that funds are returned on non-acceptance *) +transition Test_Send_7() + AssertReset; + amount <- outgoing_amount; + bal <- _balance; + msg1 = { _recipient : support_contract; + _tag : "NonAccept"; + _amount : amount}; + msgs1 = one_msg msg1; + send msgs1; + msg2 = { _recipient : _this_address; + _tag : "CheckSenderBalance"; + _amount : Uint128 0; + expected_balance : bal }; + msgs2 = one_msg msg2; + send msgs2 +end + +(* Check that the recipient's balance isn't updated until the funds are accepted *) +transition Test_Send_8() + AssertReset; + amount <- outgoing_amount; + msg1 = { _recipient : support_contract; + _tag : "AcceptAndCheckBalance"; + _amount : amount}; + msgs1 = one_msg msg1; + send msgs1; + support_bal <- & support_contract._balance; + expected_balance = builtin add support_bal amount; + msg2 = { _recipient : _this_address; + _tag : "CheckRecipientBalance"; + _amount : Uint128 0; + expected_balance : expected_balance }; + msgs2 = one_msg msg2; + send msgs2 +end + +(* Check that the recipient's balance isn't updated if funds are not accepted *) +transition Test_Send_9() + AssertReset; + amount <- outgoing_amount; + msg1 = { _recipient : support_contract; + _tag : "NonAccept"; + _amount : amount}; + msgs1 = one_msg msg1; + send msgs1; + support_bal <- & support_contract._balance; + msg2 = { _recipient : _this_address; + _tag : "CheckRecipientBalance"; + _amount : Uint128 0; + expected_balance : support_bal }; + msgs2 = one_msg msg2; + send msgs2 +end + +(* Check that acceptance does not affect sender's balance *) +transition Test_Send_10() + AssertReset; + amount <- outgoing_amount; + msg1 = { _recipient : support_contract; + _tag : "AcceptAndCheckSenderBalance"; + _amount : amount}; + msgs = one_msg msg1; + send msgs +end + +(* Check that only the first accept affects the recipient's balance *) +transition Test_Send_11() + AssertReset; + amount <- outgoing_amount; + msg1 = { _recipient : support_contract; + _tag : "AcceptTwiceAndCheckBalance"; + _amount : amount}; + msgs = one_msg msg1; + send msgs +end + +(* Check that only one of multiple accepts decrease the sender's balance *) +transition Test_Send_12() + amount <- outgoing_amount; + bal <- _balance; + msg1 = { _recipient : support_contract; + _tag : "AcceptTwiceAndCheckBalance"; + _amount : amount}; + msgs1 = one_msg msg1; + send msgs1; + expected_balance = builtin sub bal amount; + msg2 = { _recipient : _this_address; + _tag : "CheckSenderBalance"; + _amount : Uint128 0; + expected_balance : expected_balance }; + msgs2 = one_msg msg2; + send msgs2 +end + +(* Check that only one of multiple accepts increase the recipient's balance *) +transition Test_Send_13() + (* Check that the recipient's balance isn't updated until the funds are accepted *) + AssertReset; + amount <- outgoing_amount; + msg1 = { _recipient : support_contract; + _tag : "AcceptTwiceAndCheckBalance"; + _amount : amount}; + msgs1 = one_msg msg1; + send msgs1; + support_bal <- & support_contract._balance; + expected_balance = builtin add support_bal amount; + msg2 = { _recipient : _this_address; + _tag : "CheckRecipientBalance"; + _amount : Uint128 0; + expected_balance : expected_balance }; + msgs2 = one_msg msg2; + send msgs2 +end + +(* Check that it is possible to transfer all funds (this ensures that the sender's balance isn't deducted more than once) *) +transition Test_Send_14() + AssertReset; + amount <- _balance; + msg1 = { _recipient : support_contract; + _tag : "Accept"; + _amount : amount}; + msgs = one_msg msg1; + send msgs +end + +(* Check that outgoing amount is deducted before invoking next transition (cash in the envelope) *) +transition Test_Send_15() + AssertReset; + cur_bal <- _balance; + out_amount <- outgoing_amount; + expected_balance_as_seen_from_support = builtin sub cur_bal out_amount; + msg1 = { _recipient : support_contract; + _tag : "NoAcceptAndCheckSenderBalance"; + _amount : out_amount; + expected_balance : expected_balance_as_seen_from_support}; + msgs = one_msg msg1; + send msgs +end + +(* Check that all outgoing amounts are deducted before invoking the first transition (cash in the envelope) *) +transition Test_Send_16() + AssertReset; + cur_bal <- _balance; + out_amount <- outgoing_amount; + tmp_expected_balance = builtin sub cur_bal out_amount; + expected_balance_as_seen_from_support = builtin sub tmp_expected_balance out_amount; + msg1 = { _recipient : support_contract; + _tag : "AcceptAndCheckSenderBalanceAgainstExpected"; + _amount : out_amount; + expected_balance : expected_balance_as_seen_from_support}; + msgs1 = one_msg msg1; + send msgs1; + msg2 = { _recipient : support_contract; + _tag : "AcceptAndCheckSenderBalanceAgainstExpected"; + _amount : out_amount; + expected_balance : expected_balance_as_seen_from_support}; + msgs2 = one_msg msg2; + send msgs2; + msg3 = { _recipient : _this_address; + _tag : "CheckSenderBalance"; + _amount : Uint128 0; + expected_balance : expected_balance_as_seen_from_support}; + msgs3 = one_msg msg3; + send msgs3 +end + +(* Check that all outgoing amounts are deducted before invoking the first transition (cash in the envelope), + but that money is returned from the first message if it is not accepted. *) +transition Test_Send_17() + AssertReset; + cur_bal <- _balance; + out_amount <- outgoing_amount; + final_expected_balance = builtin sub cur_bal out_amount; + first_expected_balance = builtin sub final_expected_balance out_amount; + msg1 = { _recipient : support_contract; + _tag : "NoAcceptAndCheckSenderBalance"; + _amount : out_amount; + expected_balance : first_expected_balance}; + msgs1 = one_msg msg1; + send msgs1; + msg2 = { _recipient : support_contract; + _tag : "AcceptAndCheckSenderBalanceAgainstExpected"; + _amount : out_amount; + expected_balance : final_expected_balance}; + msgs2 = one_msg msg2; + send msgs2; + msg3 = { _recipient : _this_address; + _tag : "CheckSenderBalance"; + _amount : Uint128 0; + expected_balance : final_expected_balance}; + msgs3 = one_msg msg3; + send msgs3 +end + +(* Check that all outgoing amounts are deducted before invoking the first transition (cash in the envelope), + but that money from the last message is returned if not accepted. *) +transition Test_Send_18() + AssertReset; + cur_bal <- _balance; + out_amount <- outgoing_amount; + final_expected_balance = builtin sub cur_bal out_amount; + first_expected_balance = builtin sub final_expected_balance out_amount; + msg1 = { _recipient : support_contract; + _tag : "AcceptAndCheckSenderBalanceAgainstExpected"; + _amount : out_amount; + expected_balance : first_expected_balance}; + msgs1 = one_msg msg1; + send msgs1; + msg2 = { _recipient : support_contract; + _tag : "NoAcceptAndCheckSenderBalance"; + _amount : out_amount; + expected_balance : first_expected_balance}; + msgs2 = one_msg msg2; + send msgs2; + msg3 = { _recipient : _this_address; + _tag : "CheckSenderBalance"; + _amount : Uint128 0; + expected_balance : final_expected_balance}; + msgs3 = one_msg msg3; + send msgs3 +end + +(* Check that all outgoing amounts are deducted before invoking the first transition (cash in the envelope), + but that money from all messages are returned if not accepted. *) +transition Test_Send_19() + AssertReset; + cur_bal <- _balance; out_amount <- outgoing_amount; + middle_expected_balance = builtin sub cur_bal out_amount; + first_expected_balance = builtin sub middle_expected_balance out_amount; + msg1 = { _recipient : support_contract; + _tag : "NoAcceptAndCheckSenderBalance"; + _amount : out_amount; + expected_balance : first_expected_balance}; + msgs1 = one_msg msg1; + send msgs1; + msg2 = { _recipient : support_contract; + _tag : "NoAcceptAndCheckSenderBalance"; + _amount : out_amount; + expected_balance : middle_expected_balance}; + msgs2 = one_msg msg2; + send msgs2; + msg3 = { _recipient : _this_address; + _tag : "CheckSenderBalance"; + _amount : Uint128 0; + expected_balance : cur_bal}; + msgs3 = one_msg msg3; + send msgs3 +end diff --git a/tests/contracts/accounting_tests_support.scilla b/tests/contracts/accounting_tests_support.scilla new file mode 100644 index 000000000..90b0ac1a9 --- /dev/null +++ b/tests/contracts/accounting_tests_support.scilla @@ -0,0 +1,86 @@ +scilla_version 0 + +contract AccountingTestsSupport() + +field stored_strings : List String = Nil { String } + +transition Reset() + new_strings = Nil { String }; + stored_strings := new_strings +end + +transition StoreString (s : String) + old_strings <- stored_strings; + new_strings = Cons { String } s old_strings; + stored_strings := new_strings +end + +transition Accept() + accept +end + +transition AcceptTwice() + accept; + accept +end + +transition NonAccept() +end + +procedure CheckBalance(expected_balance : Uint128) + cur_balance <- _balance; + is_expected = builtin eq expected_balance cur_balance; + match is_expected with + | True => (* OK *) + | False => + e = { _exception : "Unexpected balance at support contract"; + expected : expected_balance; + actual : cur_balance }; + throw e + end +end + +procedure CheckSenderBalance(expected_balance : Uint128) + cur_balance <-& _sender._balance; + is_expected = builtin eq expected_balance cur_balance; + match is_expected with + | True => (* OK *) + | False => + e = { _exception : "Unexpected sender balance read by support contract"; + expected : expected_balance; + actual : cur_balance }; + throw e + end +end + +transition AcceptAndCheckBalance() + init_bal <- _balance; + accept; + expected_balance = builtin add init_bal _amount; + CheckBalance expected_balance +end + +transition AcceptTwiceAndCheckBalance() + init_bal <- _balance; + accept; + expected_balance = builtin add init_bal _amount; + CheckBalance expected_balance; + accept; + CheckBalance expected_balance +end + +transition AcceptAndCheckSenderBalance() + init_bal <- & _sender._balance; + accept; + CheckSenderBalance init_bal +end + +transition NoAcceptAndCheckSenderBalance(expected_balance : Uint128) + CheckSenderBalance expected_balance +end + +transition AcceptAndCheckSenderBalanceAgainstExpected(expected_balance : Uint128) + CheckSenderBalance expected_balance; + accept; + CheckSenderBalance expected_balance +end diff --git a/tests/contracts/remote_state_reads.scilla b/tests/contracts/remote_state_reads.scilla index 8698f663d..f59c2ecea 100644 --- a/tests/contracts/remote_state_reads.scilla +++ b/tests/contracts/remote_state_reads.scilla @@ -160,17 +160,3 @@ transition AssignTest() k2 = Uint128 42; assign_test_10[k1][k2] := x end - -(* Check that sender balance is deducted on acceptance *) -transition SenderBalanceTest() - pre <-& _sender._balance; - sender_balance_pre := pre; - (* First accept should cause sender balance to decrease *) - accept; - mid <-& _sender._balance; - sender_balance_mid := mid; - (* Second accept should make no difference *) - accept; - post <-& _sender._balance; - sender_balance_post := post -end diff --git a/tests/runner/Testcontracts.ml b/tests/runner/Testcontracts.ml index 6df4331ba..6216d687e 100644 --- a/tests/runner/Testcontracts.ml +++ b/tests/runner/Testcontracts.ml @@ -443,7 +443,7 @@ let contract_tests env = "init" ~is_library:false ~ipc_mode:true; "remote_state_reads" >::: build_contract_tests ~pplit:false env "remote_state_reads" - succ_code 1 11 []; + succ_code 1 10 []; "remote_state_reads_2" >::: build_contract_tests ~pplit:false env "remote_state_reads_2" succ_code 1 5 []; @@ -471,6 +471,12 @@ let contract_tests env = "address_list_traversal" succ_code 1 2 []; "type_casts" >::: build_contract_tests env "type_casts" succ_code 1 37 []; + "accounting_tests" + >::: build_contract_tests env "accounting_tests" succ_code 1 25 + []; + "accounting_tests_support" + >::: build_contract_tests env "accounting_tests_support" + succ_code 1 7 []; "addfunds_proxy" >::: build_contract_tests env "addfunds_proxy" succ_code 1 2 []; "addfunds" @@ -563,7 +569,7 @@ let contract_tests env = "init_address_type" ~is_library:false ~ipc_mode:true; "remote_state_reads" >::: build_contract_tests env "remote_state_reads" fail_code 101 - 131 []; + 130 []; "map_as_cparam" >: build_contract_init_test env fail_code "map_as_cparam" "init_illegal_key" ~is_library:false ~ipc_mode:true; @@ -586,6 +592,9 @@ let contract_tests env = >: build_contract_init_test env fail_code "address_list_as_cparam" "init_address_type" ~is_library:false ~ipc_mode:true; + "accounting_tests" + >::: build_contract_tests env "accounting_tests" fail_code 100 + 109 []; "ark-store-hashes-in-mutable-maps-idempotent" >::: build_contract_tests env "ark" fail_code 2 2 []; ]; diff --git a/tests/runner/remote_state_reads/blockchain_11.json b/tests/runner/accounting_tests/blockchain_1.json similarity index 100% rename from tests/runner/remote_state_reads/blockchain_11.json rename to tests/runner/accounting_tests/blockchain_1.json diff --git a/tests/runner/remote_state_reads/blockchain_131.json b/tests/runner/accounting_tests/blockchain_10.json similarity index 100% rename from tests/runner/remote_state_reads/blockchain_131.json rename to tests/runner/accounting_tests/blockchain_10.json diff --git a/tests/runner/accounting_tests/blockchain_100.json b/tests/runner/accounting_tests/blockchain_100.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_100.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_101.json b/tests/runner/accounting_tests/blockchain_101.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_101.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_102.json b/tests/runner/accounting_tests/blockchain_102.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_102.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_103.json b/tests/runner/accounting_tests/blockchain_103.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_103.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_104.json b/tests/runner/accounting_tests/blockchain_104.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_104.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_105.json b/tests/runner/accounting_tests/blockchain_105.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_105.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_106.json b/tests/runner/accounting_tests/blockchain_106.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_106.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_107.json b/tests/runner/accounting_tests/blockchain_107.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_107.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_108.json b/tests/runner/accounting_tests/blockchain_108.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_108.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_109.json b/tests/runner/accounting_tests/blockchain_109.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_109.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_11.json b/tests/runner/accounting_tests/blockchain_11.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_11.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_12.json b/tests/runner/accounting_tests/blockchain_12.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_12.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_13.json b/tests/runner/accounting_tests/blockchain_13.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_13.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_14.json b/tests/runner/accounting_tests/blockchain_14.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_14.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_15.json b/tests/runner/accounting_tests/blockchain_15.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_15.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_16.json b/tests/runner/accounting_tests/blockchain_16.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_16.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_17.json b/tests/runner/accounting_tests/blockchain_17.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_17.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_18.json b/tests/runner/accounting_tests/blockchain_18.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_18.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_19.json b/tests/runner/accounting_tests/blockchain_19.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_19.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_2.json b/tests/runner/accounting_tests/blockchain_2.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_2.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_20.json b/tests/runner/accounting_tests/blockchain_20.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_20.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_21.json b/tests/runner/accounting_tests/blockchain_21.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_21.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_22.json b/tests/runner/accounting_tests/blockchain_22.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_22.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_23.json b/tests/runner/accounting_tests/blockchain_23.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_23.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_24.json b/tests/runner/accounting_tests/blockchain_24.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_24.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_25.json b/tests/runner/accounting_tests/blockchain_25.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_25.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_3.json b/tests/runner/accounting_tests/blockchain_3.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_3.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_4.json b/tests/runner/accounting_tests/blockchain_4.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_4.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_5.json b/tests/runner/accounting_tests/blockchain_5.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_5.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_6.json b/tests/runner/accounting_tests/blockchain_6.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_6.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_7.json b/tests/runner/accounting_tests/blockchain_7.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_7.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_8.json b/tests/runner/accounting_tests/blockchain_8.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_8.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/blockchain_9.json b/tests/runner/accounting_tests/blockchain_9.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests/blockchain_9.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests/init.json b/tests/runner/accounting_tests/init.json new file mode 100644 index 000000000..021300643 --- /dev/null +++ b/tests/runner/accounting_tests/init.json @@ -0,0 +1,22 @@ +[ + { + "vname" : "_scilla_version", + "type" : "Uint32", + "value" : "0" + }, + { + "vname" : "_this_address", + "type" : "ByStr20", + "value" : "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047" + }, + { + "vname" : "_creation_block", + "type" : "BNum", + "value" : "1" + }, + { + "vname" : "support_contract", + "type" : "ByStr20", + "value" : "0x3620c286757a29985cee194eb90064270fb65414" + } +] diff --git a/tests/runner/accounting_tests/init_output.json b/tests/runner/accounting_tests/init_output.json new file mode 100644 index 000000000..876ecb6f9 --- /dev/null +++ b/tests/runner/accounting_tests/init_output.json @@ -0,0 +1,14 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "66565", + "_accepted": "false", + "messages": null, + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/init_state.json b/tests/runner/accounting_tests/init_state.json new file mode 100644 index 000000000..b7a5f6d5e --- /dev/null +++ b/tests/runner/accounting_tests/init_state.json @@ -0,0 +1,18 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "42" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/message_1.json b/tests/runner/accounting_tests/message_1.json new file mode 100644 index 000000000..7480d4c11 --- /dev/null +++ b/tests/runner/accounting_tests/message_1.json @@ -0,0 +1,7 @@ +{ + "_tag": "Reset", + "_amount": "30", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_10.json b/tests/runner/accounting_tests/message_10.json new file mode 100644 index 000000000..36657910f --- /dev/null +++ b/tests/runner/accounting_tests/message_10.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_5", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_100.json b/tests/runner/accounting_tests/message_100.json new file mode 100644 index 000000000..a007264b5 --- /dev/null +++ b/tests/runner/accounting_tests/message_100.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_1", + "_amount": "0", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_101.json b/tests/runner/accounting_tests/message_101.json new file mode 100644 index 000000000..a007264b5 --- /dev/null +++ b/tests/runner/accounting_tests/message_101.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_1", + "_amount": "0", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_102.json b/tests/runner/accounting_tests/message_102.json new file mode 100644 index 000000000..a007264b5 --- /dev/null +++ b/tests/runner/accounting_tests/message_102.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_1", + "_amount": "0", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_103.json b/tests/runner/accounting_tests/message_103.json new file mode 100644 index 000000000..a007264b5 --- /dev/null +++ b/tests/runner/accounting_tests/message_103.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_1", + "_amount": "0", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_104.json b/tests/runner/accounting_tests/message_104.json new file mode 100644 index 000000000..d84f1027a --- /dev/null +++ b/tests/runner/accounting_tests/message_104.json @@ -0,0 +1,7 @@ +{ + "_tag": "Finalize_Test_Send_1", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_105.json b/tests/runner/accounting_tests/message_105.json new file mode 100644 index 000000000..9ffba0cb0 --- /dev/null +++ b/tests/runner/accounting_tests/message_105.json @@ -0,0 +1,7 @@ +{ + "_tag": "Finalize_Test_Send_2", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_106.json b/tests/runner/accounting_tests/message_106.json new file mode 100644 index 000000000..d31f5a23c --- /dev/null +++ b/tests/runner/accounting_tests/message_106.json @@ -0,0 +1,7 @@ +{ + "_tag": "Finalize_Test_Send_3", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_107.json b/tests/runner/accounting_tests/message_107.json new file mode 100644 index 000000000..f819235da --- /dev/null +++ b/tests/runner/accounting_tests/message_107.json @@ -0,0 +1,13 @@ +{ + "_tag": "CheckSenderBalance", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { + "vname" : "expected_balance", + "type" : "Uint128", + "value" : "30" + } + ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_108.json b/tests/runner/accounting_tests/message_108.json new file mode 100644 index 000000000..e7c75f0bb --- /dev/null +++ b/tests/runner/accounting_tests/message_108.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Insufficient_Balance", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_109.json b/tests/runner/accounting_tests/message_109.json new file mode 100644 index 000000000..c5fd3e83c --- /dev/null +++ b/tests/runner/accounting_tests/message_109.json @@ -0,0 +1,13 @@ +{ + "_tag": "CheckRecipientBalance", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { + "vname" : "expected_balance", + "type" : "Uint128", + "value" : "52" + } + ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_11.json b/tests/runner/accounting_tests/message_11.json new file mode 100644 index 000000000..1be161287 --- /dev/null +++ b/tests/runner/accounting_tests/message_11.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_6", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_12.json b/tests/runner/accounting_tests/message_12.json new file mode 100644 index 000000000..1416aa3fa --- /dev/null +++ b/tests/runner/accounting_tests/message_12.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_7", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_13.json b/tests/runner/accounting_tests/message_13.json new file mode 100644 index 000000000..f819235da --- /dev/null +++ b/tests/runner/accounting_tests/message_13.json @@ -0,0 +1,13 @@ +{ + "_tag": "CheckSenderBalance", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { + "vname" : "expected_balance", + "type" : "Uint128", + "value" : "30" + } + ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_14.json b/tests/runner/accounting_tests/message_14.json new file mode 100644 index 000000000..f3f1cdd3d --- /dev/null +++ b/tests/runner/accounting_tests/message_14.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_8", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_15.json b/tests/runner/accounting_tests/message_15.json new file mode 100644 index 000000000..88700b3b3 --- /dev/null +++ b/tests/runner/accounting_tests/message_15.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_9", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_16.json b/tests/runner/accounting_tests/message_16.json new file mode 100644 index 000000000..c5fd3e83c --- /dev/null +++ b/tests/runner/accounting_tests/message_16.json @@ -0,0 +1,13 @@ +{ + "_tag": "CheckRecipientBalance", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { + "vname" : "expected_balance", + "type" : "Uint128", + "value" : "52" + } + ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_17.json b/tests/runner/accounting_tests/message_17.json new file mode 100644 index 000000000..5962ca43e --- /dev/null +++ b/tests/runner/accounting_tests/message_17.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_10", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_18.json b/tests/runner/accounting_tests/message_18.json new file mode 100644 index 000000000..5ec978ae4 --- /dev/null +++ b/tests/runner/accounting_tests/message_18.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_11", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_19.json b/tests/runner/accounting_tests/message_19.json new file mode 100644 index 000000000..3524afed5 --- /dev/null +++ b/tests/runner/accounting_tests/message_19.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_12", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_2.json b/tests/runner/accounting_tests/message_2.json new file mode 100644 index 000000000..a007264b5 --- /dev/null +++ b/tests/runner/accounting_tests/message_2.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_1", + "_amount": "0", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_20.json b/tests/runner/accounting_tests/message_20.json new file mode 100644 index 000000000..60e0626f6 --- /dev/null +++ b/tests/runner/accounting_tests/message_20.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_13", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_21.json b/tests/runner/accounting_tests/message_21.json new file mode 100644 index 000000000..443ed578e --- /dev/null +++ b/tests/runner/accounting_tests/message_21.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_14", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_22.json b/tests/runner/accounting_tests/message_22.json new file mode 100644 index 000000000..e979d9d84 --- /dev/null +++ b/tests/runner/accounting_tests/message_22.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_15", + "_amount": "0", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_23.json b/tests/runner/accounting_tests/message_23.json new file mode 100644 index 000000000..eb0b4505f --- /dev/null +++ b/tests/runner/accounting_tests/message_23.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_16", + "_amount": "0", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_24.json b/tests/runner/accounting_tests/message_24.json new file mode 100644 index 000000000..88c9f6298 --- /dev/null +++ b/tests/runner/accounting_tests/message_24.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_17", + "_amount": "0", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_25.json b/tests/runner/accounting_tests/message_25.json new file mode 100644 index 000000000..90b6c885b --- /dev/null +++ b/tests/runner/accounting_tests/message_25.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_18", + "_amount": "0", + "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_3.json b/tests/runner/accounting_tests/message_3.json new file mode 100644 index 000000000..d84f1027a --- /dev/null +++ b/tests/runner/accounting_tests/message_3.json @@ -0,0 +1,7 @@ +{ + "_tag": "Finalize_Test_Send_1", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_4.json b/tests/runner/accounting_tests/message_4.json new file mode 100644 index 000000000..c8f2fbf10 --- /dev/null +++ b/tests/runner/accounting_tests/message_4.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_2", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_5.json b/tests/runner/accounting_tests/message_5.json new file mode 100644 index 000000000..9ffba0cb0 --- /dev/null +++ b/tests/runner/accounting_tests/message_5.json @@ -0,0 +1,7 @@ +{ + "_tag": "Finalize_Test_Send_2", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_6.json b/tests/runner/accounting_tests/message_6.json new file mode 100644 index 000000000..d90c15479 --- /dev/null +++ b/tests/runner/accounting_tests/message_6.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_3", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_7.json b/tests/runner/accounting_tests/message_7.json new file mode 100644 index 000000000..bdeaa0340 --- /dev/null +++ b/tests/runner/accounting_tests/message_7.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_3_Helper", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_8.json b/tests/runner/accounting_tests/message_8.json new file mode 100644 index 000000000..d31f5a23c --- /dev/null +++ b/tests/runner/accounting_tests/message_8.json @@ -0,0 +1,7 @@ +{ + "_tag": "Finalize_Test_Send_3", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/message_9.json b/tests/runner/accounting_tests/message_9.json new file mode 100644 index 000000000..a43d6064b --- /dev/null +++ b/tests/runner/accounting_tests/message_9.json @@ -0,0 +1,7 @@ +{ + "_tag": "Test_Send_4", + "_amount": "0", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests/output_1.json b/tests/runner/accounting_tests/output_1.json new file mode 100644 index 000000000..48d4eb2c7 --- /dev/null +++ b/tests/runner/accounting_tests/output_1.json @@ -0,0 +1,21 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7956", + "_accepted": "true", + "messages": [ + { + "_tag": "Reset", + "_amount": "0", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_10.json b/tests/runner/accounting_tests/output_10.json new file mode 100644 index 000000000..8c4141969 --- /dev/null +++ b/tests/runner/accounting_tests/output_10.json @@ -0,0 +1,27 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7918", + "_accepted": "false", + "messages": [ + { + "_tag": "Accept", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + }, + { + "_tag": "NonAccept", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "10" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_100.json b/tests/runner/accounting_tests/output_100.json new file mode 100644 index 000000000..7f36cec98 --- /dev/null +++ b/tests/runner/accounting_tests/output_100.json @@ -0,0 +1,25 @@ +{ + "gas_remaining": "7951", + "errors": [ + { + "error_message": + "Exception thrown: (Message [(_exception : (String \"Insufficient balance for tests\"))])", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 54, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + }, + { + "error_message": "Raised from Test_Send_1", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 74, + "column": 12 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_101.json b/tests/runner/accounting_tests/output_101.json new file mode 100644 index 000000000..3800bdeb3 --- /dev/null +++ b/tests/runner/accounting_tests/output_101.json @@ -0,0 +1,25 @@ +{ + "gas_remaining": "7962", + "errors": [ + { + "error_message": + "Exception thrown: (Message [(_exception : (String \"Support contract not reset\"))])", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 42, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + }, + { + "error_message": "Raised from Test_Send_1", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 74, + "column": 12 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_102.json b/tests/runner/accounting_tests/output_102.json new file mode 100644 index 000000000..3800bdeb3 --- /dev/null +++ b/tests/runner/accounting_tests/output_102.json @@ -0,0 +1,25 @@ +{ + "gas_remaining": "7962", + "errors": [ + { + "error_message": + "Exception thrown: (Message [(_exception : (String \"Support contract not reset\"))])", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 42, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + }, + { + "error_message": "Raised from Test_Send_1", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 74, + "column": 12 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_103.json b/tests/runner/accounting_tests/output_103.json new file mode 100644 index 000000000..7f36cec98 --- /dev/null +++ b/tests/runner/accounting_tests/output_103.json @@ -0,0 +1,25 @@ +{ + "gas_remaining": "7951", + "errors": [ + { + "error_message": + "Exception thrown: (Message [(_exception : (String \"Insufficient balance for tests\"))])", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 54, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + }, + { + "error_message": "Raised from Test_Send_1", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 74, + "column": 12 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_104.json b/tests/runner/accounting_tests/output_104.json new file mode 100644 index 000000000..ec269636a --- /dev/null +++ b/tests/runner/accounting_tests/output_104.json @@ -0,0 +1,25 @@ +{ + "gas_remaining": "7927", + "errors": [ + { + "error_message": + "Exception thrown: (Message [(_exception : (String \"Test_Send failed\")) ; (test_no : (Uint128 1)) ; (expected : (List (String \"World\"), (String \"Hello\"), (Nil))) ; (actual : (List (String \"Hello\"), (String \"World\"), (Nil)))])", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 110, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + }, + { + "error_message": "Raised from Finalize_Test_Send_1", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 115, + "column": 12 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_105.json b/tests/runner/accounting_tests/output_105.json new file mode 100644 index 000000000..a99473755 --- /dev/null +++ b/tests/runner/accounting_tests/output_105.json @@ -0,0 +1,25 @@ +{ + "gas_remaining": "7927", + "errors": [ + { + "error_message": + "Exception thrown: (Message [(_exception : (String \"Test_Send failed\")) ; (test_no : (Uint128 2)) ; (expected : (List (String \"World\"), (String \"Hello\"), (Nil))) ; (actual : (List (String \"Hello\"), (String \"World\"), (Nil)))])", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 110, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + }, + { + "error_message": "Raised from Finalize_Test_Send_2", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 144, + "column": 12 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_106.json b/tests/runner/accounting_tests/output_106.json new file mode 100644 index 000000000..907d0cc49 --- /dev/null +++ b/tests/runner/accounting_tests/output_106.json @@ -0,0 +1,25 @@ +{ + "gas_remaining": "7927", + "errors": [ + { + "error_message": + "Exception thrown: (Message [(_exception : (String \"Test_Send failed\")) ; (test_no : (Uint128 3)) ; (expected : (List (String \"World\"), (String \"Hello\"), (Nil))) ; (actual : (List (String \"Hello\"), (String \"World\"), (Nil)))])", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 110, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + }, + { + "error_message": "Raised from Finalize_Test_Send_3", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 184, + "column": 12 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_107.json b/tests/runner/accounting_tests/output_107.json new file mode 100644 index 000000000..0f9ad9068 --- /dev/null +++ b/tests/runner/accounting_tests/output_107.json @@ -0,0 +1,25 @@ +{ + "gas_remaining": "7937", + "errors": [ + { + "error_message": + "Exception thrown: (Message [(_exception : (String \"Unexpected balance\")) ; (expected : (Uint128 30)) ; (actual : (Uint128 20))])", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 208, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + }, + { + "error_message": "Raised from CheckSenderBalance", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 212, + "column": 12 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/output_131.json b/tests/runner/accounting_tests/output_108.json similarity index 62% rename from tests/runner/remote_state_reads/output_131.json rename to tests/runner/accounting_tests/output_108.json index c402d2e06..c5348f739 100644 --- a/tests/runner/remote_state_reads/output_131.json +++ b/tests/runner/accounting_tests/output_108.json @@ -1,9 +1,9 @@ { - "gas_remaining": "7490", + "gas_remaining": "7952", "errors": [ { "error_message": - "No contract found at address: 0xabfeccdc9012345678901234567890f777564327", + "Balance too low for outgoing message: Current balance: 0. Required balance: 10", "start_location": { "file": "", "line": 0, "column": 0 }, "end_location": { "file": "", "line": 0, "column": 0 } } diff --git a/tests/runner/accounting_tests/output_109.json b/tests/runner/accounting_tests/output_109.json new file mode 100644 index 000000000..07f979b79 --- /dev/null +++ b/tests/runner/accounting_tests/output_109.json @@ -0,0 +1,25 @@ +{ + "gas_remaining": "7932", + "errors": [ + { + "error_message": + "Exception thrown: (Message [(_exception : (String \"Main contract read unexpected support contract balance\")) ; (expected : (Uint128 52)) ; (actual : (Uint128 42))])", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 225, + "column": 5 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + }, + { + "error_message": "Raised from CheckRecipientBalance", + "start_location": { + "file": "tests/contracts/accounting_tests.scilla", + "line": 229, + "column": 12 + }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_11.json b/tests/runner/accounting_tests/output_11.json new file mode 100644 index 000000000..0573798b7 --- /dev/null +++ b/tests/runner/accounting_tests/output_11.json @@ -0,0 +1,29 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7917", + "_accepted": "false", + "messages": [ + { + "_tag": "Accept", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + }, + { + "_tag": "CheckSenderBalance", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "20" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_12.json b/tests/runner/accounting_tests/output_12.json new file mode 100644 index 000000000..01a7561a5 --- /dev/null +++ b/tests/runner/accounting_tests/output_12.json @@ -0,0 +1,29 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7918", + "_accepted": "false", + "messages": [ + { + "_tag": "NonAccept", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + }, + { + "_tag": "CheckSenderBalance", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "30" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_13.json b/tests/runner/accounting_tests/output_13.json new file mode 100644 index 000000000..1972ada24 --- /dev/null +++ b/tests/runner/accounting_tests/output_13.json @@ -0,0 +1,14 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7951", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_14.json b/tests/runner/accounting_tests/output_14.json new file mode 100644 index 000000000..7826de787 --- /dev/null +++ b/tests/runner/accounting_tests/output_14.json @@ -0,0 +1,29 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7917", + "_accepted": "false", + "messages": [ + { + "_tag": "AcceptAndCheckBalance", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + }, + { + "_tag": "CheckRecipientBalance", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "52" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_15.json b/tests/runner/accounting_tests/output_15.json new file mode 100644 index 000000000..19834ffb4 --- /dev/null +++ b/tests/runner/accounting_tests/output_15.json @@ -0,0 +1,29 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7918", + "_accepted": "false", + "messages": [ + { + "_tag": "NonAccept", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + }, + { + "_tag": "CheckRecipientBalance", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "42" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_16.json b/tests/runner/accounting_tests/output_16.json new file mode 100644 index 000000000..1972ada24 --- /dev/null +++ b/tests/runner/accounting_tests/output_16.json @@ -0,0 +1,14 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7951", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_17.json b/tests/runner/accounting_tests/output_17.json new file mode 100644 index 000000000..4d963f8aa --- /dev/null +++ b/tests/runner/accounting_tests/output_17.json @@ -0,0 +1,21 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7939", + "_accepted": "false", + "messages": [ + { + "_tag": "AcceptAndCheckSenderBalance", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_18.json b/tests/runner/accounting_tests/output_18.json new file mode 100644 index 000000000..198648024 --- /dev/null +++ b/tests/runner/accounting_tests/output_18.json @@ -0,0 +1,21 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7939", + "_accepted": "false", + "messages": [ + { + "_tag": "AcceptTwiceAndCheckBalance", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_19.json b/tests/runner/accounting_tests/output_19.json new file mode 100644 index 000000000..c238c8b99 --- /dev/null +++ b/tests/runner/accounting_tests/output_19.json @@ -0,0 +1,29 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7930", + "_accepted": "false", + "messages": [ + { + "_tag": "AcceptTwiceAndCheckBalance", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + }, + { + "_tag": "CheckSenderBalance", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "20" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_2.json b/tests/runner/accounting_tests/output_2.json new file mode 100644 index 000000000..4ad966eb7 --- /dev/null +++ b/tests/runner/accounting_tests/output_2.json @@ -0,0 +1,33 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7896", + "_accepted": "false", + "messages": [ + { + "_tag": "StoreString", + "_amount": "0", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ { "vname": "s", "type": "String", "value": "Hello" } ] + }, + { + "_tag": "StoreString", + "_amount": "0", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ { "vname": "s", "type": "String", "value": "World" } ] + }, + { + "_tag": "Finalize_Test_Send_1", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_20.json b/tests/runner/accounting_tests/output_20.json new file mode 100644 index 000000000..3eba821df --- /dev/null +++ b/tests/runner/accounting_tests/output_20.json @@ -0,0 +1,29 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7916", + "_accepted": "false", + "messages": [ + { + "_tag": "AcceptTwiceAndCheckBalance", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + }, + { + "_tag": "CheckRecipientBalance", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "52" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_21.json b/tests/runner/accounting_tests/output_21.json new file mode 100644 index 000000000..e97001130 --- /dev/null +++ b/tests/runner/accounting_tests/output_21.json @@ -0,0 +1,21 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7940", + "_accepted": "false", + "messages": [ + { + "_tag": "Accept", + "_amount": "30", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_22.json b/tests/runner/accounting_tests/output_22.json new file mode 100644 index 000000000..4e1e871c9 --- /dev/null +++ b/tests/runner/accounting_tests/output_22.json @@ -0,0 +1,23 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7931", + "_accepted": "false", + "messages": [ + { + "_tag": "NoAcceptAndCheckSenderBalance", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "20" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_23.json b/tests/runner/accounting_tests/output_23.json new file mode 100644 index 000000000..1be49d96c --- /dev/null +++ b/tests/runner/accounting_tests/output_23.json @@ -0,0 +1,39 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7886", + "_accepted": "false", + "messages": [ + { + "_tag": "AcceptAndCheckSenderBalanceAgainstExpected", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "10" } + ] + }, + { + "_tag": "AcceptAndCheckSenderBalanceAgainstExpected", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "10" } + ] + }, + { + "_tag": "CheckSenderBalance", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "10" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "10" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_24.json b/tests/runner/accounting_tests/output_24.json new file mode 100644 index 000000000..e208f0e95 --- /dev/null +++ b/tests/runner/accounting_tests/output_24.json @@ -0,0 +1,39 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7888", + "_accepted": "false", + "messages": [ + { + "_tag": "NoAcceptAndCheckSenderBalance", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "10" } + ] + }, + { + "_tag": "AcceptAndCheckSenderBalanceAgainstExpected", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "20" } + ] + }, + { + "_tag": "CheckSenderBalance", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "20" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "10" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_25.json b/tests/runner/accounting_tests/output_25.json new file mode 100644 index 000000000..984334233 --- /dev/null +++ b/tests/runner/accounting_tests/output_25.json @@ -0,0 +1,39 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7888", + "_accepted": "false", + "messages": [ + { + "_tag": "AcceptAndCheckSenderBalanceAgainstExpected", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "10" } + ] + }, + { + "_tag": "NoAcceptAndCheckSenderBalance", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "10" } + ] + }, + { + "_tag": "CheckSenderBalance", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "20" } + ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "10" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_3.json b/tests/runner/accounting_tests/output_3.json new file mode 100644 index 000000000..5d417ae4c --- /dev/null +++ b/tests/runner/accounting_tests/output_3.json @@ -0,0 +1,14 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7947", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_4.json b/tests/runner/accounting_tests/output_4.json new file mode 100644 index 000000000..0664079d7 --- /dev/null +++ b/tests/runner/accounting_tests/output_4.json @@ -0,0 +1,33 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7897", + "_accepted": "false", + "messages": [ + { + "_tag": "StoreString", + "_amount": "0", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ { "vname": "s", "type": "String", "value": "Hello" } ] + }, + { + "_tag": "StoreString", + "_amount": "0", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ { "vname": "s", "type": "String", "value": "World" } ] + }, + { + "_tag": "Finalize_Test_Send_2", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_5.json b/tests/runner/accounting_tests/output_5.json new file mode 100644 index 000000000..5d417ae4c --- /dev/null +++ b/tests/runner/accounting_tests/output_5.json @@ -0,0 +1,14 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7947", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_6.json b/tests/runner/accounting_tests/output_6.json new file mode 100644 index 000000000..0b882b032 --- /dev/null +++ b/tests/runner/accounting_tests/output_6.json @@ -0,0 +1,33 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7901", + "_accepted": "false", + "messages": [ + { + "_tag": "Test_Send_3_Helper", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [] + }, + { + "_tag": "StoreString", + "_amount": "0", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ { "vname": "s", "type": "String", "value": "World" } ] + }, + { + "_tag": "Finalize_Test_Send_3", + "_amount": "0", + "_recipient": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_7.json b/tests/runner/accounting_tests/output_7.json new file mode 100644 index 000000000..596c08864 --- /dev/null +++ b/tests/runner/accounting_tests/output_7.json @@ -0,0 +1,21 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7948", + "_accepted": "false", + "messages": [ + { + "_tag": "StoreString", + "_amount": "0", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [ { "vname": "s", "type": "String", "value": "Hello" } ] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_8.json b/tests/runner/accounting_tests/output_8.json new file mode 100644 index 000000000..5d417ae4c --- /dev/null +++ b/tests/runner/accounting_tests/output_8.json @@ -0,0 +1,14 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7947", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/output_9.json b/tests/runner/accounting_tests/output_9.json new file mode 100644 index 000000000..327fd5e2d --- /dev/null +++ b/tests/runner/accounting_tests/output_9.json @@ -0,0 +1,27 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7914", + "_accepted": "false", + "messages": [ + { + "_tag": "Accept", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + }, + { + "_tag": "NonAccept", + "_amount": "10", + "_recipient": "0x3620c286757a29985cee194eb90064270fb65414", + "params": [] + } + ], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "10" }, + { "vname": "test_string_1", "type": "String", "value": "Hello" }, + { "vname": "test_string_2", "type": "String", "value": "World" }, + { "vname": "outgoing_amount", "type": "Uint128", "value": "10" }, + { "vname": "max_outgoing_msgs", "type": "Uint128", "value": "3" } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests/state_1.json b/tests/runner/accounting_tests/state_1.json new file mode 100644 index 000000000..43bce7ae8 --- /dev/null +++ b/tests/runner/accounting_tests/state_1.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_10.json b/tests/runner/accounting_tests/state_10.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_10.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_100.json b/tests/runner/accounting_tests/state_100.json new file mode 100644 index 000000000..8bb931a45 --- /dev/null +++ b/tests/runner/accounting_tests/state_100.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_101.json b/tests/runner/accounting_tests/state_101.json new file mode 100644 index 000000000..2cf3d386c --- /dev/null +++ b/tests/runner/accounting_tests/state_101.json @@ -0,0 +1,56 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", + "type": "List String", + "value": { "constructor": "Cons", + "argtypes": ["String"], + "arguments": [ + "Hello", + { + "constructor": "Nil", + "argtypes": [ "String" ], + "arguments": [] + } + ] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_102.json b/tests/runner/accounting_tests/state_102.json new file mode 100644 index 000000000..afacedb8d --- /dev/null +++ b/tests/runner/accounting_tests/state_102.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": [ "Hello" ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_103.json b/tests/runner/accounting_tests/state_103.json new file mode 100644 index 000000000..4f3b7d1d3 --- /dev/null +++ b/tests/runner/accounting_tests/state_103.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "29" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": [ ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_104.json b/tests/runner/accounting_tests/state_104.json new file mode 100644 index 000000000..c0b665585 --- /dev/null +++ b/tests/runner/accounting_tests/state_104.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ "Hello", "World" ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_105.json b/tests/runner/accounting_tests/state_105.json new file mode 100644 index 000000000..c0b665585 --- /dev/null +++ b/tests/runner/accounting_tests/state_105.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ "Hello", "World" ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_106.json b/tests/runner/accounting_tests/state_106.json new file mode 100644 index 000000000..c0b665585 --- /dev/null +++ b/tests/runner/accounting_tests/state_106.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ "Hello", "World" ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_107.json b/tests/runner/accounting_tests/state_107.json new file mode 100644 index 000000000..5fb1fe591 --- /dev/null +++ b/tests/runner/accounting_tests/state_107.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_108.json b/tests/runner/accounting_tests/state_108.json new file mode 100644 index 000000000..e56b00ec3 --- /dev/null +++ b/tests/runner/accounting_tests/state_108.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_109.json b/tests/runner/accounting_tests/state_109.json new file mode 100644 index 000000000..626d75db1 --- /dev/null +++ b/tests/runner/accounting_tests/state_109.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": [ ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_11.json b/tests/runner/accounting_tests/state_11.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_11.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_12.json b/tests/runner/accounting_tests/state_12.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_12.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_13.json b/tests/runner/accounting_tests/state_13.json new file mode 100644 index 000000000..182733828 --- /dev/null +++ b/tests/runner/accounting_tests/state_13.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_14.json b/tests/runner/accounting_tests/state_14.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_14.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_15.json b/tests/runner/accounting_tests/state_15.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_15.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_16.json b/tests/runner/accounting_tests/state_16.json new file mode 100644 index 000000000..633676c7d --- /dev/null +++ b/tests/runner/accounting_tests/state_16.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "52" }, + { "vname": "stored_strings", "type": "List String", "value": [ ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_17.json b/tests/runner/accounting_tests/state_17.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_17.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_18.json b/tests/runner/accounting_tests/state_18.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_18.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_19.json b/tests/runner/accounting_tests/state_19.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_19.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_2.json b/tests/runner/accounting_tests/state_2.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_2.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_20.json b/tests/runner/accounting_tests/state_20.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_20.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_21.json b/tests/runner/accounting_tests/state_21.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_21.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_22.json b/tests/runner/accounting_tests/state_22.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_22.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_23.json b/tests/runner/accounting_tests/state_23.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_23.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_24.json b/tests/runner/accounting_tests/state_24.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_24.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_25.json b/tests/runner/accounting_tests/state_25.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_25.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_3.json b/tests/runner/accounting_tests/state_3.json new file mode 100644 index 000000000..93f46248c --- /dev/null +++ b/tests/runner/accounting_tests/state_3.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ "World", "Hello" ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_4.json b/tests/runner/accounting_tests/state_4.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_4.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_5.json b/tests/runner/accounting_tests/state_5.json new file mode 100644 index 000000000..93f46248c --- /dev/null +++ b/tests/runner/accounting_tests/state_5.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ "World", "Hello" ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_6.json b/tests/runner/accounting_tests/state_6.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_6.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_7.json b/tests/runner/accounting_tests/state_7.json new file mode 100644 index 000000000..182733828 --- /dev/null +++ b/tests/runner/accounting_tests/state_7.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_8.json b/tests/runner/accounting_tests/state_8.json new file mode 100644 index 000000000..93f46248c --- /dev/null +++ b/tests/runner/accounting_tests/state_8.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List String", "value": [ "World", "Hello" ] }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests/state_9.json b/tests/runner/accounting_tests/state_9.json new file mode 100644 index 000000000..04ef77be8 --- /dev/null +++ b/tests/runner/accounting_tests/state_9.json @@ -0,0 +1,45 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x3620c286757a29985cee194eb90064270fb65414", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "stored_strings", "type": "List String", "value": { "constructor": "Nil", "argtypes": ["String"], "arguments": [] } }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x3620c286757a29985cee194eb90064270fb65414" } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests_support/blockchain_1.json b/tests/runner/accounting_tests_support/blockchain_1.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests_support/blockchain_1.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests_support/blockchain_2.json b/tests/runner/accounting_tests_support/blockchain_2.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests_support/blockchain_2.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests_support/blockchain_3.json b/tests/runner/accounting_tests_support/blockchain_3.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests_support/blockchain_3.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests_support/blockchain_4.json b/tests/runner/accounting_tests_support/blockchain_4.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests_support/blockchain_4.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests_support/blockchain_5.json b/tests/runner/accounting_tests_support/blockchain_5.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests_support/blockchain_5.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests_support/blockchain_6.json b/tests/runner/accounting_tests_support/blockchain_6.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests_support/blockchain_6.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests_support/blockchain_7.json b/tests/runner/accounting_tests_support/blockchain_7.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/accounting_tests_support/blockchain_7.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/accounting_tests_support/init.json b/tests/runner/accounting_tests_support/init.json new file mode 100644 index 000000000..775e55aad --- /dev/null +++ b/tests/runner/accounting_tests_support/init.json @@ -0,0 +1,17 @@ +[ + { + "vname" : "_scilla_version", + "type" : "Uint32", + "value" : "0" + }, + { + "vname" : "_this_address", + "type" : "ByStr20", + "value" : "0x3620c286757a29985cee194eb90064270fb65414" + }, + { + "vname" : "_creation_block", + "type" : "BNum", + "value" : "1" + } +] diff --git a/tests/runner/accounting_tests_support/init_output.json b/tests/runner/accounting_tests_support/init_output.json new file mode 100644 index 000000000..535971e03 --- /dev/null +++ b/tests/runner/accounting_tests_support/init_output.json @@ -0,0 +1,11 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "77972", + "_accepted": "false", + "messages": null, + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List (String)", "value": [] } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests_support/message_1.json b/tests/runner/accounting_tests_support/message_1.json new file mode 100644 index 000000000..8500904da --- /dev/null +++ b/tests/runner/accounting_tests_support/message_1.json @@ -0,0 +1,7 @@ +{ + "_tag": "Reset", + "_amount": "30", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests_support/message_2.json b/tests/runner/accounting_tests_support/message_2.json new file mode 100644 index 000000000..c678f8e2a --- /dev/null +++ b/tests/runner/accounting_tests_support/message_2.json @@ -0,0 +1,13 @@ +{ + "_tag": "StoreString", + "_amount": "30", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { + "vname" : "s", + "type" : "String", + "value" : "World" + } + ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests_support/message_3.json b/tests/runner/accounting_tests_support/message_3.json new file mode 100644 index 000000000..565c4c931 --- /dev/null +++ b/tests/runner/accounting_tests_support/message_3.json @@ -0,0 +1,7 @@ +{ + "_tag": "AcceptAndCheckBalance", + "_amount": "10", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests_support/message_4.json b/tests/runner/accounting_tests_support/message_4.json new file mode 100644 index 000000000..78f637ade --- /dev/null +++ b/tests/runner/accounting_tests_support/message_4.json @@ -0,0 +1,7 @@ +{ + "_tag": "AcceptAndCheckSenderBalance", + "_amount": "10", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests_support/message_5.json b/tests/runner/accounting_tests_support/message_5.json new file mode 100644 index 000000000..dbe39893c --- /dev/null +++ b/tests/runner/accounting_tests_support/message_5.json @@ -0,0 +1,7 @@ +{ + "_tag": "AcceptTwiceAndCheckBalance", + "_amount": "10", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests_support/message_6.json b/tests/runner/accounting_tests_support/message_6.json new file mode 100644 index 000000000..c5b66dd7b --- /dev/null +++ b/tests/runner/accounting_tests_support/message_6.json @@ -0,0 +1,7 @@ +{ + "_tag": "Accept", + "_amount": "10", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests_support/message_7.json b/tests/runner/accounting_tests_support/message_7.json new file mode 100644 index 000000000..c8ac234b1 --- /dev/null +++ b/tests/runner/accounting_tests_support/message_7.json @@ -0,0 +1,9 @@ +{ + "_tag": "NoAcceptAndCheckSenderBalance", + "_amount": "10", + "_sender": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "params": [ + { "vname": "expected_balance", "type": "Uint128", "value": "20" } + ], + "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" +} diff --git a/tests/runner/accounting_tests_support/output_1.json b/tests/runner/accounting_tests_support/output_1.json new file mode 100644 index 000000000..43ae1b8aa --- /dev/null +++ b/tests/runner/accounting_tests_support/output_1.json @@ -0,0 +1,11 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7975", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List (String)", "value": [] } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests_support/output_2.json b/tests/runner/accounting_tests_support/output_2.json new file mode 100644 index 000000000..bb34229c8 --- /dev/null +++ b/tests/runner/accounting_tests_support/output_2.json @@ -0,0 +1,15 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7953", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "stored_strings", + "type": "List (String)", + "value": [ "World", "Hello" ] + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests_support/output_3.json b/tests/runner/accounting_tests_support/output_3.json new file mode 100644 index 000000000..0ce2f6d00 --- /dev/null +++ b/tests/runner/accounting_tests_support/output_3.json @@ -0,0 +1,11 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7967", + "_accepted": "true", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "10" }, + { "vname": "stored_strings", "type": "List (String)", "value": [] } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests_support/output_4.json b/tests/runner/accounting_tests_support/output_4.json new file mode 100644 index 000000000..0ce2f6d00 --- /dev/null +++ b/tests/runner/accounting_tests_support/output_4.json @@ -0,0 +1,11 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7967", + "_accepted": "true", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "10" }, + { "vname": "stored_strings", "type": "List (String)", "value": [] } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests_support/output_5.json b/tests/runner/accounting_tests_support/output_5.json new file mode 100644 index 000000000..f36f838bb --- /dev/null +++ b/tests/runner/accounting_tests_support/output_5.json @@ -0,0 +1,11 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7963", + "_accepted": "true", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "10" }, + { "vname": "stored_strings", "type": "List (String)", "value": [] } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests_support/output_6.json b/tests/runner/accounting_tests_support/output_6.json new file mode 100644 index 000000000..1d1f56307 --- /dev/null +++ b/tests/runner/accounting_tests_support/output_6.json @@ -0,0 +1,11 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7975", + "_accepted": "true", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "10" }, + { "vname": "stored_strings", "type": "List (String)", "value": [] } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests_support/output_7.json b/tests/runner/accounting_tests_support/output_7.json new file mode 100644 index 000000000..0f612c840 --- /dev/null +++ b/tests/runner/accounting_tests_support/output_7.json @@ -0,0 +1,11 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7959", + "_accepted": "false", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", "type": "List (String)", "value": [] } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/accounting_tests_support/state_1.json b/tests/runner/accounting_tests_support/state_1.json new file mode 100644 index 000000000..ddb3bf060 --- /dev/null +++ b/tests/runner/accounting_tests_support/state_1.json @@ -0,0 +1,48 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", + "type": "List String", + "value": [ "Hello" ] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests_support/state_2.json b/tests/runner/accounting_tests_support/state_2.json new file mode 100644 index 000000000..ddb3bf060 --- /dev/null +++ b/tests/runner/accounting_tests_support/state_2.json @@ -0,0 +1,48 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", + "type": "List String", + "value": [ "Hello" ] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests_support/state_3.json b/tests/runner/accounting_tests_support/state_3.json new file mode 100644 index 000000000..d3e7f539a --- /dev/null +++ b/tests/runner/accounting_tests_support/state_3.json @@ -0,0 +1,48 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", + "type": "List String", + "value": [ ] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "30" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests_support/state_4.json b/tests/runner/accounting_tests_support/state_4.json new file mode 100644 index 000000000..6e08b4211 --- /dev/null +++ b/tests/runner/accounting_tests_support/state_4.json @@ -0,0 +1,48 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", + "type": "List String", + "value": [ ] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests_support/state_5.json b/tests/runner/accounting_tests_support/state_5.json new file mode 100644 index 000000000..6e08b4211 --- /dev/null +++ b/tests/runner/accounting_tests_support/state_5.json @@ -0,0 +1,48 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", + "type": "List String", + "value": [ ] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests_support/state_6.json b/tests/runner/accounting_tests_support/state_6.json new file mode 100644 index 000000000..69c3c057f --- /dev/null +++ b/tests/runner/accounting_tests_support/state_6.json @@ -0,0 +1,48 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", + "type": "List String", + "value": [ ] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + } + ] + } + ] + } +] diff --git a/tests/runner/accounting_tests_support/state_7.json b/tests/runner/accounting_tests_support/state_7.json new file mode 100644 index 000000000..6e08b4211 --- /dev/null +++ b/tests/runner/accounting_tests_support/state_7.json @@ -0,0 +1,48 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { "vname": "stored_strings", + "type": "List String", + "value": [ ] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "100" }, + { "vname": "_balance", "type": "Uint128", "value": "42" } + ] + }, + { + "address": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "20" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0x673b712c3e47bf98fae068370f9e5a2a1c1c8047" }, + { + "vname": "test_string_1", + "type": "String", + "value": "Hello" + }, + { + "vname": "test_string_2", + "type": "String", + "value": "World" + }, + { + "vname": "outgoing_amount", + "type": "Uint128", + "value": "10" + }, + { + "vname": "max_outgoing_msgs", + "type": "Uint128", + "value": "3" + } + ] + } + ] + } +] diff --git a/tests/runner/address_list_as_cparam/init_address_type_ipc_output.json b/tests/runner/address_list_as_cparam/init_address_type_ipc_output.json index 36150661d..4d8808fec 100644 --- a/tests/runner/address_list_as_cparam/init_address_type_ipc_output.json +++ b/tests/runner/address_list_as_cparam/init_address_type_ipc_output.json @@ -8,4 +8,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/address_list_as_cparam/init_illegal_nested_type_ipc_output.json b/tests/runner/address_list_as_cparam/init_illegal_nested_type_ipc_output.json index 71431eb7b..b5b6d3bb6 100644 --- a/tests/runner/address_list_as_cparam/init_illegal_nested_type_ipc_output.json +++ b/tests/runner/address_list_as_cparam/init_illegal_nested_type_ipc_output.json @@ -14,4 +14,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/address_list_as_cparam/init_illegal_type_ipc_output.json b/tests/runner/address_list_as_cparam/init_illegal_type_ipc_output.json index 862792589..7c0b3cb98 100644 --- a/tests/runner/address_list_as_cparam/init_illegal_type_ipc_output.json +++ b/tests/runner/address_list_as_cparam/init_illegal_type_ipc_output.json @@ -8,4 +8,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/address_list_as_cparam/init_illegal_value_ipc_output.json b/tests/runner/address_list_as_cparam/init_illegal_value_ipc_output.json index fc50c2e9c..ff2dc4a7b 100644 --- a/tests/runner/address_list_as_cparam/init_illegal_value_ipc_output.json +++ b/tests/runner/address_list_as_cparam/init_illegal_value_ipc_output.json @@ -9,4 +9,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/address_list_as_cparam/init_ipc_output.json b/tests/runner/address_list_as_cparam/init_ipc_output.json index 228445fef..c6b729053 100644 --- a/tests/runner/address_list_as_cparam/init_ipc_output.json +++ b/tests/runner/address_list_as_cparam/init_ipc_output.json @@ -5,4 +5,4 @@ "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], "events": [] -} +} \ No newline at end of file diff --git a/tests/runner/codehash/output_102.json b/tests/runner/codehash/output_102.json index abacfdb84..00247544a 100644 --- a/tests/runner/codehash/output_102.json +++ b/tests/runner/codehash/output_102.json @@ -2,7 +2,8 @@ "gas_remaining": "7956", "errors": [ { - "error_message": "Error loading field: _codehash", + "error_message": + "Error loading remote field: _codehash at address 0x12345678901234567890123456789012345678ff", "start_location": { "file": "tests/contracts/codehash.scilla", "line": 31, diff --git a/tests/runner/map_as_cparam/init_illegal_key_ipc_output.json b/tests/runner/map_as_cparam/init_illegal_key_ipc_output.json index ec074940f..7354900cf 100644 --- a/tests/runner/map_as_cparam/init_illegal_key_ipc_output.json +++ b/tests/runner/map_as_cparam/init_illegal_key_ipc_output.json @@ -8,4 +8,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/map_as_cparam/init_illegal_value_ipc_output.json b/tests/runner/map_as_cparam/init_illegal_value_ipc_output.json index 690111622..52a20ba15 100644 --- a/tests/runner/map_as_cparam/init_illegal_value_ipc_output.json +++ b/tests/runner/map_as_cparam/init_illegal_value_ipc_output.json @@ -8,4 +8,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/map_as_cparam/init_ipc_output.json b/tests/runner/map_as_cparam/init_ipc_output.json index 8a7411ad6..8d1be61a6 100644 --- a/tests/runner/map_as_cparam/init_ipc_output.json +++ b/tests/runner/map_as_cparam/init_ipc_output.json @@ -5,4 +5,4 @@ "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], "events": [] -} +} \ No newline at end of file diff --git a/tests/runner/map_as_cparam/init_unassignable_2_ipc_output.json b/tests/runner/map_as_cparam/init_unassignable_2_ipc_output.json index 8a7411ad6..8d1be61a6 100644 --- a/tests/runner/map_as_cparam/init_unassignable_2_ipc_output.json +++ b/tests/runner/map_as_cparam/init_unassignable_2_ipc_output.json @@ -5,4 +5,4 @@ "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], "events": [] -} +} \ No newline at end of file diff --git a/tests/runner/map_as_cparam/init_unassignable_ipc_output.json b/tests/runner/map_as_cparam/init_unassignable_ipc_output.json index 8a7411ad6..8d1be61a6 100644 --- a/tests/runner/map_as_cparam/init_unassignable_ipc_output.json +++ b/tests/runner/map_as_cparam/init_unassignable_ipc_output.json @@ -5,4 +5,4 @@ "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], "events": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_address_type_ipc_output.json b/tests/runner/remote_state_reads/init_address_type_ipc_output.json index c4b542ba7..a74f7e04c 100644 --- a/tests/runner/remote_state_reads/init_address_type_ipc_output.json +++ b/tests/runner/remote_state_reads/init_address_type_ipc_output.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7063", + "gas_remaining": "7112", "errors": [ { "error_message": "Address type not allowed in json file", @@ -8,4 +8,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_assignable_map_types_ipc_output.json b/tests/runner/remote_state_reads/init_assignable_map_types_ipc_output.json index ad5942eba..c780da6dd 100644 --- a/tests/runner/remote_state_reads/init_assignable_map_types_ipc_output.json +++ b/tests/runner/remote_state_reads/init_assignable_map_types_ipc_output.json @@ -1,8 +1,8 @@ { "scilla_major_version": "0", - "gas_remaining": "56484", + "gas_remaining": "56880", "_accepted": "false", "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], "events": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_balance_and_nonce_ipc_output.json b/tests/runner/remote_state_reads/init_balance_and_nonce_ipc_output.json index ad5942eba..c780da6dd 100644 --- a/tests/runner/remote_state_reads/init_balance_and_nonce_ipc_output.json +++ b/tests/runner/remote_state_reads/init_balance_and_nonce_ipc_output.json @@ -1,8 +1,8 @@ { "scilla_major_version": "0", - "gas_remaining": "56484", + "gas_remaining": "56880", "_accepted": "false", "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], "events": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_balance_no_nonce_ipc_output.json b/tests/runner/remote_state_reads/init_balance_no_nonce_ipc_output.json index ad5942eba..c780da6dd 100644 --- a/tests/runner/remote_state_reads/init_balance_no_nonce_ipc_output.json +++ b/tests/runner/remote_state_reads/init_balance_no_nonce_ipc_output.json @@ -1,8 +1,8 @@ { "scilla_major_version": "0", - "gas_remaining": "56484", + "gas_remaining": "56880", "_accepted": "false", "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], "events": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_ipc_output.json b/tests/runner/remote_state_reads/init_ipc_output.json index ad5942eba..c780da6dd 100644 --- a/tests/runner/remote_state_reads/init_ipc_output.json +++ b/tests/runner/remote_state_reads/init_ipc_output.json @@ -1,8 +1,8 @@ { "scilla_major_version": "0", - "gas_remaining": "56484", + "gas_remaining": "56880", "_accepted": "false", "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], "events": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_missing_field_ipc_output.json b/tests/runner/remote_state_reads/init_missing_field_ipc_output.json index 7c025d2a8..ff9d6b793 100644 --- a/tests/runner/remote_state_reads/init_missing_field_ipc_output.json +++ b/tests/runner/remote_state_reads/init_missing_field_ipc_output.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7059", + "gas_remaining": "7109", "errors": [ { "error_message": @@ -9,4 +9,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_no_address_ipc_output.json b/tests/runner/remote_state_reads/init_no_address_ipc_output.json index 36782258f..678b77129 100644 --- a/tests/runner/remote_state_reads/init_no_address_ipc_output.json +++ b/tests/runner/remote_state_reads/init_no_address_ipc_output.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7058", + "gas_remaining": "7108", "errors": [ { "error_message": @@ -9,4 +9,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_nonce_no_balance_ipc_output.json b/tests/runner/remote_state_reads/init_nonce_no_balance_ipc_output.json index ad5942eba..c780da6dd 100644 --- a/tests/runner/remote_state_reads/init_nonce_no_balance_ipc_output.json +++ b/tests/runner/remote_state_reads/init_nonce_no_balance_ipc_output.json @@ -1,8 +1,8 @@ { "scilla_major_version": "0", - "gas_remaining": "56484", + "gas_remaining": "56880", "_accepted": "false", "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], "events": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_wrong_address_field_type_ipc_output.json b/tests/runner/remote_state_reads/init_wrong_address_field_type_ipc_output.json index 7c025d2a8..ff9d6b793 100644 --- a/tests/runner/remote_state_reads/init_wrong_address_field_type_ipc_output.json +++ b/tests/runner/remote_state_reads/init_wrong_address_field_type_ipc_output.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7059", + "gas_remaining": "7109", "errors": [ { "error_message": @@ -9,4 +9,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_wrong_field_type_ipc_output.json b/tests/runner/remote_state_reads/init_wrong_field_type_ipc_output.json index 7c025d2a8..ff9d6b793 100644 --- a/tests/runner/remote_state_reads/init_wrong_field_type_ipc_output.json +++ b/tests/runner/remote_state_reads/init_wrong_field_type_ipc_output.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7059", + "gas_remaining": "7109", "errors": [ { "error_message": @@ -9,4 +9,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/init_wrong_map_type_ipc_output.json b/tests/runner/remote_state_reads/init_wrong_map_type_ipc_output.json index 7c025d2a8..ff9d6b793 100644 --- a/tests/runner/remote_state_reads/init_wrong_map_type_ipc_output.json +++ b/tests/runner/remote_state_reads/init_wrong_map_type_ipc_output.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7059", + "gas_remaining": "7109", "errors": [ { "error_message": @@ -9,4 +9,4 @@ } ], "warnings": [] -} +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/message_11.json b/tests/runner/remote_state_reads/message_11.json deleted file mode 100644 index 57a7511e7..000000000 --- a/tests/runner/remote_state_reads/message_11.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "_tag": "RemoteReadsTest", - "_amount": "0", - "_sender": "0xabfeccdc9012345678901234567890f777564322", - "params": [ - { - "vname" : "remote1", - "type" : "ByStr20", - "value" : "0xabfeccdc9012345678901234567890f777564323" - }, - { - "vname" : "remote2", - "type" : "ByStr20", - "value" : "0xabfeccdc9012345678901234567890f777564324" - }, - { - "vname" : "remote3", - "type" : "ByStr20", - "value" : "0xabfeccdc9012345678901234567890f777564325" - } - ], - "_origin": "0xabfeccdc9012345678901234567890f777564322" -} diff --git a/tests/runner/remote_state_reads/message_127.json b/tests/runner/remote_state_reads/message_127.json index 2986ce244..5ee9aaeed 100644 --- a/tests/runner/remote_state_reads/message_127.json +++ b/tests/runner/remote_state_reads/message_127.json @@ -1,7 +1,108 @@ { - "_tag": "SenderBalanceTest", - "_amount": "100", + "_tag": "RemoteReadsADTTest", + "_amount": "0", "_sender": "0xabfeccdc9012345678901234567890f777564322", - "params": [], + "params": [ + { + "vname" : "list1", + "type" : "List ByStr20", + "value" : { + "constructor" : "Cons", + "argtypes" : [ "ByStr20" ], + "arguments" : [ + "0xabfeccdc9012345678901234567890f777564323", + { + "constructor" : "Cons", + "argtypes" : [ "ByStr20" ], + "arguments" : [ + "0xabfeccdc9012345678901234567890f777564324", + { + "constructor" : "Cons", + "argtypes" : [ "ByStr20" ], + "arguments" : [ + "0xabfeccdc9012345678901234567890f777564325", + { + "constructor" : "Nil", + "argtypes" : [ "ByStr20" ], + "arguments" : [] + } + ] + } + ] + } + ] + } + }, + { + "vname" : "list2", + "type" : "List ByStr20", + "value" : { + "constructor" : "Cons", + "argtypes" : [ "ByStr20" ], + "arguments" : [ + "0xabfeccdc9012345678901234567890f777564323", + { + "constructor" : "Nil", + "argtypes" : [ "ByStr20" ], + "arguments" : [] + } + ] + } + }, + { + "vname" : "list3", + "type" : "List ByStr20", + "value" : { + "constructor" : "Cons", + "argtypes" : [ "ByStr20" ], + "arguments" : [ + "0xabfeccdc9012345678901234567890f777564324", + { + "constructor" : "Cons", + "argtypes" : [ "ByStr20" ], + "arguments" : [ + "0xabfeccdc9012345678901234567890f777564323", + { + "constructor" : "Nil", + "argtypes" : [ "ByStr20" ], + "arguments" : [] + } + ] + } + ] + } + }, + { + "vname" : "pair1", + "type" : "Pair ByStr20 0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value" : { + "constructor" : "Pair", + "argtypes" : [ "ByStr20", "0x3620c286757a29985cee194eb90064270fb65414.AddressADT" ], + "arguments" : [ + "0xabfeccdc9012345678901234567890f777564323", + { + "constructor" : "0x3620c286757a29985cee194eb90064270fb65414.Address2", + "argtypes" : [], + "arguments" : [ "0xabfeccdc9012345678901234567890f777564327" ] + } + ] + } + }, + { + "vname" : "adt1", + "type" : "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value" : + { + "constructor" : "0x3620c286757a29985cee194eb90064270fb65414.Address2", + "argtypes" : [], + "arguments" : [ "0xabfeccdc9012345678901234567890f777564324" ] + } + }, + { + "vname" : "remote1", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564325" + } + ], "_origin": "0xabfeccdc9012345678901234567890f777564322" } diff --git a/tests/runner/remote_state_reads/message_131.json b/tests/runner/remote_state_reads/message_131.json deleted file mode 100644 index 5ee9aaeed..000000000 --- a/tests/runner/remote_state_reads/message_131.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_tag": "RemoteReadsADTTest", - "_amount": "0", - "_sender": "0xabfeccdc9012345678901234567890f777564322", - "params": [ - { - "vname" : "list1", - "type" : "List ByStr20", - "value" : { - "constructor" : "Cons", - "argtypes" : [ "ByStr20" ], - "arguments" : [ - "0xabfeccdc9012345678901234567890f777564323", - { - "constructor" : "Cons", - "argtypes" : [ "ByStr20" ], - "arguments" : [ - "0xabfeccdc9012345678901234567890f777564324", - { - "constructor" : "Cons", - "argtypes" : [ "ByStr20" ], - "arguments" : [ - "0xabfeccdc9012345678901234567890f777564325", - { - "constructor" : "Nil", - "argtypes" : [ "ByStr20" ], - "arguments" : [] - } - ] - } - ] - } - ] - } - }, - { - "vname" : "list2", - "type" : "List ByStr20", - "value" : { - "constructor" : "Cons", - "argtypes" : [ "ByStr20" ], - "arguments" : [ - "0xabfeccdc9012345678901234567890f777564323", - { - "constructor" : "Nil", - "argtypes" : [ "ByStr20" ], - "arguments" : [] - } - ] - } - }, - { - "vname" : "list3", - "type" : "List ByStr20", - "value" : { - "constructor" : "Cons", - "argtypes" : [ "ByStr20" ], - "arguments" : [ - "0xabfeccdc9012345678901234567890f777564324", - { - "constructor" : "Cons", - "argtypes" : [ "ByStr20" ], - "arguments" : [ - "0xabfeccdc9012345678901234567890f777564323", - { - "constructor" : "Nil", - "argtypes" : [ "ByStr20" ], - "arguments" : [] - } - ] - } - ] - } - }, - { - "vname" : "pair1", - "type" : "Pair ByStr20 0x3620c286757a29985cee194eb90064270fb65414.AddressADT", - "value" : { - "constructor" : "Pair", - "argtypes" : [ "ByStr20", "0x3620c286757a29985cee194eb90064270fb65414.AddressADT" ], - "arguments" : [ - "0xabfeccdc9012345678901234567890f777564323", - { - "constructor" : "0x3620c286757a29985cee194eb90064270fb65414.Address2", - "argtypes" : [], - "arguments" : [ "0xabfeccdc9012345678901234567890f777564327" ] - } - ] - } - }, - { - "vname" : "adt1", - "type" : "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", - "value" : - { - "constructor" : "0x3620c286757a29985cee194eb90064270fb65414.Address2", - "argtypes" : [], - "arguments" : [ "0xabfeccdc9012345678901234567890f777564324" ] - } - }, - { - "vname" : "remote1", - "type" : "ByStr20", - "value" : "0xabfeccdc9012345678901234567890f777564325" - } - ], - "_origin": "0xabfeccdc9012345678901234567890f777564322" -} diff --git a/tests/runner/remote_state_reads/message_9.json b/tests/runner/remote_state_reads/message_9.json index 296535d7a..57a7511e7 100644 --- a/tests/runner/remote_state_reads/message_9.json +++ b/tests/runner/remote_state_reads/message_9.json @@ -1,7 +1,23 @@ { - "_tag": "SenderBalanceTest", - "_amount": "100", - "_sender": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", - "params": [], - "_origin": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0" + "_tag": "RemoteReadsTest", + "_amount": "0", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [ + { + "vname" : "remote1", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564323" + }, + { + "vname" : "remote2", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564324" + }, + { + "vname" : "remote3", + "type" : "ByStr20", + "value" : "0xabfeccdc9012345678901234567890f777564325" + } + ], + "_origin": "0xabfeccdc9012345678901234567890f777564322" } diff --git a/tests/runner/remote_state_reads/output_127.json b/tests/runner/remote_state_reads/output_127.json index 2fbc31fb5..c402d2e06 100644 --- a/tests/runner/remote_state_reads/output_127.json +++ b/tests/runner/remote_state_reads/output_127.json @@ -1,9 +1,9 @@ { - "gas_remaining": "7970", + "gas_remaining": "7490", "errors": [ { "error_message": - "Insufficient sender balance for acceptance: Incoming vs sender_balance: 100 vs 50", + "No contract found at address: 0xabfeccdc9012345678901234567890f777564327", "start_location": { "file": "", "line": 0, "column": 0 }, "end_location": { "file": "", "line": 0, "column": 0 } } diff --git a/tests/runner/remote_state_reads/output_9.json b/tests/runner/remote_state_reads/output_9.json index 0d325907f..5a1c6e48e 100644 --- a/tests/runner/remote_state_reads/output_9.json +++ b/tests/runner/remote_state_reads/output_9.json @@ -1,13 +1,118 @@ { "scilla_major_version": "0", - "gas_remaining": "7962", - "_accepted": "true", + "gas_remaining": "7874", + "_accepted": "false", "messages": [], "states": [ - { "vname": "_balance", "type": "Uint128", "value": "100" }, - { "vname": "sender_balance_post", "type": "Uint128", "value": "999900" }, - { "vname": "sender_balance_mid", "type": "Uint128", "value": "999900" }, - { "vname": "sender_balance_pre", "type": "Uint128", "value": "1000000" }, + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_3_13", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_3_12", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "remote_reads_test_res_3_11", + "type": "Option (Map (ByStr20 with end) (Bool))", + "value": { + "constructor": "Some", + "argtypes": [ "Map (ByStr20 with end) (Bool)" ], + "arguments": [ + [ + { + "key": "0xabfeccdc9012345678901234567890f777564326", + "val": { + "constructor": "True", + "argtypes": [], + "arguments": [] + } + } + ] + ] + } + }, + { + "vname": "remote_reads_test_res_3_10", + "type": "Bool", + "value": { "constructor": "True", "argtypes": [], "arguments": [] } + }, + { + "vname": "remote_reads_test_res_3_9", + "type": "Map (Uint32) (Map (ByStr20 with end) (Bool))", + "value": [ + { + "key": "0", + "val": [ + { + "key": "0xabfeccdc9012345678901234567890f777564326", + "val": { + "constructor": "True", + "argtypes": [], + "arguments": [] + } + } + ] + } + ] + }, + { + "vname": "remote_reads_test_res_3_8", + "type": "Option (Bool)", + "value": { + "constructor": "None", + "argtypes": [ "Bool" ], + "arguments": [] + } + }, + { + "vname": "remote_reads_test_res_3_7", + "type": "Bool", + "value": { "constructor": "False", "argtypes": [], "arguments": [] } + }, + { + "vname": "remote_reads_test_res_3_6", + "type": "Map (ByStr20 with end) (Bool)", + "value": [ + { + "key": "0xabfeccdc9012345678901234567890f777564326", + "val": { "constructor": "True", "argtypes": [], "arguments": [] } + } + ] + }, + { + "vname": "remote_reads_test_res_3_5", + "type": "Uint128", + "value": "128" + }, + { + "vname": "remote_reads_test_res_3_4", + "type": "ByStr20 with end", + "value": "0xabfeccdc9012345678901234567890f777564326" + }, + { "vname": "remote_reads_test_res_3_3", "type": "Uint32", "value": "5" }, + { + "vname": "remote_reads_test_res_3_1", + "type": "Uint128", + "value": "31" + }, + { + "vname": "remote_reads_test_res_2_1", + "type": "Uint128", + "value": "64" + }, + { + "vname": "remote_reads_test_res_1_1", + "type": "Uint128", + "value": "10" + }, { "vname": "assign_test_1", "type": "ByStr20 with end", @@ -71,72 +176,9 @@ "Map (Uint128) (Map (Uint128) (0x3620c286757a29985cee194eb90064270fb65414.AddressADT))", "value": [] }, - { "vname": "remote_reads_test_res_1_1", "type": "Uint128", "value": "0" }, - { "vname": "remote_reads_test_res_2_1", "type": "Uint128", "value": "0" }, - { "vname": "remote_reads_test_res_3_1", "type": "Uint128", "value": "0" }, - { "vname": "remote_reads_test_res_3_3", "type": "Uint32", "value": "0" }, - { - "vname": "remote_reads_test_res_3_4", - "type": "ByStr20 with end", - "value": "0xabfeccdc9012345678901234567890f777567890" - }, - { "vname": "remote_reads_test_res_3_5", "type": "Uint128", "value": "0" }, - { - "vname": "remote_reads_test_res_3_6", - "type": "Map (ByStr20 with end) (Bool)", - "value": [] - }, - { - "vname": "remote_reads_test_res_3_7", - "type": "Bool", - "value": { "constructor": "True", "argtypes": [], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_8", - "type": "Option (Bool)", - "value": { - "constructor": "Some", - "argtypes": [ "Bool" ], - "arguments": [ - { "constructor": "True", "argtypes": [], "arguments": [] } - ] - } - }, - { - "vname": "remote_reads_test_res_3_9", - "type": "Map (Uint32) (Map (ByStr20 with end) (Bool))", - "value": [] - }, - { - "vname": "remote_reads_test_res_3_10", - "type": "Bool", - "value": { "constructor": "False", "argtypes": [], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_11", - "type": "Option (Map (ByStr20 with end) (Bool))", - "value": { - "constructor": "None", - "argtypes": [ "Map (ByStr20 with end) (Bool)" ], - "arguments": [] - } - }, - { - "vname": "remote_reads_test_res_3_12", - "type": "Bool", - "value": { "constructor": "True", "argtypes": [], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_13", - "type": "Option (Bool)", - "value": { - "constructor": "Some", - "argtypes": [ "Bool" ], - "arguments": [ - { "constructor": "True", "argtypes": [], "arguments": [] } - ] - } - } + { "vname": "sender_balance_pre", "type": "Uint128", "value": "0" }, + { "vname": "sender_balance_mid", "type": "Uint128", "value": "0" }, + { "vname": "sender_balance_post", "type": "Uint128", "value": "0" } ], "events": [] } \ No newline at end of file diff --git a/tests/runner/remote_state_reads/state_11.json b/tests/runner/remote_state_reads/state_11.json deleted file mode 100644 index 693c52028..000000000 --- a/tests/runner/remote_state_reads/state_11.json +++ /dev/null @@ -1,199 +0,0 @@ -[ - { "vname": "_balance", "type": "Uint128", "value": "0" }, - { - "vname": "assign_test_1", - "type": "ByStr20 with end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_2", - "type": "ByStr20 with contract field transactionCount : Uint32 end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_3", - "type": "ByStr20 with contract field admin : ByStr20 with end end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_4", - "type": "ByStr20 with contract field admin : ByStr20 end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_5", - "type": "ByStr20 with contract field owners : Map (ByStr20) (Bool) end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_6", - "type": - "ByStr20 with contract field signatures : Map (Uint32) (Map (ByStr20) (Bool)) end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_7", - "type": "ByStr20 with contract field other_map : Map (Uint128) (ByStr20) end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_8", - "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", - "value": { - "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", - "argtypes": [], - "arguments": [ "0x1234567890123456789012345678901234567890" ] - } - }, - { - "vname": "assign_test_9", - "type": "List (0x3620c286757a29985cee194eb90064270fb65414.AddressADT)", - "value": { - "constructor" : "Nil", - "argtypes" : ["0x3620c286757a29985cee194eb90064270fb65414.AddressADT"], - "arguments": [] - } - }, - { - "vname": "assign_test_10", - "type": - "Map (Uint128) (Map (Uint128) (0x3620c286757a29985cee194eb90064270fb65414.AddressADT))", - "value": [] - }, - { - "vname": "remote_reads_test_res_1_1", - "type": "Uint128", - "value": "0" - }, - { - "vname": "remote_reads_test_res_2_1", - "type": "Uint128", - "value": "0" - }, - { - "vname": "remote_reads_test_res_3_1", - "type": "Uint128", - "value": "0" - }, - { - "vname": "remote_reads_test_res_3_3", - "type": "Uint32", - "value": "0" - }, - { - "vname": "remote_reads_test_res_3_4", - "type": "ByStr20 with end", - "value": "0xabfeccdc9012345678901234567890f777567890" - }, - { - "vname": "remote_reads_test_res_3_5", - "type": "Uint128", - "value": "0" - }, - { - "vname": "remote_reads_test_res_3_6", - "type": "Map (ByStr20 with end) Bool", - "value": [] - }, - { - "vname": "remote_reads_test_res_3_7", - "type": "Bool", - "value": { "constructor": "True", "argtypes": [], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_8", - "type": "Option Bool", - "value": { "constructor": "Some", "argtypes": ["Bool"], "arguments": [ { "constructor": "True", "argtypes": [], "arguments": [] } ] } - }, - { - "vname": "remote_reads_test_res_3_9", - "type": "Map Uint32 (Map (ByStr20 with end) Bool)", - "value": [] - }, - { - "vname": "remote_reads_test_res_3_10", - "type": "Bool", - "value": { "constructor": "False", "argtypes": [], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_11", - "type": "Option (Map (ByStr20 with end) Bool)", - "value": { "constructor": "None", "argtypes": ["Map (ByStr20 with end) Bool"], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_12", - "type": "Bool", - "value": { "constructor": "True", "argtypes": [], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_13", - "type": "Option Bool", - "value": { "constructor": "Some", "argtypes": ["Bool"], "arguments": [ { "constructor": "True", "argtypes": [], "arguments": [] } ] } - }, - { "vname": "sender_balance_pre", "type": "Uint128", "value": "0" }, - { "vname": "sender_balance_mid", "type": "Uint128", "value": "0" }, - { "vname": "sender_balance_post", "type": "Uint128", "value": "0" }, - { - "vname": "_external", - "type": "Unit", - "value": [ - { - "address": "0xabfeccdc9012345678901234567890f777564323", - "state": [ - { "vname": "_nonce", "type": "Uint64", "value": "22" }, - { "vname": "_balance", "type": "Uint128", "value": "10" } - ] - }, - { - "address": "0xabfeccdc9012345678901234567890f777564324", - "state": [ - { "vname": "_nonce", "type": "Uint64", "value": "0" }, - { "vname": "_balance", "type": "Uint128", "value": "64" }, - { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } - ] - }, - { - "address": "0xabfeccdc9012345678901234567890f777564325", - "state": [ - { "vname": "_nonce", "type": "Uint64", "value": "0" }, - { "vname": "_balance", "type": "Uint128", "value": "31" }, - { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, - { "vname": "transactionCount", "type": "Uint32", "value": "5" }, - { "vname": "admin", "type": "ByStr20 with end", "value": "0xabfeccdc9012345678901234567890f777564326" }, - { - "vname": "owners", - "type": "Map (ByStr20 with end) Bool", - "value": [ - { - "key" : "0xabfeccdc9012345678901234567890f777564326", - "val" : { "constructor": "True", "argtypes": [], "arguments": [] } - } - ] - }, - { - "vname": "signatures", - "type": "Map Uint32 (Map (ByStr20 with end) Bool)", - "value": [ - { - "key" : "0", - "val" : [ - { - "key" : "0xabfeccdc9012345678901234567890f777564326", - "val" : { "constructor": "True", "argtypes": [], "arguments": [] } - } - ] - } - ] - } - ] - }, - { - "address": "0xabfeccdc9012345678901234567890f777564326", - "state": [ - { "vname": "_nonce", "type": "Uint64", "value": "0" }, - { "vname": "_balance", "type": "Uint128", "value": "128" } - ] - } - ] - } -] diff --git a/tests/runner/remote_state_reads/state_127.json b/tests/runner/remote_state_reads/state_127.json index d493e09cb..3b6610c60 100644 --- a/tests/runner/remote_state_reads/state_127.json +++ b/tests/runner/remote_state_reads/state_127.json @@ -20,22 +20,6 @@ "type": "ByStr20 with contract field admin : ByStr20 end", "value": "0x1234567890123456789012345678901234567890" }, - { - "vname": "assign_test_5", - "type": "ByStr20 with contract field owners : Map (ByStr20) (Bool) end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_6", - "type": - "ByStr20 with contract field signatures : Map (Uint32) (Map (ByStr20) (Bool)) end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_7", - "type": "ByStr20 with contract field other_map : Map (Uint128) (ByStr20) end", - "value": "0x1234567890123456789012345678901234567890" - }, { "vname": "remote_reads_test_res_1_1", "type": "Uint128", @@ -114,9 +98,81 @@ "type": "Unit", "value": [ { - "address": "0xabfeccdc9012345678901234567890f777564322", + "address": "0xabfeccdc9012345678901234567890f777564323", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "42" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, + { "vname": "f", "type": "Uint128", "value": "0" }, + { "vname": "g", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address2", + "argtypes": [], + "arguments": [ "0xabfeccdc9012345678901234567890f777564324" ] + } + } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, + { "vname": "admin", "type": "ByStr20 with end", "value": "0xabfeccdc9012345678901234567890f777564323" }, + { "vname": "g", + "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0xabfeccdc9012345678901234567890f777564324" ] + } + } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564325", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "31" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, + { + "vname": "h", + "type": "Map Uint128 0x3620c286757a29985cee194eb90064270fb65414.AddressADT", + "value": [ + { + "key" : "0", + "val" : { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", + "argtypes": [], + "arguments": [ "0xabfeccdc9012345678901234567890f777564325" ] } + }, + { + "key" : "1", + "val" : { + "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address2", + "argtypes": [], + "arguments": [ "0xabfeccdc9012345678901234567890f777564326" ] } + } + ] + } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564326", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "128" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, + { "vname": "admin", "type": "ByStr20 with end", "value": "0xabfeccdc9012345678901234567890f777564326" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564327", "state": [ - { "vname": "_balance", "type": "Uint128", "value": "50" } + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "1" } ] } ] diff --git a/tests/runner/remote_state_reads/state_131.json b/tests/runner/remote_state_reads/state_131.json deleted file mode 100644 index 3b6610c60..000000000 --- a/tests/runner/remote_state_reads/state_131.json +++ /dev/null @@ -1,180 +0,0 @@ -[ - { "vname": "_balance", "type": "Uint128", "value": "0" }, - { - "vname": "assign_test_1", - "type": "ByStr20 with end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_2", - "type": "ByStr20 with contract field transactionCount : Uint32 end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_3", - "type": "ByStr20 with contract field admin : ByStr20 with end end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "assign_test_4", - "type": "ByStr20 with contract field admin : ByStr20 end", - "value": "0x1234567890123456789012345678901234567890" - }, - { - "vname": "remote_reads_test_res_1_1", - "type": "Uint128", - "value": "0" - }, - { - "vname": "remote_reads_test_res_2_1", - "type": "Uint128", - "value": "0" - }, - { - "vname": "remote_reads_test_res_3_1", - "type": "Uint128", - "value": "0" - }, - { - "vname": "remote_reads_test_res_3_3", - "type": "Uint32", - "value": "0" - }, - { - "vname": "remote_reads_test_res_3_4", - "type": "ByStr20 with end", - "value": "0xabfeccdc9012345678901234567890f777567890" - }, - { - "vname": "remote_reads_test_res_3_5", - "type": "Uint128", - "value": "0" - }, - { - "vname": "remote_reads_test_res_3_6", - "type": "Map (ByStr20 with end) Bool", - "value": [] - }, - { - "vname": "remote_reads_test_res_3_7", - "type": "Bool", - "value": { "constructor": "True", "argtypes": [], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_8", - "type": "Option Bool", - "value": { "constructor": "Some", "argtypes": ["Bool"], "arguments": [ { "constructor": "True", "argtypes": [], "arguments": [] } ] } - }, - { - "vname": "remote_reads_test_res_3_9", - "type": "Map Uint32 (Map (ByStr20 with end) Bool)", - "value": [] - }, - { - "vname": "remote_reads_test_res_3_10", - "type": "Bool", - "value": { "constructor": "False", "argtypes": [], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_11", - "type": "Option (Map (ByStr20 with end) Bool)", - "value": { "constructor": "None", "argtypes": ["Map (ByStr20 with end) (Bool)"], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_12", - "type": "Bool", - "value": { "constructor": "True", "argtypes": [], "arguments": [] } - }, - { - "vname": "remote_reads_test_res_3_13", - "type": "Option Bool", - "value": { "constructor": "Some", "argtypes": ["Bool"], "arguments": [ { "constructor": "True", "argtypes": [], "arguments": [] } ] } - }, - { "vname": "sender_balance_pre", "type": "Uint128", "value": "0" }, - { "vname": "sender_balance_mid", "type": "Uint128", "value": "0" }, - { "vname": "sender_balance_post", "type": "Uint128", "value": "0" }, - { - "vname": "_external", - "type": "Unit", - "value": [ - { - "address": "0xabfeccdc9012345678901234567890f777564323", - "state": [ - { "vname": "_nonce", "type": "Uint64", "value": "0" }, - { "vname": "_balance", "type": "Uint128", "value": "42" }, - { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564323" }, - { "vname": "f", "type": "Uint128", "value": "0" }, - { "vname": "g", - "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", - "value": { - "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address2", - "argtypes": [], - "arguments": [ "0xabfeccdc9012345678901234567890f777564324" ] - } - } - ] - }, - { - "address": "0xabfeccdc9012345678901234567890f777564324", - "state": [ - { "vname": "_nonce", "type": "Uint64", "value": "0" }, - { "vname": "_balance", "type": "Uint128", "value": "64" }, - { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" }, - { "vname": "admin", "type": "ByStr20 with end", "value": "0xabfeccdc9012345678901234567890f777564323" }, - { "vname": "g", - "type": "0x3620c286757a29985cee194eb90064270fb65414.AddressADT", - "value": { - "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", - "argtypes": [], - "arguments": [ "0xabfeccdc9012345678901234567890f777564324" ] - } - } - ] - }, - { - "address": "0xabfeccdc9012345678901234567890f777564325", - "state": [ - { "vname": "_nonce", "type": "Uint64", "value": "0" }, - { "vname": "_balance", "type": "Uint128", "value": "31" }, - { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, - { - "vname": "h", - "type": "Map Uint128 0x3620c286757a29985cee194eb90064270fb65414.AddressADT", - "value": [ - { - "key" : "0", - "val" : { - "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address1", - "argtypes": [], - "arguments": [ "0xabfeccdc9012345678901234567890f777564325" ] } - }, - { - "key" : "1", - "val" : { - "constructor": "0x3620c286757a29985cee194eb90064270fb65414.Address2", - "argtypes": [], - "arguments": [ "0xabfeccdc9012345678901234567890f777564326" ] } - } - ] - } - ] - }, - { - "address": "0xabfeccdc9012345678901234567890f777564326", - "state": [ - { "vname": "_nonce", "type": "Uint64", "value": "0" }, - { "vname": "_balance", "type": "Uint128", "value": "128" }, - { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564326" }, - { "vname": "admin", "type": "ByStr20 with end", "value": "0xabfeccdc9012345678901234567890f777564326" } - ] - }, - { - "address": "0xabfeccdc9012345678901234567890f777564327", - "state": [ - { "vname": "_nonce", "type": "Uint64", "value": "0" }, - { "vname": "_balance", "type": "Uint128", "value": "1" } - ] - } - ] - } -] diff --git a/tests/runner/remote_state_reads/state_9.json b/tests/runner/remote_state_reads/state_9.json index 0998c8aec..693c52028 100644 --- a/tests/runner/remote_state_reads/state_9.json +++ b/tests/runner/remote_state_reads/state_9.json @@ -118,7 +118,7 @@ { "vname": "remote_reads_test_res_3_11", "type": "Option (Map (ByStr20 with end) Bool)", - "value": { "constructor": "None", "argtypes": ["Map (ByStr20 with end) (Bool)"], "arguments": [] } + "value": { "constructor": "None", "argtypes": ["Map (ByStr20 with end) Bool"], "arguments": [] } }, { "vname": "remote_reads_test_res_3_12", @@ -138,9 +138,60 @@ "type": "Unit", "value": [ { - "address": "0x5c6712c8f3b049e98e733cfdb38a8e37a1c724c0", + "address": "0xabfeccdc9012345678901234567890f777564323", "state": [ - { "vname": "_balance", "type": "Uint128", "value": "1000000" } + { "vname": "_nonce", "type": "Uint64", "value": "22" }, + { "vname": "_balance", "type": "Uint128", "value": "10" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564324", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "64" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564324" } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564325", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "31" }, + { "vname": "_this_address", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777564325" }, + { "vname": "transactionCount", "type": "Uint32", "value": "5" }, + { "vname": "admin", "type": "ByStr20 with end", "value": "0xabfeccdc9012345678901234567890f777564326" }, + { + "vname": "owners", + "type": "Map (ByStr20 with end) Bool", + "value": [ + { + "key" : "0xabfeccdc9012345678901234567890f777564326", + "val" : { "constructor": "True", "argtypes": [], "arguments": [] } + } + ] + }, + { + "vname": "signatures", + "type": "Map Uint32 (Map (ByStr20 with end) Bool)", + "value": [ + { + "key" : "0", + "val" : [ + { + "key" : "0xabfeccdc9012345678901234567890f777564326", + "val" : { "constructor": "True", "argtypes": [], "arguments": [] } + } + ] + } + ] + } + ] + }, + { + "address": "0xabfeccdc9012345678901234567890f777564326", + "state": [ + { "vname": "_nonce", "type": "Uint64", "value": "0" }, + { "vname": "_balance", "type": "Uint128", "value": "128" } ] } ]