From e8fe3fa4ba4941af2b9cdc05f231849f6bbd1f58 Mon Sep 17 00:00:00 2001 From: Jacob Johannsen Date: Mon, 8 Mar 2021 12:35:29 +0100 Subject: [PATCH] Decrease sender balance on acceptance --- src/base/ScillaParser.mly | 21 ++- src/eval/Eval.ml | 2 +- src/eval/EvalUtil.ml | 72 ++++++-- ...ld-id-colon-cid-eq-hexlit-with.scilla.gold | 2 +- .../good/gold/remote_state_reads.scilla.gold | 27 ++- tests/contracts/remote_state_reads.scilla | 19 ++- tests/runner/Testcontracts.ml | 4 +- tests/runner/auction/state_1.json | 14 +- tests/runner/auction/state_2.json | 14 +- tests/runner/auction/state_3.json | 14 +- tests/runner/auction/state_4.json | 14 +- tests/runner/auction/state_5.json | 14 +- tests/runner/cfinvoke/state_1.json | 14 +- tests/runner/cfinvoke/state_4.json | 14 +- tests/runner/crowdfunding/state_1.json | 12 ++ tests/runner/crowdfunding/state_2.json | 14 +- tests/runner/crowdfunding/state_3.json | 12 ++ tests/runner/crowdfunding/state_6.json | 12 ++ tests/runner/crowdfunding_proc/state_1.json | 12 ++ tests/runner/crowdfunding_proc/state_2.json | 14 +- tests/runner/crowdfunding_proc/state_3.json | 12 ++ tests/runner/crowdfunding_proc/state_6.json | 12 ++ tests/runner/earmarked-coin/state_1.json | 14 +- .../remote_state_reads/blockchain_127.json | 1 + .../remote_state_reads/blockchain_9.json | 1 + .../init_assignable_map_types_ipc_output.json | 2 +- .../remote_state_reads/init_ipc_output.json | 2 +- .../init_missing_field_ipc_output.json | 2 +- .../init_no_address_ipc_output.json | 2 +- .../remote_state_reads/init_output.json | 2 +- ...t_wrong_address_field_type_ipc_output.json | 2 +- .../init_wrong_field_type_ipc_output.json | 2 +- .../init_wrong_map_type_ipc_output.json | 2 +- .../remote_state_reads/message_127.json | 7 + .../runner/remote_state_reads/message_9.json | 7 + tests/runner/remote_state_reads/output_1.json | 5 +- .../runner/remote_state_reads/output_101.json | 2 +- .../runner/remote_state_reads/output_102.json | 2 +- .../runner/remote_state_reads/output_103.json | 2 +- .../runner/remote_state_reads/output_104.json | 2 +- .../runner/remote_state_reads/output_105.json | 2 +- .../runner/remote_state_reads/output_106.json | 2 +- .../runner/remote_state_reads/output_107.json | 2 +- .../runner/remote_state_reads/output_108.json | 2 +- .../runner/remote_state_reads/output_126.json | 4 +- .../runner/remote_state_reads/output_127.json | 11 ++ tests/runner/remote_state_reads/output_2.json | 5 +- tests/runner/remote_state_reads/output_3.json | 5 +- tests/runner/remote_state_reads/output_4.json | 5 +- tests/runner/remote_state_reads/output_5.json | 5 +- tests/runner/remote_state_reads/output_6.json | 5 +- tests/runner/remote_state_reads/output_7.json | 7 +- tests/runner/remote_state_reads/output_8.json | 5 +- tests/runner/remote_state_reads/output_9.json | 145 +++++++++++++++++ tests/runner/remote_state_reads/state_1.json | 3 + .../runner/remote_state_reads/state_100.json | 3 + .../runner/remote_state_reads/state_101.json | 3 + .../runner/remote_state_reads/state_102.json | 3 + .../runner/remote_state_reads/state_103.json | 3 + .../runner/remote_state_reads/state_104.json | 3 + .../runner/remote_state_reads/state_105.json | 3 + .../runner/remote_state_reads/state_106.json | 3 + .../runner/remote_state_reads/state_107.json | 3 + .../runner/remote_state_reads/state_108.json | 3 + .../runner/remote_state_reads/state_109.json | 3 + .../runner/remote_state_reads/state_110.json | 3 + .../runner/remote_state_reads/state_111.json | 3 + .../runner/remote_state_reads/state_112.json | 3 + .../runner/remote_state_reads/state_113.json | 3 + .../runner/remote_state_reads/state_114.json | 3 + .../runner/remote_state_reads/state_115.json | 3 + .../runner/remote_state_reads/state_116.json | 3 + .../runner/remote_state_reads/state_117.json | 3 + .../runner/remote_state_reads/state_118.json | 3 + .../runner/remote_state_reads/state_119.json | 3 + .../runner/remote_state_reads/state_120.json | 3 + .../runner/remote_state_reads/state_121.json | 3 + .../runner/remote_state_reads/state_122.json | 3 + .../runner/remote_state_reads/state_123.json | 3 + .../runner/remote_state_reads/state_124.json | 3 + .../runner/remote_state_reads/state_125.json | 3 + .../runner/remote_state_reads/state_126.json | 3 + .../runner/remote_state_reads/state_127.json | 134 +++++++++++++++ tests/runner/remote_state_reads/state_2.json | 3 + tests/runner/remote_state_reads/state_3.json | 3 + tests/runner/remote_state_reads/state_4.json | 3 + tests/runner/remote_state_reads/state_5.json | 3 + tests/runner/remote_state_reads/state_6.json | 3 + tests/runner/remote_state_reads/state_7.json | 3 + tests/runner/remote_state_reads/state_8.json | 3 + tests/runner/remote_state_reads/state_9.json | 154 ++++++++++++++++++ tests/runner/salarybot/state_0.json | 12 ++ tests/runner/wallet/state_1.json | 14 +- tests/runner/wallet/state_6.json | 14 +- tests/runner/wallet_2/state_1.json | 14 +- tests/runner/wallet_2/state_2.json | 14 +- 96 files changed, 993 insertions(+), 77 deletions(-) create mode 100644 tests/runner/remote_state_reads/blockchain_127.json create mode 100644 tests/runner/remote_state_reads/blockchain_9.json create mode 100644 tests/runner/remote_state_reads/message_127.json create mode 100644 tests/runner/remote_state_reads/message_9.json create mode 100644 tests/runner/remote_state_reads/output_127.json create mode 100644 tests/runner/remote_state_reads/output_9.json create mode 100644 tests/runner/remote_state_reads/state_127.json create mode 100644 tests/runner/remote_state_reads/state_9.json diff --git a/src/base/ScillaParser.mly b/src/base/ScillaParser.mly index cff732d11..b83efb005 100644 --- a/src/base/ScillaParser.mly +++ b/src/base/ScillaParser.mly @@ -352,22 +352,14 @@ type_term : stmt: | l = ID; FETCH; r = sid { (Load (to_loc_id l (toLoc $startpos(l)), ParserIdentifier.mk_id r (toLoc $startpos(r))), toLoc $startpos) } -| l = ID; REMOTEFETCH; adr = ID; PERIOD; r = sid - { (RemoteLoad (to_loc_id l (toLoc $startpos(l)), - to_loc_id adr (toLoc $startpos(adr)), - ParserIdentifier.mk_id r (toLoc $startpos(r))), - toLoc $startpos) } +| r = remote_fetch_stmt { r } | l = ID; ASSIGN; r = sid { (Store ( to_loc_id l (toLoc $startpos(l)), ParserIdentifier.mk_id r (toLoc $startpos(r))), toLoc $startpos) } | l = ID; EQ; r = exp { (Bind ( to_loc_id l (toLoc $startpos(l)), r), toLoc $startpos) } | l = ID; FETCH; AND; c = CID { (ReadFromBC ( to_loc_id l (toLoc $startpos(l)), c), toLoc $startpos) } | l = ID; FETCH; r = ID; keys = nonempty_list(map_access) { MapGet( to_loc_id l (toLoc $startpos(l)), to_loc_id r (toLoc $startpos(r)), keys, true), toLoc $startpos } -| l = ID; REMOTEFETCH; adr = ID; PERIOD; r = ID; keys = nonempty_list(map_access) - { RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), keys, true), toLoc $startpos } | l = ID; FETCH; EXISTS; r = ID; keys = nonempty_list(map_access) { MapGet( to_loc_id l (toLoc $startpos(l)), to_loc_id r (toLoc $startpos(r)), keys, false), toLoc $startpos } -| l = ID; REMOTEFETCH; EXISTS; adr = ID; PERIOD; r = ID; keys = nonempty_list(map_access) - { RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), keys, false), toLoc $startpos } | l = ID; keys = nonempty_list(map_access); ASSIGN; r = sid { MapUpdate( to_loc_id l (toLoc $startpos(l)), keys, Some (ParserIdentifier.mk_id r (toLoc $startpos(r)))), toLoc $startpos } | DELETE; l = ID; keys = nonempty_list(map_access) @@ -386,6 +378,17 @@ stmt: FORALL; l = sident; p = component_id { Iterate (l, p), toLoc $startpos } +remote_fetch_stmt: +| l = ID; REMOTEFETCH; adr = ID; PERIOD; r = sident + { RemoteLoad (to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), r), toLoc $startpos } +| (* Reading _sender._balance or _origin._balance *) + l = ID; REMOTEFETCH; adr = SPID; PERIOD; r = SPID + { RemoteLoad (to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r))), toLoc $startpos } +| l = ID; REMOTEFETCH; adr = ID; PERIOD; r = ID; keys = nonempty_list(map_access) + { RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), keys, true), toLoc $startpos } +| l = ID; REMOTEFETCH; EXISTS; adr = ID; PERIOD; r = ID; keys = nonempty_list(map_access) + { RemoteMapGet(to_loc_id l (toLoc $startpos(l)), to_loc_id adr (toLoc $startpos(adr)), to_loc_id r (toLoc $startpos(r)), keys, false), toLoc $startpos } + stmt_pm_clause: | BAR ; p = pattern ; ARROW ; ss = separated_list(SEMICOLON, stmt) { p, ss } diff --git a/src/eval/Eval.ml b/src/eval/Eval.ml index 22d653eac..9d5aa42c3 100644 --- a/src/eval/Eval.ml +++ b/src/eval/Eval.ml @@ -348,7 +348,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 s' r in + let%bind l = Configuration.remote_load conf s' r in let conf' = Configuration.bind conf (get_id x) l in stmt_eval conf' sts | _ -> fail0 "Expected remote load address to be ByStr20 value" ) diff --git a/src/eval/EvalUtil.ml b/src/eval/EvalUtil.ml index 9098a9f9d..b4e1874b0 100644 --- a/src/eval/EvalUtil.ml +++ b/src/eval/EvalUtil.ml @@ -167,6 +167,15 @@ module Configuration = struct let store i l = fromR @@ StateService.update ~fname:i ~keys:[] ~value:l + let lookup st k = Env.lookup st.env k + + (* Helper function for remote fetches *) + let lookup_sender_addr st = + let%bind sender = fromR @@ lookup st (mk_loc_id (label_name_of_string MessagePayload.sender_label)) in + match sender with + | EvalLiteral.ByStrX bs -> pure bs + | _ -> fail0 (sprintf "Incorrect type of _sender in environment: %s" (pp_literal sender)) + let load st k = let i = get_id k in if [%equal: EvalName.t] i balance_label then @@ -183,13 +192,30 @@ module Configuration = struct (EvalName.as_error_string i)) (ER.get_loc (get_rep k)) - let remote_load caddr k = + let remote_load st caddr k = let%bind fval = fromR @@ StateService.external_fetch ~caddr ~fname:k ~keys:[] ~ignoreval:false in match fval with - | Some v, _ -> pure v + | 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 + @@ sprintf "Unexpected sender balance or amount literal: sender balance = %s, amount = %s" + (pp_literal v) (pp_literal amount_lit) + else + pure v | _ -> fail1 (Printf.sprintf "Error loading field %s" @@ -286,24 +312,38 @@ module Configuration = struct in pure { st with env = kvs @ filtered_env } - let lookup st k = Env.lookup st.env k - let bc_lookup st k = BlockchainState.lookup st.blockchain_state k let accept_incoming st = - let incoming' = st.incoming_funds in - (* 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. *) - if 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 } + if st.accepted then + (* Do nothing *) + pure st else - fail0 - @@ sprintf "Incoming balance is negative (somehow):%s." - (Uint128.to_string incoming') + (* 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 "Insufficient sender balance for acceptance." + else + (* 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. *) + if 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 + @@ sprintf "Incoming balance is negative (somehow):%s." + (Uint128.to_string incoming') + | _ -> + fail0 + @@ sprintf "Unrecognized balance literal at sender: %s" + (pp_literal sender_balance_l) (* Finds a procedure proc_name, and returns the procedure and the list of procedures in scope for that procedure *) diff --git a/tests/base/parser/bad/gold/cmodule-field-id-colon-cid-eq-hexlit-with.scilla.gold b/tests/base/parser/bad/gold/cmodule-field-id-colon-cid-eq-hexlit-with.scilla.gold index 4c446ad0d..09615415b 100644 --- a/tests/base/parser/bad/gold/cmodule-field-id-colon-cid-eq-hexlit-with.scilla.gold +++ b/tests/base/parser/bad/gold/cmodule-field-id-colon-cid-eq-hexlit-with.scilla.gold @@ -1,7 +1,7 @@ { "errors": [ { - "error_message": "Syntax error, state number 314", + "error_message": "Syntax error, state number 318", "start_location": { "file": "base/parser/bad/cmodule-field-id-colon-cid-eq-hexlit-with.scilla", diff --git a/tests/checker/good/gold/remote_state_reads.scilla.gold b/tests/checker/good/gold/remote_state_reads.scilla.gold index 084e0c229..d55375039 100644 --- a/tests/checker/good/gold/remote_state_reads.scilla.gold +++ b/tests/checker/good/gold/remote_state_reads.scilla.gold @@ -29,7 +29,10 @@ { "field": "remote_reads_test_res_3_10", "tag": "NotMoney" }, { "field": "remote_reads_test_res_3_11", "tag": "(Option NoInfo)" }, { "field": "remote_reads_test_res_3_12", "tag": "NotMoney" }, - { "field": "remote_reads_test_res_3_13", "tag": "(Option NoInfo)" } + { "field": "remote_reads_test_res_3_13", "tag": "(Option NoInfo)" }, + { "field": "sender_balance_pre", "tag": "NoInfo" }, + { "field": "sender_balance_mid", "tag": "NoInfo" }, + { "field": "sender_balance_post", "tag": "NoInfo" } ], "ADT constructors": [] }, @@ -136,7 +139,10 @@ "vname": "remote_reads_test_res_3_13", "type": "Option (Bool)", "depth": 0 - } + }, + { "vname": "sender_balance_pre", "type": "Uint128", "depth": 0 }, + { "vname": "sender_balance_mid", "type": "Uint128", "depth": 0 }, + { "vname": "sender_balance_post", "type": "Uint128", "depth": 0 } ], "transitions": [ { @@ -178,7 +184,8 @@ }, { "vname": "OutgoingMsgTest", "params": [] }, { "vname": "ExceptionTest", "params": [] }, - { "vname": "AssignTest", "params": [] } + { "vname": "AssignTest", "params": [] }, + { "vname": "SenderBalanceTest", "params": [] } ], "procedures": [], "events": [ @@ -244,9 +251,17 @@ "warnings": [ { "warning_message": - "No transition in contract RRContract contains an accept statement\n", - "start_location": { "file": "", "line": 0, "column": 0 }, - "end_location": { "file": "", "line": 0, "column": 0 }, + "transition SenderBalanceTest has a potential code path with duplicate accept statements:\n Accept at contracts/remote_state_reads.scilla:177:3\n Accept at contracts/remote_state_reads.scilla:181:3\n", + "start_location": { + "file": "contracts/remote_state_reads.scilla", + "line": 177, + "column": 3 + }, + "end_location": { + "file": "contracts/remote_state_reads.scilla", + "line": 181, + "column": 9 + }, "warning_id": 1 } ], diff --git a/tests/contracts/remote_state_reads.scilla b/tests/contracts/remote_state_reads.scilla index db469335d..a79482ab8 100644 --- a/tests/contracts/remote_state_reads.scilla +++ b/tests/contracts/remote_state_reads.scilla @@ -49,6 +49,9 @@ field remote_reads_test_res_3_11 : Option (Map (ByStr20 with end) Bool) = None { field remote_reads_test_res_3_12 : Bool = False (* exists signatures[key1][key2] of remote3 *) field remote_reads_test_res_3_13 : Option Bool = None {Bool} (* signatures[key1][key2] of remote3 *) +field sender_balance_pre : Uint128 = Uint128 0 +field sender_balance_mid : Uint128 = Uint128 0 +field sender_balance_post : Uint128 = Uint128 0 transition RemoteReadsTest( (* Any address in use - _balance is defined, but not _this_address *) @@ -164,4 +167,18 @@ transition AssignTest() k1 = Uint128 1; k2 = Uint128 42; assign_test_10[k1][k2] := x -end \ No newline at end of file +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 7e553501b..140d4b2c8 100644 --- a/tests/runner/Testcontracts.ml +++ b/tests/runner/Testcontracts.ml @@ -375,7 +375,7 @@ let contract_tests env = "remote_state_reads" >: build_contract_init_test env succ_code "remote_state_reads" "init" ~is_library:false ~ipc_mode:true; "remote_state_reads" - >::: build_contract_tests env "remote_state_reads" succ_code 1 8 + >::: build_contract_tests env "remote_state_reads" succ_code 1 9 []; "remote_state_reads" >: build_contract_init_test env succ_code "remote_state_reads" "init_assignable_map_types" ~is_library:false ~ipc_mode:true; @@ -430,7 +430,7 @@ let contract_tests env = "remote_state_reads" >: build_contract_init_test env fail_code "remote_state_reads" "init_wrong_map_type" ~is_library:false ~ipc_mode:true; "remote_state_reads" - >::: build_contract_tests env "remote_state_reads" fail_code 101 126 + >::: build_contract_tests env "remote_state_reads" fail_code 101 127 []; ]; "misc_tests" >::: build_misc_tests env; diff --git a/tests/runner/auction/state_1.json b/tests/runner/auction/state_1.json index a16ac5493..be6b92de3 100644 --- a/tests/runner/auction/state_1.json +++ b/tests/runner/auction/state_1.json @@ -19,5 +19,17 @@ "vname": "pendingReturns", "type": "Map (ByStr20) (Uint128)", "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678ab", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } -] \ No newline at end of file +] diff --git a/tests/runner/auction/state_2.json b/tests/runner/auction/state_2.json index de4e9ad77..1d614fbd2 100644 --- a/tests/runner/auction/state_2.json +++ b/tests/runner/auction/state_2.json @@ -19,5 +19,17 @@ "vname": "pendingReturns", "type": "Map (ByStr20) (Uint128)", "value": [] - } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678ab", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] + } ] diff --git a/tests/runner/auction/state_3.json b/tests/runner/auction/state_3.json index f6f2ec808..69cc7944a 100644 --- a/tests/runner/auction/state_3.json +++ b/tests/runner/auction/state_3.json @@ -21,5 +21,17 @@ "vname": "ended", "type": "Bool", "value": { "constructor": "False", "argtypes": [], "arguments": [] } - } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678cd", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] + } ] diff --git a/tests/runner/auction/state_4.json b/tests/runner/auction/state_4.json index f6f2ec808..6bf19c078 100644 --- a/tests/runner/auction/state_4.json +++ b/tests/runner/auction/state_4.json @@ -21,5 +21,17 @@ "vname": "ended", "type": "Bool", "value": { "constructor": "False", "argtypes": [], "arguments": [] } - } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678cd", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "542" } + ] + } + ] + } ] diff --git a/tests/runner/auction/state_5.json b/tests/runner/auction/state_5.json index a16ac5493..1be085cc1 100644 --- a/tests/runner/auction/state_5.json +++ b/tests/runner/auction/state_5.json @@ -19,5 +19,17 @@ "vname": "pendingReturns", "type": "Map (ByStr20) (Uint128)", "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678cd", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "642" } + ] + } + ] } -] \ No newline at end of file +] diff --git a/tests/runner/cfinvoke/state_1.json b/tests/runner/cfinvoke/state_1.json index 6ff9df501..0f1496945 100644 --- a/tests/runner/cfinvoke/state_1.json +++ b/tests/runner/cfinvoke/state_1.json @@ -3,5 +3,17 @@ "vname": "_balance", "type": "Uint128", "value": "0" - } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678ab", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] + } ] diff --git a/tests/runner/cfinvoke/state_4.json b/tests/runner/cfinvoke/state_4.json index 6ff9df501..85dcaf7e3 100644 --- a/tests/runner/cfinvoke/state_4.json +++ b/tests/runner/cfinvoke/state_4.json @@ -3,5 +3,17 @@ "vname": "_balance", "type": "Uint128", "value": "0" - } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x8992d4dfafd282e8a8b3c776eb9fc907d321e21a", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] + } ] diff --git a/tests/runner/crowdfunding/state_1.json b/tests/runner/crowdfunding/state_1.json index ab5060988..93f8134a7 100644 --- a/tests/runner/crowdfunding/state_1.json +++ b/tests/runner/crowdfunding/state_1.json @@ -9,5 +9,17 @@ "vname": "_balance", "type": "Uint128", "value": "0" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678ab", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "142" } + ] + } + ] } ] diff --git a/tests/runner/crowdfunding/state_2.json b/tests/runner/crowdfunding/state_2.json index 8b94e9f3c..e3d8c0674 100644 --- a/tests/runner/crowdfunding/state_2.json +++ b/tests/runner/crowdfunding/state_2.json @@ -11,5 +11,17 @@ "vname": "funded", "type": "Bool", "value": { "constructor": "False", "argtypes": [], "arguments": [] } - } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678cd", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] + } ] diff --git a/tests/runner/crowdfunding/state_3.json b/tests/runner/crowdfunding/state_3.json index da022779c..642f6132d 100644 --- a/tests/runner/crowdfunding/state_3.json +++ b/tests/runner/crowdfunding/state_3.json @@ -16,5 +16,17 @@ "vname": "_balance", "type": "Uint128", "value": "300" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678cd", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } ] diff --git a/tests/runner/crowdfunding/state_6.json b/tests/runner/crowdfunding/state_6.json index 4094b0b39..3ab74f6d9 100644 --- a/tests/runner/crowdfunding/state_6.json +++ b/tests/runner/crowdfunding/state_6.json @@ -15,5 +15,17 @@ "vname": "_balance", "type": "Uint128", "value": "100" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678cd", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } ] diff --git a/tests/runner/crowdfunding_proc/state_1.json b/tests/runner/crowdfunding_proc/state_1.json index ab5060988..abdf0542a 100644 --- a/tests/runner/crowdfunding_proc/state_1.json +++ b/tests/runner/crowdfunding_proc/state_1.json @@ -9,5 +9,17 @@ "vname": "_balance", "type": "Uint128", "value": "0" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678ab", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } ] diff --git a/tests/runner/crowdfunding_proc/state_2.json b/tests/runner/crowdfunding_proc/state_2.json index 8b94e9f3c..e3d8c0674 100644 --- a/tests/runner/crowdfunding_proc/state_2.json +++ b/tests/runner/crowdfunding_proc/state_2.json @@ -11,5 +11,17 @@ "vname": "funded", "type": "Bool", "value": { "constructor": "False", "argtypes": [], "arguments": [] } - } + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678cd", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] + } ] diff --git a/tests/runner/crowdfunding_proc/state_3.json b/tests/runner/crowdfunding_proc/state_3.json index da022779c..642f6132d 100644 --- a/tests/runner/crowdfunding_proc/state_3.json +++ b/tests/runner/crowdfunding_proc/state_3.json @@ -16,5 +16,17 @@ "vname": "_balance", "type": "Uint128", "value": "300" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678cd", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } ] diff --git a/tests/runner/crowdfunding_proc/state_6.json b/tests/runner/crowdfunding_proc/state_6.json index 4094b0b39..3ab74f6d9 100644 --- a/tests/runner/crowdfunding_proc/state_6.json +++ b/tests/runner/crowdfunding_proc/state_6.json @@ -15,5 +15,17 @@ "vname": "_balance", "type": "Uint128", "value": "100" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x12345678901234567890123456789012345678cd", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } ] diff --git a/tests/runner/earmarked-coin/state_1.json b/tests/runner/earmarked-coin/state_1.json index 2d1a468ef..4b2e0ee70 100644 --- a/tests/runner/earmarked-coin/state_1.json +++ b/tests/runner/earmarked-coin/state_1.json @@ -5,5 +5,17 @@ "type": "Map (ByStr20) (0xcccccccccccccccccccccccccccccccccccccccc.EarmarkedCoin)", "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } -] \ No newline at end of file +] diff --git a/tests/runner/remote_state_reads/blockchain_127.json b/tests/runner/remote_state_reads/blockchain_127.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads/blockchain_127.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] diff --git a/tests/runner/remote_state_reads/blockchain_9.json b/tests/runner/remote_state_reads/blockchain_9.json new file mode 100644 index 000000000..d962cce79 --- /dev/null +++ b/tests/runner/remote_state_reads/blockchain_9.json @@ -0,0 +1 @@ +[ { "vname": "BLOCKNUMBER", "type": "BNum", "value": "100" } ] 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 2e2675187..3edbe75a5 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,6 +1,6 @@ { "scilla_major_version": "0", - "gas_remaining": "56665", + "gas_remaining": "56123", "_accepted": "false", "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], diff --git a/tests/runner/remote_state_reads/init_ipc_output.json b/tests/runner/remote_state_reads/init_ipc_output.json index 2e2675187..3edbe75a5 100644 --- a/tests/runner/remote_state_reads/init_ipc_output.json +++ b/tests/runner/remote_state_reads/init_ipc_output.json @@ -1,6 +1,6 @@ { "scilla_major_version": "0", - "gas_remaining": "56665", + "gas_remaining": "56123", "_accepted": "false", "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], 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 3e9237df1..fde9f149b 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": "7087", + "gas_remaining": "7020", "errors": [ { "error_message": 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 3e9237df1..fde9f149b 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": "7087", + "gas_remaining": "7020", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/init_output.json b/tests/runner/remote_state_reads/init_output.json index 2e2675187..3edbe75a5 100644 --- a/tests/runner/remote_state_reads/init_output.json +++ b/tests/runner/remote_state_reads/init_output.json @@ -1,6 +1,6 @@ { "scilla_major_version": "0", - "gas_remaining": "56665", + "gas_remaining": "56123", "_accepted": "false", "messages": null, "states": [ { "vname": "_balance", "type": "Uint128", "value": "0" } ], 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 badb498ba..d19c9f45d 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": "7087", + "gas_remaining": "7020", "errors": [ { "error_message": 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 badb498ba..d19c9f45d 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": "7087", + "gas_remaining": "7020", "errors": [ { "error_message": 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 badb498ba..d19c9f45d 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": "7087", + "gas_remaining": "7020", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/message_127.json b/tests/runner/remote_state_reads/message_127.json new file mode 100644 index 000000000..2986ce244 --- /dev/null +++ b/tests/runner/remote_state_reads/message_127.json @@ -0,0 +1,7 @@ +{ + "_tag": "SenderBalanceTest", + "_amount": "100", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads/message_9.json b/tests/runner/remote_state_reads/message_9.json new file mode 100644 index 000000000..2986ce244 --- /dev/null +++ b/tests/runner/remote_state_reads/message_9.json @@ -0,0 +1,7 @@ +{ + "_tag": "SenderBalanceTest", + "_amount": "100", + "_sender": "0xabfeccdc9012345678901234567890f777564322", + "params": [], + "_origin": "0xabfeccdc9012345678901234567890f777564322" +} diff --git a/tests/runner/remote_state_reads/output_1.json b/tests/runner/remote_state_reads/output_1.json index 57e3409de..20a261a52 100644 --- a/tests/runner/remote_state_reads/output_1.json +++ b/tests/runner/remote_state_reads/output_1.json @@ -178,7 +178,10 @@ "vname": "remote_reads_test_res_3_2", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777567890" - } + }, + { "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/output_101.json b/tests/runner/remote_state_reads/output_101.json index c15b57a52..d21a002f0 100644 --- a/tests/runner/remote_state_reads/output_101.json +++ b/tests/runner/remote_state_reads/output_101.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7913", + "gas_remaining": "7912", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/output_102.json b/tests/runner/remote_state_reads/output_102.json index 9d75637f1..1ff86874c 100644 --- a/tests/runner/remote_state_reads/output_102.json +++ b/tests/runner/remote_state_reads/output_102.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7913", + "gas_remaining": "7912", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/output_103.json b/tests/runner/remote_state_reads/output_103.json index 9d75637f1..1ff86874c 100644 --- a/tests/runner/remote_state_reads/output_103.json +++ b/tests/runner/remote_state_reads/output_103.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7913", + "gas_remaining": "7912", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/output_104.json b/tests/runner/remote_state_reads/output_104.json index 9d75637f1..1ff86874c 100644 --- a/tests/runner/remote_state_reads/output_104.json +++ b/tests/runner/remote_state_reads/output_104.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7913", + "gas_remaining": "7912", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/output_105.json b/tests/runner/remote_state_reads/output_105.json index 9d75637f1..1ff86874c 100644 --- a/tests/runner/remote_state_reads/output_105.json +++ b/tests/runner/remote_state_reads/output_105.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7913", + "gas_remaining": "7912", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/output_106.json b/tests/runner/remote_state_reads/output_106.json index 9d75637f1..1ff86874c 100644 --- a/tests/runner/remote_state_reads/output_106.json +++ b/tests/runner/remote_state_reads/output_106.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7913", + "gas_remaining": "7912", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/output_107.json b/tests/runner/remote_state_reads/output_107.json index 9d75637f1..1ff86874c 100644 --- a/tests/runner/remote_state_reads/output_107.json +++ b/tests/runner/remote_state_reads/output_107.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7913", + "gas_remaining": "7912", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/output_108.json b/tests/runner/remote_state_reads/output_108.json index 9d75637f1..1ff86874c 100644 --- a/tests/runner/remote_state_reads/output_108.json +++ b/tests/runner/remote_state_reads/output_108.json @@ -1,5 +1,5 @@ { - "gas_remaining": "7913", + "gas_remaining": "7912", "errors": [ { "error_message": diff --git a/tests/runner/remote_state_reads/output_126.json b/tests/runner/remote_state_reads/output_126.json index 1ad2aad8f..d5602454c 100644 --- a/tests/runner/remote_state_reads/output_126.json +++ b/tests/runner/remote_state_reads/output_126.json @@ -6,7 +6,7 @@ "Exception thrown: (Message [(_exception : (String \"TestException\")) ; (value : (ByStr20 0x1234567890123456789012345678901234567890))])", "start_location": { "file": "tests/contracts/remote_state_reads.scilla", - "line": 149, + "line": 152, "column": 3 }, "end_location": { "file": "", "line": 0, "column": 0 } @@ -15,7 +15,7 @@ "error_message": "Raised from ExceptionTest", "start_location": { "file": "tests/contracts/remote_state_reads.scilla", - "line": 146, + "line": 149, "column": 12 }, "end_location": { "file": "", "line": 0, "column": 0 } diff --git a/tests/runner/remote_state_reads/output_127.json b/tests/runner/remote_state_reads/output_127.json new file mode 100644 index 000000000..070956e30 --- /dev/null +++ b/tests/runner/remote_state_reads/output_127.json @@ -0,0 +1,11 @@ +{ + "gas_remaining": "7965", + "errors": [ + { + "error_message": "Insufficient sender balance for acceptance.", + "start_location": { "file": "", "line": 0, "column": 0 }, + "end_location": { "file": "", "line": 0, "column": 0 } + } + ], + "warnings": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/output_2.json b/tests/runner/remote_state_reads/output_2.json index 57e3409de..20a261a52 100644 --- a/tests/runner/remote_state_reads/output_2.json +++ b/tests/runner/remote_state_reads/output_2.json @@ -178,7 +178,10 @@ "vname": "remote_reads_test_res_3_2", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777567890" - } + }, + { "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/output_3.json b/tests/runner/remote_state_reads/output_3.json index 57e3409de..20a261a52 100644 --- a/tests/runner/remote_state_reads/output_3.json +++ b/tests/runner/remote_state_reads/output_3.json @@ -178,7 +178,10 @@ "vname": "remote_reads_test_res_3_2", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777567890" - } + }, + { "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/output_4.json b/tests/runner/remote_state_reads/output_4.json index 57e3409de..20a261a52 100644 --- a/tests/runner/remote_state_reads/output_4.json +++ b/tests/runner/remote_state_reads/output_4.json @@ -178,7 +178,10 @@ "vname": "remote_reads_test_res_3_2", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777567890" - } + }, + { "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/output_5.json b/tests/runner/remote_state_reads/output_5.json index 57e3409de..20a261a52 100644 --- a/tests/runner/remote_state_reads/output_5.json +++ b/tests/runner/remote_state_reads/output_5.json @@ -178,7 +178,10 @@ "vname": "remote_reads_test_res_3_2", "type": "ByStr20", "value": "0xabfeccdc9012345678901234567890f777567890" - } + }, + { "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/output_6.json b/tests/runner/remote_state_reads/output_6.json index 2631ffb1b..99010b510 100644 --- a/tests/runner/remote_state_reads/output_6.json +++ b/tests/runner/remote_state_reads/output_6.json @@ -136,7 +136,10 @@ { "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/output_7.json b/tests/runner/remote_state_reads/output_7.json index fed6a8f2d..c0d4e08d2 100644 --- a/tests/runner/remote_state_reads/output_7.json +++ b/tests/runner/remote_state_reads/output_7.json @@ -1,6 +1,6 @@ { "scilla_major_version": "0", - "gas_remaining": "7930", + "gas_remaining": "7929", "_accepted": "false", "messages": [ { @@ -149,7 +149,10 @@ { "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": [ { diff --git a/tests/runner/remote_state_reads/output_8.json b/tests/runner/remote_state_reads/output_8.json index 377276a4c..953fab7f3 100644 --- a/tests/runner/remote_state_reads/output_8.json +++ b/tests/runner/remote_state_reads/output_8.json @@ -172,7 +172,10 @@ { "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/output_9.json b/tests/runner/remote_state_reads/output_9.json new file mode 100644 index 000000000..b0bce2932 --- /dev/null +++ b/tests/runner/remote_state_reads/output_9.json @@ -0,0 +1,145 @@ +{ + "scilla_major_version": "0", + "gas_remaining": "7957", + "_accepted": "true", + "messages": [], + "states": [ + { "vname": "_balance", "type": "Uint128", "value": "100" }, + { "vname": "sender_balance_post", "type": "Uint128", "value": "100" }, + { "vname": "sender_balance_mid", "type": "Uint128", "value": "100" }, + { "vname": "sender_balance_pre", "type": "Uint128", "value": "200" }, + { + "vname": "assign_test_1", + "type": "ByStr20 with end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_2", + "type": "ByStr20 with transactionCount : Uint32 end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_3", + "type": "ByStr20 with admin : ByStr20 with end end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_4", + "type": "ByStr20 with admin : ByStr20 end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_5", + "type": "ByStr20 with owners : Map (ByStr20) (Bool) end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_6", + "type": + "ByStr20 with signatures : Map (Uint32) (Map (ByStr20) (Bool)) end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_7", + "type": "ByStr20 with other_map : Map (Uint128) (ByStr20) end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_8", + "type": "0xabfeccdc9012345678901234567890f777564321.AddressADT", + "value": { + "constructor": "0xabfeccdc9012345678901234567890f777564321.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "assign_test_9", + "type": "List (0xabfeccdc9012345678901234567890f777564321.AddressADT)", + "value": [] + }, + { + "vname": "assign_test_10", + "type": + "Map (Uint128) (Map (Uint128) (0xabfeccdc9012345678901234567890f777564321.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_2_2", + "type": "ByStr20", + "value": "0xabfeccdc9012345678901234567890f777567890" + }, + { "vname": "remote_reads_test_res_3_1", "type": "Uint128", "value": "0" }, + { + "vname": "remote_reads_test_res_3_2", + "type": "ByStr20", + "value": "0xabfeccdc9012345678901234567890f777567890" + }, + { "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": [] } + ] + } + } + ], + "events": [] +} \ No newline at end of file diff --git a/tests/runner/remote_state_reads/state_1.json b/tests/runner/remote_state_reads/state_1.json index 18575944e..c0fda23c1 100644 --- a/tests/runner/remote_state_reads/state_1.json +++ b/tests/runner/remote_state_reads/state_1.json @@ -136,6 +136,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_100.json b/tests/runner/remote_state_reads/state_100.json index a428b65d5..02d6b830e 100644 --- a/tests/runner/remote_state_reads/state_100.json +++ b/tests/runner/remote_state_reads/state_100.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_101.json b/tests/runner/remote_state_reads/state_101.json index 807365009..af8b9ec8b 100644 --- a/tests/runner/remote_state_reads/state_101.json +++ b/tests/runner/remote_state_reads/state_101.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_102.json b/tests/runner/remote_state_reads/state_102.json index 453212f6c..320eef525 100644 --- a/tests/runner/remote_state_reads/state_102.json +++ b/tests/runner/remote_state_reads/state_102.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_103.json b/tests/runner/remote_state_reads/state_103.json index c61565974..074e9438d 100644 --- a/tests/runner/remote_state_reads/state_103.json +++ b/tests/runner/remote_state_reads/state_103.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_104.json b/tests/runner/remote_state_reads/state_104.json index 4a966facd..de341b321 100644 --- a/tests/runner/remote_state_reads/state_104.json +++ b/tests/runner/remote_state_reads/state_104.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_105.json b/tests/runner/remote_state_reads/state_105.json index 1ffc5210e..0c80f9e00 100644 --- a/tests/runner/remote_state_reads/state_105.json +++ b/tests/runner/remote_state_reads/state_105.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_106.json b/tests/runner/remote_state_reads/state_106.json index 1700d4bd3..4edaecb50 100644 --- a/tests/runner/remote_state_reads/state_106.json +++ b/tests/runner/remote_state_reads/state_106.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_107.json b/tests/runner/remote_state_reads/state_107.json index 4eaba14e4..cfacb1096 100644 --- a/tests/runner/remote_state_reads/state_107.json +++ b/tests/runner/remote_state_reads/state_107.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_108.json b/tests/runner/remote_state_reads/state_108.json index 47dda482c..cdb7ac908 100644 --- a/tests/runner/remote_state_reads/state_108.json +++ b/tests/runner/remote_state_reads/state_108.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_109.json b/tests/runner/remote_state_reads/state_109.json index 89fb2769d..3d10cbff5 100644 --- a/tests/runner/remote_state_reads/state_109.json +++ b/tests/runner/remote_state_reads/state_109.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_110.json b/tests/runner/remote_state_reads/state_110.json index 556393d61..713cce405 100644 --- a/tests/runner/remote_state_reads/state_110.json +++ b/tests/runner/remote_state_reads/state_110.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_111.json b/tests/runner/remote_state_reads/state_111.json index 746d09441..c1cf62460 100644 --- a/tests/runner/remote_state_reads/state_111.json +++ b/tests/runner/remote_state_reads/state_111.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_112.json b/tests/runner/remote_state_reads/state_112.json index 89fb2769d..3d10cbff5 100644 --- a/tests/runner/remote_state_reads/state_112.json +++ b/tests/runner/remote_state_reads/state_112.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_113.json b/tests/runner/remote_state_reads/state_113.json index 89fb2769d..3d10cbff5 100644 --- a/tests/runner/remote_state_reads/state_113.json +++ b/tests/runner/remote_state_reads/state_113.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_114.json b/tests/runner/remote_state_reads/state_114.json index 89fb2769d..3d10cbff5 100644 --- a/tests/runner/remote_state_reads/state_114.json +++ b/tests/runner/remote_state_reads/state_114.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_115.json b/tests/runner/remote_state_reads/state_115.json index f78e8e5fc..da80bbda8 100644 --- a/tests/runner/remote_state_reads/state_115.json +++ b/tests/runner/remote_state_reads/state_115.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_116.json b/tests/runner/remote_state_reads/state_116.json index be0cadb6c..a3f3ccd9b 100644 --- a/tests/runner/remote_state_reads/state_116.json +++ b/tests/runner/remote_state_reads/state_116.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_117.json b/tests/runner/remote_state_reads/state_117.json index 89fb2769d..3d10cbff5 100644 --- a/tests/runner/remote_state_reads/state_117.json +++ b/tests/runner/remote_state_reads/state_117.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_118.json b/tests/runner/remote_state_reads/state_118.json index 21469055e..314f28b0a 100644 --- a/tests/runner/remote_state_reads/state_118.json +++ b/tests/runner/remote_state_reads/state_118.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_119.json b/tests/runner/remote_state_reads/state_119.json index 8dd3beaa4..28fd2f2c7 100644 --- a/tests/runner/remote_state_reads/state_119.json +++ b/tests/runner/remote_state_reads/state_119.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_120.json b/tests/runner/remote_state_reads/state_120.json index bbdf90a4c..be8b93bb3 100644 --- a/tests/runner/remote_state_reads/state_120.json +++ b/tests/runner/remote_state_reads/state_120.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_121.json b/tests/runner/remote_state_reads/state_121.json index 89fb2769d..3d10cbff5 100644 --- a/tests/runner/remote_state_reads/state_121.json +++ b/tests/runner/remote_state_reads/state_121.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_122.json b/tests/runner/remote_state_reads/state_122.json index 89fb2769d..3d10cbff5 100644 --- a/tests/runner/remote_state_reads/state_122.json +++ b/tests/runner/remote_state_reads/state_122.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_123.json b/tests/runner/remote_state_reads/state_123.json index 7b69c84c1..f5c52ccb5 100644 --- a/tests/runner/remote_state_reads/state_123.json +++ b/tests/runner/remote_state_reads/state_123.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_124.json b/tests/runner/remote_state_reads/state_124.json index de3743ba4..826709272 100644 --- a/tests/runner/remote_state_reads/state_124.json +++ b/tests/runner/remote_state_reads/state_124.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_125.json b/tests/runner/remote_state_reads/state_125.json index 8d457ee1b..e91466d0f 100644 --- a/tests/runner/remote_state_reads/state_125.json +++ b/tests/runner/remote_state_reads/state_125.json @@ -100,6 +100,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_126.json b/tests/runner/remote_state_reads/state_126.json index 27a3e7287..8cdffe404 100644 --- a/tests/runner/remote_state_reads/state_126.json +++ b/tests/runner/remote_state_reads/state_126.json @@ -116,6 +116,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_127.json b/tests/runner/remote_state_reads/state_127.json new file mode 100644 index 000000000..32edad29e --- /dev/null +++ b/tests/runner/remote_state_reads/state_127.json @@ -0,0 +1,134 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "assign_test_1", + "type": "ByStr20 with end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_2", + "type": "ByStr20 with transactionCount : Uint32 end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_3", + "type": "ByStr20 with admin : ByStr20 with end end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_4", + "type": "ByStr20 with admin : ByStr20 end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_5", + "type": "ByStr20 with owners : Map (ByStr20) (Bool) end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_6", + "type": + "ByStr20 with signatures : Map (Uint32) (Map (ByStr20) (Bool)) end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_7", + "type": "ByStr20 with other_map : Map (Uint128) (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_2_2", + "type": "ByStr20", + "value": "0xabfeccdc9012345678901234567890f777567890" + }, + { + "vname": "remote_reads_test_res_3_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "ByStr20", + "value": "0xabfeccdc9012345678901234567890f777567890" + }, + { + "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": "0xabfeccdc9012345678901234567890f777564322", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "50" } + ] + } + ] + } +] diff --git a/tests/runner/remote_state_reads/state_2.json b/tests/runner/remote_state_reads/state_2.json index bf58a3cf7..b03fb70e6 100644 --- a/tests/runner/remote_state_reads/state_2.json +++ b/tests/runner/remote_state_reads/state_2.json @@ -136,6 +136,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_3.json b/tests/runner/remote_state_reads/state_3.json index 88a5c6711..6d2b9dbc6 100644 --- a/tests/runner/remote_state_reads/state_3.json +++ b/tests/runner/remote_state_reads/state_3.json @@ -136,6 +136,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_4.json b/tests/runner/remote_state_reads/state_4.json index 8ea5eceee..99a0d3c85 100644 --- a/tests/runner/remote_state_reads/state_4.json +++ b/tests/runner/remote_state_reads/state_4.json @@ -136,6 +136,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_5.json b/tests/runner/remote_state_reads/state_5.json index 8ea5eceee..99a0d3c85 100644 --- a/tests/runner/remote_state_reads/state_5.json +++ b/tests/runner/remote_state_reads/state_5.json @@ -136,6 +136,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_6.json b/tests/runner/remote_state_reads/state_6.json index 668f61b88..607d59cb3 100644 --- a/tests/runner/remote_state_reads/state_6.json +++ b/tests/runner/remote_state_reads/state_6.json @@ -136,6 +136,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_7.json b/tests/runner/remote_state_reads/state_7.json index 668f61b88..607d59cb3 100644 --- a/tests/runner/remote_state_reads/state_7.json +++ b/tests/runner/remote_state_reads/state_7.json @@ -136,6 +136,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_8.json b/tests/runner/remote_state_reads/state_8.json index 668f61b88..607d59cb3 100644 --- a/tests/runner/remote_state_reads/state_8.json +++ b/tests/runner/remote_state_reads/state_8.json @@ -136,6 +136,9 @@ "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", diff --git a/tests/runner/remote_state_reads/state_9.json b/tests/runner/remote_state_reads/state_9.json new file mode 100644 index 000000000..3f5b7caba --- /dev/null +++ b/tests/runner/remote_state_reads/state_9.json @@ -0,0 +1,154 @@ +[ + { "vname": "_balance", "type": "Uint128", "value": "0" }, + { + "vname": "assign_test_1", + "type": "ByStr20 with end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_2", + "type": "ByStr20 with transactionCount : Uint32 end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_3", + "type": "ByStr20 with admin : ByStr20 with end end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_4", + "type": "ByStr20 with admin : ByStr20 end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_5", + "type": "ByStr20 with owners : Map (ByStr20) (Bool) end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_6", + "type": + "ByStr20 with signatures : Map (Uint32) (Map (ByStr20) (Bool)) end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_7", + "type": "ByStr20 with other_map : Map (Uint128) (ByStr20) end", + "value": "0x1234567890123456789012345678901234567890" + }, + { + "vname": "assign_test_8", + "type": "0xabfeccdc9012345678901234567890f777564321.AddressADT", + "value": { + "constructor": "0xabfeccdc9012345678901234567890f777564321.Address1", + "argtypes": [], + "arguments": [ "0x1234567890123456789012345678901234567890" ] + } + }, + { + "vname": "assign_test_9", + "type": "List (0xabfeccdc9012345678901234567890f777564321.AddressADT)", + "value": [] + }, + { + "vname": "assign_test_10", + "type": + "Map (Uint128) (Map (Uint128) (0xabfeccdc9012345678901234567890f777564321.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_2_2", + "type": "ByStr20", + "value": "0xabfeccdc9012345678901234567890f777567890" + }, + { + "vname": "remote_reads_test_res_3_1", + "type": "Uint128", + "value": "0" + }, + { + "vname": "remote_reads_test_res_3_2", + "type": "ByStr20", + "value": "0xabfeccdc9012345678901234567890f777567890" + }, + { + "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": "0xabfeccdc9012345678901234567890f777564322", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "200" } + ] + } + ] + } +] diff --git a/tests/runner/salarybot/state_0.json b/tests/runner/salarybot/state_0.json index 9b9504bbe..da09b8a0e 100644 --- a/tests/runner/salarybot/state_0.json +++ b/tests/runner/salarybot/state_0.json @@ -8,5 +8,17 @@ "vname": "_balance", "type": "Uint128", "value": "0" + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678901234567890", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "100000242" } + ] + } + ] } ] diff --git a/tests/runner/wallet/state_1.json b/tests/runner/wallet/state_1.json index 77cda07f0..fde9abdcf 100644 --- a/tests/runner/wallet/state_1.json +++ b/tests/runner/wallet/state_1.json @@ -27,5 +27,17 @@ "vname": "owner_signatures", "type": "Map (ByStr20) (Map (ByStr20) (Bool))", "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678906784567890", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } -] \ No newline at end of file +] diff --git a/tests/runner/wallet/state_6.json b/tests/runner/wallet/state_6.json index e908e215c..37041c6d1 100644 --- a/tests/runner/wallet/state_6.json +++ b/tests/runner/wallet/state_6.json @@ -44,5 +44,17 @@ "vname": "owner_signatures", "type": "Map (ByStr20) (Map (ByStr20) (Bool))", "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678906784567890", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } -] \ No newline at end of file +] diff --git a/tests/runner/wallet_2/state_1.json b/tests/runner/wallet_2/state_1.json index 37733453a..133afd24e 100644 --- a/tests/runner/wallet_2/state_1.json +++ b/tests/runner/wallet_2/state_1.json @@ -34,5 +34,17 @@ "type": "Map (Uint32) (0xabfeccdc9012345678901234567890f777567890.Transaction)", "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678906784567890", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } -] \ No newline at end of file +] diff --git a/tests/runner/wallet_2/state_2.json b/tests/runner/wallet_2/state_2.json index c29fe2b13..d0204c548 100644 --- a/tests/runner/wallet_2/state_2.json +++ b/tests/runner/wallet_2/state_2.json @@ -34,5 +34,17 @@ "type": "Map (Uint32) (0xabfeccdc9012345678901234567890f777567890.Transaction)", "value": [] + }, + { + "vname": "_external", + "type": "Unit", + "value": [ + { + "address": "0x1234567890123456789012345678906000000000", + "state": [ + { "vname": "_balance", "type": "Uint128", "value": "242" } + ] + } + ] } -] \ No newline at end of file +]