diff --git a/crates/blockifier/src/execution/stack_trace_regression/test_stack_trace_cairo0.txt b/crates/blockifier/src/execution/stack_trace_regression/test_stack_trace_cairo0.txt index 2df20914c14..4fa73a8cb56 100644 --- a/crates/blockifier/src/execution/stack_trace_regression/test_stack_trace_cairo0.txt +++ b/crates/blockifier/src/execution/stack_trace_regression/test_stack_trace_cairo0.txt @@ -8,13 +8,13 @@ Unknown location (pc=0:125) 1: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x027c3334165536f239cfd400ed956eabff55fc60de4fb56728b6a4f6b87db01c): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1063) -Unknown location (pc=0:1046) +Unknown location (pc=0:1310) +Unknown location (pc=0:1293) 2: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070001, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x032564d7e0fe091d49b4c20f4632191e4ed6986bf993849879abfef9465def25): Error message: You shall not pass! -Error at pc=0:1678: +Error at pc=0:1925: Cairo traceback (most recent call last): -Unknown location (pc=0:1682) +Unknown location (pc=0:1929) An ASSERT_EQ instruction failed: 1 != 0. diff --git a/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_fail_call.txt b/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_fail_call.txt index 8ed64c68d78..58f4c78711e 100644 --- a/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_fail_call.txt +++ b/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_fail_call.txt @@ -8,19 +8,19 @@ Unknown location (pc=0:125) 1: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1587) +Unknown location (pc=0:1907) +Unknown location (pc=0:1834) 2: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1587) +Unknown location (pc=0:1907) +Unknown location (pc=0:1834) 3: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x032564d7e0fe091d49b4c20f4632191e4ed6986bf993849879abfef9465def25): Error message: You shall not pass! -Error at pc=0:1678: +Error at pc=0:1925: Cairo traceback (most recent call last): -Unknown location (pc=0:1682) +Unknown location (pc=0:1929) An ASSERT_EQ instruction failed: 1 != 0. diff --git a/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_fail_library_call.txt b/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_fail_library_call.txt index f3558ac5095..6b4eeb16501 100644 --- a/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_fail_library_call.txt +++ b/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_fail_library_call.txt @@ -8,19 +8,19 @@ Unknown location (pc=0:125) 1: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1587) +Unknown location (pc=0:1907) +Unknown location (pc=0:1834) 2: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:49: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1605) +Unknown location (pc=0:1907) +Unknown location (pc=0:1852) 3: Error in a library call (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x032564d7e0fe091d49b4c20f4632191e4ed6986bf993849879abfef9465def25): Error message: You shall not pass! -Error at pc=0:1678: +Error at pc=0:1925: Cairo traceback (most recent call last): -Unknown location (pc=0:1682) +Unknown location (pc=0:1929) An ASSERT_EQ instruction failed: 1 != 0. diff --git a/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_invoke_call_chain_call.txt b/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_invoke_call_chain_call.txt index 0bd856a26a8..cdb2315060f 100644 --- a/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_invoke_call_chain_call.txt +++ b/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_invoke_call_chain_call.txt @@ -8,18 +8,18 @@ Unknown location (pc=0:125) 1: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1587) +Unknown location (pc=0:1907) +Unknown location (pc=0:1834) 2: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1587) +Unknown location (pc=0:1907) +Unknown location (pc=0:1834) 3: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): -Error at pc=0:1575: +Error at pc=0:1822: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) +Unknown location (pc=0:1907) Couldn't compute operand op0. Unknown value for memory cell 1:23 diff --git a/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_invoke_call_chain_library_call.txt b/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_invoke_call_chain_library_call.txt index 79d10129103..2d75ec9bdf5 100644 --- a/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_invoke_call_chain_library_call.txt +++ b/crates/blockifier/src/execution/stack_trace_regression/test_trace_call_chain_with_syscalls_cairo0_invoke_call_chain_library_call.txt @@ -8,18 +8,18 @@ Unknown location (pc=0:125) 1: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1587) +Unknown location (pc=0:1907) +Unknown location (pc=0:1834) 2: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:49: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1605) +Unknown location (pc=0:1907) +Unknown location (pc=0:1852) 3: Error in a library call (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): -Error at pc=0:1575: +Error at pc=0:1822: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) +Unknown location (pc=0:1907) Couldn't compute operand op0. Unknown value for memory cell 1:23 diff --git a/crates/blockifier/src/execution/stack_trace_regression/test_trace_callchain_ends_with_regular_call_cairo0_chain.txt b/crates/blockifier/src/execution/stack_trace_regression/test_trace_callchain_ends_with_regular_call_cairo0_chain.txt index 8e4f8054839..e772e738e4a 100644 --- a/crates/blockifier/src/execution/stack_trace_regression/test_trace_callchain_ends_with_regular_call_cairo0_chain.txt +++ b/crates/blockifier/src/execution/stack_trace_regression/test_trace_callchain_ends_with_regular_call_cairo0_chain.txt @@ -8,13 +8,13 @@ Unknown location (pc=0:125) 1: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1587) +Unknown location (pc=0:1907) +Unknown location (pc=0:1834) 2: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): -Error at pc=0:1575: +Error at pc=0:1822: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1621) +Unknown location (pc=0:1907) +Unknown location (pc=0:1868) Couldn't compute operand op0. Unknown value for memory cell 1:37 diff --git a/crates/blockifier/src/execution/stack_trace_regression/test_trace_callchain_ends_with_regular_call_cairo0_fail.txt b/crates/blockifier/src/execution/stack_trace_regression/test_trace_callchain_ends_with_regular_call_cairo0_fail.txt index f0246d1206c..aa33a0ef25b 100644 --- a/crates/blockifier/src/execution/stack_trace_regression/test_trace_callchain_ends_with_regular_call_cairo0_fail.txt +++ b/crates/blockifier/src/execution/stack_trace_regression/test_trace_callchain_ends_with_regular_call_cairo0_fail.txt @@ -8,14 +8,14 @@ Unknown location (pc=0:125) 1: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1587) +Unknown location (pc=0:1907) +Unknown location (pc=0:1834) 2: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x0062c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5): Error message: You shall not pass! -Error at pc=0:1678: +Error at pc=0:1925: Cairo traceback (most recent call last): -Unknown location (pc=0:1660) -Unknown location (pc=0:1629) +Unknown location (pc=0:1907) +Unknown location (pc=0:1876) An ASSERT_EQ instruction failed: 1 != 0. diff --git a/crates/blockifier/src/execution/stack_trace_regression/with_inner_error_msg.txt b/crates/blockifier/src/execution/stack_trace_regression/with_inner_error_msg.txt index 67f001da300..8a4d5863abb 100644 --- a/crates/blockifier/src/execution/stack_trace_regression/with_inner_error_msg.txt +++ b/crates/blockifier/src/execution/stack_trace_regression/with_inner_error_msg.txt @@ -8,14 +8,14 @@ Unknown location (pc=0:125) 1: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070000, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x03bf01fb7497d041938cb7b2954d8c4590006d26b3acd0f5aec1af45dc4f94b2): Error at pc=0:37: Cairo traceback (most recent call last): -Unknown location (pc=0:1210) +Unknown location (pc=0:1457) Error message: Be aware of failure ahead... -Unknown location (pc=0:1200) +Unknown location (pc=0:1447) 2: Error in the called contract (contract address: 0x0000000000000000000000000000000000000000000000000000000040070001, class hash: 0x0000000000000000000000000000000000000000000000000000000000070000, selector: 0x032564d7e0fe091d49b4c20f4632191e4ed6986bf993849879abfef9465def25): Error message: You shall not pass! -Error at pc=0:1678: +Error at pc=0:1925: Cairo traceback (most recent call last): -Unknown location (pc=0:1682) +Unknown location (pc=0:1929) An ASSERT_EQ instruction failed: 1 != 0. diff --git a/crates/blockifier_test_utils/resources/feature_contracts/cairo0/compiled/test_contract_compiled.json b/crates/blockifier_test_utils/resources/feature_contracts/cairo0/compiled/test_contract_compiled.json index a294d4c8018..24bef25973c 100644 --- a/crates/blockifier_test_utils/resources/feature_contracts/cairo0/compiled/test_contract_compiled.json +++ b/crates/blockifier_test_utils/resources/feature_contracts/cairo0/compiled/test_contract_compiled.json @@ -49,6 +49,23 @@ "outputs": [], "type": "function" }, + { + "inputs": [], + "name": "read_write_read", + "outputs": [], + "type": "function" + }, + { + "inputs": [], + "name": "test_builtins", + "outputs": [ + { + "name": "result", + "type": "felt" + } + ], + "type": "function" + }, { "inputs": [ { @@ -84,6 +101,44 @@ "outputs": [], "type": "l1_handler" }, + { + "inputs": [ + { + "name": "from_address", + "type": "felt" + }, + { + "name": "amount", + "type": "felt" + } + ], + "name": "deposit", + "outputs": [], + "type": "l1_handler" + }, + { + "inputs": [ + { + "name": "class_hash", + "type": "felt" + }, + { + "name": "selector", + "type": "felt" + }, + { + "name": "calldata_len", + "type": "felt" + }, + { + "name": "calldata", + "type": "felt*" + } + ], + "name": "test_library_call_l1_handler", + "outputs": [], + "type": "function" + }, { "inputs": [ { @@ -219,6 +274,17 @@ ], "type": "function" }, + { + "inputs": [ + { + "name": "class_hash", + "type": "felt" + } + ], + "name": "test_library_call_syntactic_sugar", + "outputs": [], + "type": "function" + }, { "inputs": [ { @@ -847,6 +913,28 @@ "outputs": [], "type": "function" }, + { + "inputs": [ + { + "name": "expected_address", + "type": "felt" + } + ], + "name": "test_get_caller_address", + "outputs": [], + "type": "function" + }, + { + "inputs": [ + { + "name": "expected_address", + "type": "felt" + } + ], + "name": "test_get_contract_address", + "outputs": [], + "type": "function" + }, { "inputs": [ { @@ -878,203 +966,231 @@ "entry_points_by_type": { "CONSTRUCTOR": [ { - "offset": 597, + "offset": 635, "selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194" } ], "EXTERNAL": [ { - "offset": 1732, + "offset": 1979, "selector": "0x1143aa89c8e3ebf8ed14df2a3606c1cd2dd513fac8040b0f8ab441f5c52fe4" }, { - "offset": 1774, + "offset": 2021, "selector": "0x600c98a299d72ef1e09a2e1503206fbc76081233172c65f7e2438ef0069d8d" }, { - "offset": 1648, + "offset": 1895, "selector": "0x62c83572d28cb834a3de3c1e94977a4191469a4a8c26d1d7bc55305e640ed5" }, { - "offset": 2288, + "offset": 2535, "selector": "0x679c22735055a10db4f275395763a3752a1e3a3043c192299ab6b574fba8d6" }, { - "offset": 2212, + "offset": 2459, "selector": "0x7772be8b80a8a33dc6c1f9a6ab820c02e537c73e859de67f288c70f92571bb" }, { - "offset": 1323, + "offset": 1570, "selector": "0x8692275a885fee8890c5eaa075cc627d4755e3a1c8a2f1d557f7f97743761a" }, { - "offset": 2428, + "offset": 2675, "selector": "0x8a2a3272a92492ded6c04f7c85df9c53134cef398564465f12af3c9c986d41" }, { - "offset": 743, + "offset": 939, "selector": "0xad451bd0dba3d8d97104e1bfc474f88605ccc7acbe1c846839a120fdf30d95" }, { - "offset": 1087, + "offset": 1334, "selector": "0xb0ee07785692bd1fcda9089aadef94621bfa2ac0e849504ca54f05a3689f8e" }, { - "offset": 2038, + "offset": 2830, + "selector": "0xbd7daa40535813d892224da817610f4c7e6fe8983abe588a4227586262d9d3" + }, + { + "offset": 710, + "selector": "0xc7f245f7912859718600f16c45270d61a498a65f59cdec58ce2ed45113a226" + }, + { + "offset": 2285, "selector": "0xd47144c49bce05b6de6bce9d5ff0cc8da9420f8945453e20ef779cbea13ad4" }, { - "offset": 1228, + "offset": 1191, + "selector": "0xd5e8843577a4b0aa2c4408c543dd466ece9a2611a140c26c004169cb123e43" + }, + { + "offset": 1475, "selector": "0xe7510edcf6e9f1b70f7bd1f488767b50f0363422f3c563160ab77adf62467b" }, { - "offset": 634, + "offset": 672, "selector": "0xe7def693d16806ca2a2f398d8de5951344663ba77f340ed7a958da731872fc" }, { - "offset": 915, + "offset": 2806, + "selector": "0xe8f69bd941db5b0bff2e416c63d46f067fcdfad558c528f9fd102ba368cb5f" + }, + { + "offset": 1111, "selector": "0x120c24672855cfe872cb35256ea85172417f2aada7a22c15908906dc5f3c69d" }, { - "offset": 2005, + "offset": 2252, "selector": "0x127a04cfe41aceb22fc022bce0c5c70f2d860a7c7c054681bd821cdc18e6dbc" }, { - "offset": 2535, + "offset": 2782, "selector": "0x12ead94ae9d3f9d2bdb6b847cf255f1f398193a1f88884a0ae8e18f24a037b6" }, { - "offset": 768, + "offset": 964, "selector": "0x137a07fa9c479e27114b8ae1fbf252f2065cf91a0d8615272e060a7ccf37309" }, { - "offset": 2588, + "offset": 2883, "selector": "0x14dae1999ae9ab799bc72def6dc6e90890cf8ac0d64525021b7e71d05cb13e8" }, { - "offset": 1896, + "offset": 2143, "selector": "0x167ac610845cc0ab1501b38169a7e50f1bf60602d3c2a961b30987454f97812" }, { - "offset": 1264, + "offset": 1511, "selector": "0x169f135eddda5ab51886052d777a57f2ea9c162d713691b5e04a6d4ed71d47f" }, { - "offset": 1388, + "offset": 1635, "selector": "0x19a35a6e95cb7a3318dbb244f20975a1cd8587cc6b5259f15f61d7beb7ee43b" }, { - "offset": 2329, + "offset": 2576, "selector": "0x1ae1a515cf2d214b29bdf63a79ee2d490efd4dd1acc99d383a8e549c3cecb5d" }, { - "offset": 2470, + "offset": 2717, "selector": "0x1b1343fe0f4a16bed5e5133b5ca9f03ab15976bb2df2b6d263ac3170b8b6a13" }, { - "offset": 1549, + "offset": 1796, "selector": "0x1b1a0649752af1b28b3dc29a1556eee781e4a4c3a1f7f53f90fa834de098c4d" }, { - "offset": 872, + "offset": 1068, "selector": "0x1b47f727a0668d8593c5bb115d5b53a470f29833fd4d598e748f68e65f4f003" }, { - "offset": 1975, + "offset": 2222, "selector": "0x1de4779362d5ca708d55fe1d4d499501b7f692730d2e01656e9180708985e07" }, { - "offset": 1440, + "offset": 755, + "selector": "0x1eaab699414d786ce9dbfd4e86815f66680647efd13f9334ac97148e4e30e82" + }, + { + "offset": 1687, "selector": "0x218f305395474a84a39307fa5297be118fe17bf65e27ac5e2de6617baa44c64" }, { - "offset": 2388, + "offset": 2635, "selector": "0x26813d396fdb198e9ead934e4f7a592a8b88a059e45ab0eb6ee53494e8d45b0" }, { - "offset": 1049, + "offset": 1296, "selector": "0x27c3334165536f239cfd400ed956eabff55fc60de4fb56728b6a4f6b87db01c" }, { - "offset": 1154, + "offset": 1401, "selector": "0x298e03955860424b6a946506da72353a645f653dc1879f6b55fd756f3d20a59" }, { - "offset": 1841, + "offset": 2088, "selector": "0x309687d54611a7db521175c78ba48b082df1372350d2529981a8c0dd09a6529" }, { - "offset": 2244, + "offset": 2491, "selector": "0x30f842021fbf02caf80d09a113997c1e00a32870eee0c6136bed27acb348bea" }, { - "offset": 2164, + "offset": 2411, "selector": "0x317eb442b72a9fae758d4fb26830ed0d9f31c8e7da4dbff4e8c59ea6a158e7f" }, { - "offset": 1681, + "offset": 1928, "selector": "0x32564d7e0fe091d49b4c20f4632191e4ed6986bf993849879abfef9465def25" }, { - "offset": 842, + "offset": 1038, "selector": "0x3307b3297ab2ab7a46a9b7d139a52dddf9c343e9a0a3ac69c5b4048d80e3aaf" }, { - "offset": 1920, + "offset": 2167, "selector": "0x33ce93a3eececa5c9fc70da05f4aff3b00e1820b79587924d514bc76788991a" }, { - "offset": 2501, + "offset": 2748, "selector": "0x34c4c150632e67baf44fc50e9a685184d72a822510a26a66f72058b5e7b2892" }, { - "offset": 937, + "offset": 1133, "selector": "0x3604cea1cdb094a73a31144f14a3e5861613c008e1e879939ebc4827d10cd50" }, { - "offset": 1479, + "offset": 900, + "selector": "0x3639fffddc860618a5a5cb4e4c1562999b4b0ee1c648dcdecd1a905482d6ac2" + }, + { + "offset": 1726, "selector": "0x36fa6de2810d05c3e1a0ebe23f60b9c2f4629bbead09e5a9704e1c5632630d5" }, { - "offset": 1515, + "offset": 1762, "selector": "0x38215592552d97419658d30db8f189b242ec2056641de3dff8a7217745ec205" }, { - "offset": 617, + "offset": 655, "selector": "0x382a967a31be13f23e23a5345f7a89b0362cc157d6fbe7564e6396a83cf4b4f" }, { - "offset": 662, + "offset": 782, "selector": "0x39a1491f76903a16feed0a6433bec78de4c73194944e1118e226820ad479701" }, { - "offset": 1010, + "offset": 1257, "selector": "0x3a6a8bae4c51d5959683ae246347ffdd96aa5b2bfa68cc8c3a6a7c2ed0be331" }, { - "offset": 804, + "offset": 1000, "selector": "0x3b097c62d3e4b85742aadd0dfb823f96134b886ec13bda57b68faf86f294d97" }, { - "offset": 1204, + "offset": 1451, "selector": "0x3bf01fb7497d041938cb7b2954d8c4590006d26b3acd0f5aec1af45dc4f94b2" }, { - "offset": 2355, + "offset": 2602, "selector": "0x3d7905601c217734671143d457f0db37f7f8883112abd34b92c4abfeafde0c3" }, { - "offset": 1872, + "offset": 2119, "selector": "0x3dc5da2d6d1275aeed57f43461d31967b0fed58bfe739b4ffad4091e89c4b03" }, { - "offset": 1707, + "offset": 1954, "selector": "0x3eb640b15f75fcc06d43182cdb94ed38c8e71755d5fb57c16dd673b466db1d4" } ], "L1_HANDLER": [ { - "offset": 715, + "offset": 868, + "selector": "0xc73f681176fc7b3f9693986fd7b14581e8d540519e27400e88b8713932be01" + }, + { + "offset": 835, "selector": "0x217f044c1e5a6a595b43251dac7903d76ca187b95dd40991b767800f8aeb9c7" } ] @@ -1087,16 +1203,16 @@ "__main__", "__main__.test_call_contract_fail_with_attr_error_msg" ], - "end_pc": 1202, + "end_pc": 1449, "flow_tracking_data": { "ap_tracking": { - "group": 95, + "group": 114, "offset": 0 }, "reference_ids": {} }, "name": "error_message", - "start_pc": 1192, + "start_pc": 1439, "value": "Be aware of failure ahead..." }, { @@ -1105,16 +1221,16 @@ "__main__", "__main__.fail" ], - "end_pc": 1680, + "end_pc": 1927, "flow_tracking_data": { "ap_tracking": { - "group": 130, + "group": 149, "offset": 0 }, "reference_ids": {} }, "name": "error_message", - "start_pc": 1676, + "start_pc": 1923, "value": "You shall not pass!" } ], @@ -1292,6 +1408,24 @@ "0x400780017fff7ffd", "0x1", "0x208b7fff7fff7ffe", + "0x400380007ffc7ffd", + "0x482680017ffc8000", + "0x1", + "0x208b7fff7fff7ffe", + "0x480a7ffb7fff8000", + "0x48297ffc80007ffd", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffb", + "0x208b7fff7fff7ffe", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff6", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff6", + "0x208b7fff7fff7ffe", "0x480680017fff8000", "0x3ffffffffffffffffffffffffffffff", "0x480280017ffc8000", @@ -1471,7 +1605,7 @@ "0x40780017fff7fff", "0x2", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffec1", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffeaf", "0x400780017fff8000", "0x0", "0x400780017fff8001", @@ -1487,7 +1621,7 @@ "0x1104800180018000", "0x2b", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffeb1", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe9f", "0x40137ffd7fff8000", "0x480280017ffb8000", "0x40297ffd7fff8001", @@ -1500,9 +1634,9 @@ "0x480280007ffc8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe8f", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe7d", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffea2", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe90", "0x40137ffd7fff8000", "0x480280017ffc8000", "0x402580017fff8001", @@ -1525,7 +1659,7 @@ "0x480280007ffd8000", "0x480280017ffd8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe76", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe64", "0x208b7fff7fff7ffe", "0x20780017fff7ffc", "0x5", @@ -1597,7 +1731,7 @@ "0x40780017fff7fff", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe2b", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe19", "0x40137fff7fff8000", "0x4003800080007ffc", "0x4003800180007ffd", @@ -1610,14 +1744,34 @@ "0x4828800080007ffc", "0x480a80007fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe3c", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe2a", "0x48127ffd7fff8000", "0x480a7ffa7fff8000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe17", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe05", + "0x40137fff7fff8000", + "0x4003800080007ffc", + "0x4003800180007ffd", + "0x4826800180008000", + "0x2", + "0x480a7ff97fff8000", + "0x480a7ffb7fff8000", + "0x480680017fff8000", + "0x3d7905601c217734671143d457f0db37f7f8883112abd34b92c4abfeafde0c3", + "0x4828800080007ffc", + "0x480a80007fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe22", + "0x48127ffd7fff8000", + "0x480a7ffa7fff8000", + "0x208b7fff7fff7ffe", + "0x40780017fff7fff", + "0x1", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdf1", "0x40137fff7fff8000", "0x4003800080007ffd", "0x4826800180008000", @@ -1629,7 +1783,7 @@ "0x4828800080007ffc", "0x480a80007fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe29", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe03", "0x482480017fff8000", "0x1", "0x40307ffe7ffd7fff", @@ -1640,7 +1794,7 @@ "0x40780017fff7fff", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe00", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdda", "0x40137fff7fff8000", "0x4003800080007ffd", "0x4826800180008000", @@ -1652,14 +1806,14 @@ "0x4828800080007ffc", "0x480a80007fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe12", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdec", "0x48127ffd7fff8000", "0x480a7ffb7fff8000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffded", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdc7", "0x40137fff7fff8000", "0x4003800080007ffc", "0x4003800180007ffd", @@ -1672,7 +1826,7 @@ "0x4828800080007ffc", "0x480a80007fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdfe", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdd8", "0x48127ffd7fff8000", "0x480a7ffa7fff8000", "0x208b7fff7fff7ffe", @@ -1681,11 +1835,11 @@ "0x391a88f3badec8650b4d8356e18655269ee975e58e0060aa076396ce0b1dccb", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdda", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdb4", "0x480a7ffc7fff8000", "0x48127ffe7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe86", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe72", "0x48127fe17fff8000", "0x48127ffd7fff8000", "0x48127ffd7fff8000", @@ -1698,7 +1852,7 @@ "0x480a7ffa7fff8000", "0x48127ffe7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe3f", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe19", "0x48127ffe7fff8000", "0x48127ff57fff8000", "0x48127ff57fff8000", @@ -1713,7 +1867,7 @@ "0x48127ffe7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe38", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe12", "0x48127ff67fff8000", "0x48127ff67fff8000", "0x208b7fff7fff7ffe", @@ -1721,7 +1875,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe30", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe0a", "0x208b7fff7fff7ffe", "0x482680017ffd8000", "0x2", @@ -1777,6 +1931,88 @@ "0x0", "0x48127ff97fff8000", "0x208b7fff7fff7ffe", + "0x480a7ffc7fff8000", + "0x480680017fff8000", + "0xf", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdc6", + "0x48127ffe7fff8000", + "0x480680017fff8000", + "0xf", + "0x482480017ffd8000", + "0x1", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdc7", + "0x480680017fff8000", + "0xf", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdbb", + "0x402480017ff27fff", + "0x1", + "0x48127ffe7fff8000", + "0x480a7ffd7fff8000", + "0x208b7fff7fff7ffe", + "0x402b7ffd7ffc7ffd", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe9", + "0x40780017fff7fff", + "0x1", + "0x48127ffd7fff8000", + "0x48127ffd7fff8000", + "0x480280027ffb8000", + "0x480280037ffb8000", + "0x480280047ffb8000", + "0x480680017fff8000", + "0x0", + "0x48127ff97fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ffd7fff8000", + "0x480680017fff8000", + "0x11", + "0x480680017fff8000", + "0x55", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdd5", + "0x480a7ffc7fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x2", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd22", + "0x400680017fff7fff", + "0x5bb9440e27889a364bcb678b1f679ecd1347acdedcbf36e83494f857cc58026", + "0x48127ffe7fff8000", + "0x48127ff77fff8000", + "0x48127ffd7fff8000", + "0x208b7fff7fff7ffe", + "0x40780017fff7fff", + "0x1", + "0x4003800080007ffc", + "0x4826800180008000", + "0x1", + "0x480a7ffd7fff8000", + "0x4828800080007ffe", + "0x480a80007fff8000", + "0x208b7fff7fff7ffe", + "0x402b7ffd7ffc7ffd", + "0x480280017ffb8000", + "0x480280027ffb8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe1", + "0x48127ffe7fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff2", + "0x480280007ffb8000", + "0x48127ff47fff8000", + "0x48127ffb7fff8000", + "0x480280037ffb8000", + "0x480280047ffb8000", + "0x48127ff97fff8000", + "0x48127ff97fff8000", + "0x208b7fff7fff7ffe", "0x480a7ffd7fff8000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", @@ -1812,7 +2048,7 @@ "0x480680017fff8000", "0x6", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd6d", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffcf5", "0x482480017fff8000", "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffe", "0x480a7ffd7fff8000", @@ -1824,17 +2060,17 @@ "0x3", "0x48127ffb7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd7e", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd06", "0x48127ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffda8", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd30", "0x48127ffe7fff8000", "0x208b7fff7fff7ffe", "0x480a7ffa7fff8000", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffdbf", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd47", "0x480680017fff8000", "0x1", "0x400680017fff7fff", @@ -1861,6 +2097,82 @@ "0x0", "0x48127ff97fff8000", "0x208b7fff7fff7ffe", + "0x480a7ff97fff8000", + "0x480a7ffb7fff8000", + "0x480a7ffa7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x480680017fff8000", + "0x0", + "0x1104800180018000", + "0x5fe", + "0x48127ffd7fff8000", + "0x48127ffe7fff8000", + "0x48127ffc7fff8000", + "0x208b7fff7fff7ffe", + "0x482680017ffd8000", + "0x2", + "0x402a7ffd7ffc7fff", + "0x480280007ffb8000", + "0x480280027ffb8000", + "0x480280017ffb8000", + "0x480280007ffd8000", + "0x480280017ffd8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffec", + "0x40780017fff7fff", + "0x1", + "0x48127ffc7fff8000", + "0x48127ffd7fff8000", + "0x48127ffb7fff8000", + "0x480280037ffb8000", + "0x480280047ffb8000", + "0x480680017fff8000", + "0x0", + "0x48127ff97fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ff77fff8000", + "0x480a7ffa7fff8000", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffcb9", + "0x48127ffd7fff8000", + "0x480a7ff87fff8000", + "0x480a7ff97fff8000", + "0x208b7fff7fff7ffe", + "0x480280027ffb8000", + "0x480280027ffd8000", + "0x400080007ffe7fff", + "0x482680017ffd8000", + "0x3", + "0x480280027ffd8000", + "0x48307fff7ffe8000", + "0x402a7ffd7ffc7fff", + "0x480280027ffb8000", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x482480017ffd8000", + "0x1", + "0x480280007ffd8000", + "0x480280017ffd8000", + "0x480280027ffd8000", + "0x482680017ffd8000", + "0x3", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe4", + "0x40780017fff7fff", + "0x1", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x480280037ffb8000", + "0x480280047ffb8000", + "0x480680017fff8000", + "0x0", + "0x48127ff97fff8000", + "0x208b7fff7fff7ffe", "0x400380007ffb7ffc", "0x400380017ffb7ffd", "0x480680017fff8000", @@ -1916,10 +2228,10 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd6d", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffca9", "0x480a7ffc7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd62", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc9e", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x1", @@ -1957,11 +2269,11 @@ "0x480680017fff8000", "0x7", "0x1104800180018000", - "0x699", + "0x6cc", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd40", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc7c", "0x482680017ffc8000", "0x800000000000011000000000000000000000000000000000000000000000000", "0x480a7ffd7fff8000", @@ -1991,7 +2303,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd22", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc5e", "0x480680017fff8000", "0x1", "0x400680017fff7fff", @@ -2061,7 +2373,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc85", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbc1", "0x208b7fff7fff7ffe", "0x480280027ffb8000", "0x480280027ffd8000", @@ -2089,6 +2401,57 @@ "0x48127ff87fff8000", "0x48127ff87fff8000", "0x208b7fff7fff7ffe", + "0x480a7ffb7fff8000", + "0x480680017fff8000", + "0x1bc", + "0x480680017fff8000", + "0x22b", + "0x1104800180018000", + "0x598", + "0x480680017fff8000", + "0x1bc", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbea", + "0x400680017fff7fff", + "0x22b", + "0x48127ffe7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x480680017fff8000", + "0x1bc", + "0x480680017fff8000", + "0x29a", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffd60", + "0x48127ffe7fff8000", + "0x480680017fff8000", + "0x1bc", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbda", + "0x400680017fff7fff", + "0x29a", + "0x48127ffe7fff8000", + "0x48127ff77fff8000", + "0x208b7fff7fff7ffe", + "0x482680017ffd8000", + "0x1", + "0x402a7ffd7ffc7fff", + "0x480280007ffb8000", + "0x480280027ffb8000", + "0x480280007ffd8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffdb", + "0x40780017fff7fff", + "0x1", + "0x48127ffd7fff8000", + "0x480280017ffb8000", + "0x48127ffc7fff8000", + "0x480280037ffb8000", + "0x480280047ffb8000", + "0x480680017fff8000", + "0x0", + "0x48127ff97fff8000", + "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x1", "0x400780017fff7ffc", @@ -2104,7 +2467,7 @@ "0x482480017ffb8000", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc49", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb52", "0x482480017fff8000", "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffc", "0x40137fff7fff8000", @@ -2115,14 +2478,14 @@ "0x5", "0x480a80007fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc4f", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb58", "0x48127ffd7fff8000", "0x480a7ff97fff8000", "0x480a7ffb7fff8000", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc48", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb51", "0x48127ffd7fff8000", "0x480680017fff8000", "0x0", @@ -2173,7 +2536,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc09", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb12", "0x208b7fff7fff7ffe", "0x480280027ffb8000", "0x480280027ffd8000", @@ -2208,7 +2571,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbe6", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffaef", "0x48127ffd7fff8000", "0x480a7ff97fff8000", "0x480a7ffa7fff8000", @@ -2251,7 +2614,7 @@ "0x480a7ff87fff8000", "0x480a7ff97fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbbb", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffac4", "0x40137ffe7fff8000", "0x48127ffd7fff8000", "0x480a7ffa7fff8000", @@ -2259,23 +2622,23 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbb3", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffabc", "0x40137fff7fff8001", "0x40137ffe7fff8002", "0x40137ffd7fff8003", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb90", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffa99", "0x40137fff7fff8004", "0x480a80047fff8000", "0x48127ff07fff8000", "0x480a80007fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb93", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffa9c", "0x482a800080048000", "0x480a80017fff8000", "0x480a80027fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb8e", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffa97", "0x480a80037fff8000", "0x482a800280008000", "0x480a80047fff8000", @@ -2319,7 +2682,7 @@ "0x48127ff87fff8000", "0x208b7fff7fff7ffe", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb72", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffa7b", "0x480a7ffb7fff8000", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", @@ -2327,7 +2690,7 @@ "0x0", "0x48127ffb7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb6f", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffa78", "0x48127ffd7fff8000", "0x208b7fff7fff7ffe", "0x482680017ffd8000", @@ -2352,7 +2715,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbd2", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffadb", "0x208b7fff7fff7ffe", "0x482680017ffd8000", "0x1", @@ -2379,7 +2742,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb5f", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffa68", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x1", @@ -2430,14 +2793,14 @@ "0x480a7ffb7fff8000", "0x480a7ff97fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb2c", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffa35", "0x48127ffe7fff8000", "0x480a7ff67fff8000", "0x48127ffd7fff8000", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffcb7", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbd2", "0x48127fe67fff8000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", @@ -2496,7 +2859,7 @@ "0x480680017fff8000", "0x7e5", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc7c", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb97", "0x48127ffe7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", @@ -2508,7 +2871,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc84", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbb3", "0x400680017fff7fff", "0x7e5", "0x48127ffd7fff8000", @@ -2545,7 +2908,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc76", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffba5", "0x48127ffe7fff8000", "0x480680017fff8000", "0x5", @@ -2559,7 +2922,7 @@ "0x480680017fff8000", "0x5", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc51", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffb80", "0x480680017fff8000", "0x22b", "0x40487ffd7fff7ffe", @@ -2594,11 +2957,11 @@ "0x480680017fff8000", "0x27", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc88", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbb7", "0x480680017fff8000", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffc76", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffba5", "0x400680017fff7fff", "0x27", "0x48127ffc7fff8000", @@ -2630,7 +2993,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffbd7", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffaf2", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x1", @@ -2714,7 +3077,7 @@ "0x482680017ffd8000", "0x3", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff9ec", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff8f5", "0x48127ffd7fff8000", "0x480680017fff8000", "0x0", @@ -2732,7 +3095,7 @@ "0x482680017ffd8000", "0x3", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff9e6", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff8ef", "0x48127ffd7fff8000", "0x480680017fff8000", "0x0", @@ -2886,7 +3249,7 @@ "0x482680017ffd8000", "0x800000000000011000000000000000000000000000000000000000000000000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff93b", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff844", "0x482480017fff8000", "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffe", "0x40137fff7fff8000", @@ -2897,7 +3260,7 @@ "0x3", "0x480a80007fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff935", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff83e", "0x48127ffd7fff8000", "0x208b7fff7fff7ffe", "0x482680017ffd8000", @@ -2926,15 +3289,15 @@ "0x480a7ff97fff8000", "0x480a7ffa7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff97b", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff884", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff946", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff84f", "0x480a7ffb7fff8000", "0x480a7ffc7fff8000", "0x480680017fff8000", "0x0", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff90b", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff814", "0x482480017fff8000", "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffd", "0x40137fff7fff8000", @@ -2946,7 +3309,7 @@ "0x4", "0x480a80007fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff904", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff80d", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x3", @@ -2962,7 +3325,7 @@ "0x480a7ffc7fff8000", "0x480a7ffb7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff8df", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7e8", "0x480a80017fff8000", "0x4829800080008002", "0x480a80007fff8000", @@ -2994,7 +3357,7 @@ "0x208b7fff7fff7ffe", "0x480a7ffc7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff912", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff81b", "0x400a7ffd7fff7fff", "0x48127ffe7fff8000", "0x208b7fff7fff7ffe", @@ -3018,7 +3381,7 @@ "0x208b7fff7fff7ffe", "0x480a7ffc7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff908", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff811", "0x400a7ffd7fff7fff", "0x48127ffe7fff8000", "0x208b7fff7fff7ffe", @@ -3042,7 +3405,7 @@ "0x208b7fff7fff7ffe", "0x480a7ffc7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff8db", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7e4", "0x400a7ffd7fff7fff", "0x48127ffe7fff8000", "0x208b7fff7fff7ffe", @@ -3066,7 +3429,7 @@ "0x208b7fff7fff7ffe", "0x480a7ff67fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff901", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff80a", "0x480080007fff8000", "0x480080017ffe8000", "0x480080027ffd8000", @@ -3088,17 +3451,17 @@ "0x12c", "0x48127ffb7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff8d9", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7e2", "0x480680017fff8000", "0x137", "0x48127ff67fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff8d4", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7dd", "0x480680017fff8000", "0x142", "0x48127ff17fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff8cf", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7d8", "0x480a7ff77fff8000", "0x208b7fff7fff7ffe", "0x482680017ffd8000", @@ -3127,7 +3490,7 @@ "0x208b7fff7fff7ffe", "0x480a7ffc7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff8c4", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7cd", "0x400180007fff7ffd", "0x48127ffe7fff8000", "0x208b7fff7fff7ffe", @@ -3155,13 +3518,13 @@ "0x480680017fff8000", "0x0", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff896", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff79f", "0x480680017fff8000", "0xf", "0x480680017fff8000", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff890", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff799", "0x480a7ffd7fff8000", "0x208b7fff7fff7ffe", "0x402b7ffd7ffc7ffd", @@ -3183,7 +3546,7 @@ "0x40780017fff7fff", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7f9", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff702", "0x40137fff7fff8000", "0x4003800080007ffb", "0x4003800180007ffc", @@ -3197,7 +3560,7 @@ "0x4828800080007ffc", "0x480a80007fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff809", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff712", "0x48127ffd7fff8000", "0x480a7ff97fff8000", "0x208b7fff7fff7ffe", @@ -3206,11 +3569,11 @@ "0x2691cb735b18f3f656c3b82bd97a32b65d15019b64117513f8604d1e06fe58b", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7e5", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff6ee", "0x480a7ffc7fff8000", "0x48127ffe7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff891", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7ac", "0x48127fe17fff8000", "0x48127ffd7fff8000", "0x48127ffd7fff8000", @@ -3223,12 +3586,12 @@ "0x480a7ffa7fff8000", "0x48127ffe7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff84a", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff753", "0x48127ffe7fff8000", "0x482480017ff78000", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff845", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff74e", "0x48127ffe7fff8000", "0x48127fee7fff8000", "0x48127fee7fff8000", @@ -3244,12 +3607,12 @@ "0x48127ffe7fff8000", "0x480a7ffc7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff83d", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff746", "0x482480017ff88000", "0x1", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff838", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff741", "0x48127ff07fff8000", "0x48127ff07fff8000", "0x208b7fff7fff7ffe", @@ -3266,12 +3629,12 @@ "0x48127ffe7fff8000", "0x480a7ffc7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff827", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff730", "0x482480017ff88000", "0x1", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff822", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff72b", "0x48127ff07fff8000", "0x48127ff07fff8000", "0x208b7fff7fff7ffe", @@ -3322,12 +3685,12 @@ "0x48127ffd7fff8000", "0x480a7ffc7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff849", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff764", "0x48127ffe7fff8000", "0x48127ff77fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff844", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff75f", "0x48127fed7fff8000", "0x48127fed7fff8000", "0x48127fed7fff8000", @@ -3404,7 +3767,7 @@ "0x480680017fff8000", "0x4b5810004d9272776dec83ecc20c19353453b956e594188890b48467cb53c19", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff846", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff761", "0x480a7ffa7fff8000", "0x480a7ffb7fff8000", "0x480a7ffc7fff8000", @@ -3434,7 +3797,7 @@ "0x208b7fff7fff7ffe", "0x480a7ffc7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff76f", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff678", "0x400680017fff7ffe", "0x2", "0x48127ffd7fff8000", @@ -3479,7 +3842,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff752", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff65b", "0x208b7fff7fff7ffe", "0x482680017ffd8000", "0x2", @@ -3503,7 +3866,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff732", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff63b", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x1", @@ -3534,16 +3897,16 @@ "0x208b7fff7fff7ffe", "0x480a7ffb7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff6e8", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff5f1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff739", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff642", "0x48127ffc7fff8000", "0x480a7ffc7fff8000", "0x48127ffb7fff8000", "0x48127ffa7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff8a3", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7d2", "0x480680017fff8000", "0x22b", "0x48127ffd7fff8000", @@ -3589,7 +3952,7 @@ "0x482680017ffd8000", "0x800000000000011000000000000000000000000000000000000000000000000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff875", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff7a4", "0x48127ffe7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", @@ -3619,13 +3982,13 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff6be", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff5c7", "0x48127ffe7fff8000", "0x480a7ffd7fff8000", "0x482480017ffd8000", "0x1", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff6c0", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff5c9", "0x208b7fff7fff7ffe", "0x482680017ffd8000", "0x1", @@ -3652,14 +4015,62 @@ "0x400780017fff8001", "0x22", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff63c", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff545", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x480680017fff8000", "0x2", "0x48127ffb7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff76a", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff685", + "0x208b7fff7fff7ffe", + "0x482680017ffd8000", + "0x1", + "0x402a7ffd7ffc7fff", + "0x480280007ffb8000", + "0x480280007ffd8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffec", + "0x40780017fff7fff", + "0x1", + "0x48127ffe7fff8000", + "0x480280017ffb8000", + "0x480280027ffb8000", + "0x480280037ffb8000", + "0x480280047ffb8000", + "0x480680017fff8000", + "0x0", + "0x48127ff97fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ffc7fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff55e", + "0x400a7ffd7fff7fff", + "0x48127ffe7fff8000", + "0x208b7fff7fff7ffe", + "0x482680017ffd8000", + "0x1", + "0x402a7ffd7ffc7fff", + "0x480280007ffb8000", + "0x480280007ffd8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff6", + "0x40780017fff7fff", + "0x1", + "0x48127ffe7fff8000", + "0x480280017ffb8000", + "0x480280027ffb8000", + "0x480280037ffb8000", + "0x480280047ffb8000", + "0x480680017fff8000", + "0x0", + "0x48127ff97fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ffc7fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff55b", + "0x400a7ffd7fff7fff", + "0x48127ffe7fff8000", "0x208b7fff7fff7ffe", "0x482680017ffd8000", "0x1", @@ -3667,7 +4078,7 @@ "0x480280007ffb8000", "0x480280007ffd8000", "0x1104800180018000", - "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffec", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff6", "0x40780017fff7fff", "0x1", "0x48127ffe7fff8000", @@ -3691,7 +4102,7 @@ "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff686", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffff55f", "0x480a7ff77fff8000", "0x480a7ff87fff8000", "0x482680017ff98000", @@ -4114,6 +4525,24 @@ } ], "166": [ + { + "accessible_scopes": [ + "starkware.cairo.common.math", + "starkware.cairo.common.math.assert_nn" + ], + "code": "from starkware.cairo.common.math_utils import assert_integer\nassert_integer(ids.a)\nassert 0 <= ids.a % PRIME < range_check_builtin.bound, f'a = {ids.a} is out of range.'", + "flow_tracking_data": { + "ap_tracking": { + "group": 21, + "offset": 0 + }, + "reference_ids": { + "starkware.cairo.common.math.assert_nn.a": 18 + } + } + } + ], + "184": [ { "accessible_scopes": [ "starkware.cairo.common.math", @@ -4122,18 +4551,18 @@ "code": "from starkware.cairo.common.math_utils import as_int\n\n# Correctness check.\nvalue = as_int(ids.value, PRIME) % PRIME\nassert value < ids.UPPER_BOUND, f'{value} is outside of the range [0, 2**250).'\n\n# Calculation for the assertion.\nids.high, ids.low = divmod(ids.value, ids.SHIFT)", "flow_tracking_data": { "ap_tracking": { - "group": 21, + "group": 24, "offset": 0 }, "reference_ids": { - "starkware.cairo.common.math.assert_250_bit.high": 20, - "starkware.cairo.common.math.assert_250_bit.low": 19, - "starkware.cairo.common.math.assert_250_bit.value": 18 + "starkware.cairo.common.math.assert_250_bit.high": 21, + "starkware.cairo.common.math.assert_250_bit.low": 20, + "starkware.cairo.common.math.assert_250_bit.value": 19 } } } ], - "181": [ + "199": [ { "accessible_scopes": [ "starkware.starknet.common.storage", @@ -4142,17 +4571,17 @@ "code": "# Verify the assumptions on the relationship between 2**250, ADDR_BOUND and PRIME.\nADDR_BOUND = ids.ADDR_BOUND % PRIME\nassert (2**250 < ADDR_BOUND <= 2**251) and (2 * 2**250 < PRIME) and (\n ADDR_BOUND * 2 > PRIME), \\\n 'normalize_address() cannot be used with the current constants.'\nids.is_small = 1 if ids.addr < ADDR_BOUND else 0", "flow_tracking_data": { "ap_tracking": { - "group": 22, + "group": 25, "offset": 1 }, "reference_ids": { - "starkware.starknet.common.storage.normalize_address.addr": 21, - "starkware.starknet.common.storage.normalize_address.is_small": 22 + "starkware.starknet.common.storage.normalize_address.addr": 22, + "starkware.starknet.common.storage.normalize_address.is_small": 23 } } } ], - "199": [ + "217": [ { "accessible_scopes": [ "starkware.starknet.common.storage", @@ -4161,17 +4590,17 @@ "code": "ids.is_250 = 1 if ids.addr < 2**250 else 0", "flow_tracking_data": { "ap_tracking": { - "group": 22, + "group": 25, "offset": 2 }, "reference_ids": { - "starkware.starknet.common.storage.normalize_address.addr": 21, - "starkware.starknet.common.storage.normalize_address.is_250": 23 + "starkware.starknet.common.storage.normalize_address.addr": 22, + "starkware.starknet.common.storage.normalize_address.is_250": 24 } } } ], - "306": [ + "324": [ { "accessible_scopes": [ "starkware.cairo.common.ec", @@ -4180,19 +4609,19 @@ "code": "from starkware.crypto.signature.signature import ALPHA, BETA, FIELD_PRIME\nfrom starkware.python.math_utils import random_ec_point\nfrom starkware.python.utils import to_bytes\n\n# Define a seed for random_ec_point that's dependent on all the input, so that:\n# (1) The added point s is deterministic.\n# (2) It's hard to choose inputs for which the builtin will fail.\nseed = b\"\".join(map(to_bytes, [ids.p.x, ids.p.y, ids.m, ids.q.x, ids.q.y]))\nids.s.x, ids.s.y = random_ec_point(FIELD_PRIME, ALPHA, BETA, seed)", "flow_tracking_data": { "ap_tracking": { - "group": 28, + "group": 31, "offset": 2 }, "reference_ids": { - "starkware.cairo.common.ec.ec_op.m": 25, - "starkware.cairo.common.ec.ec_op.p": 24, - "starkware.cairo.common.ec.ec_op.q": 26, - "starkware.cairo.common.ec.ec_op.s": 27 + "starkware.cairo.common.ec.ec_op.m": 26, + "starkware.cairo.common.ec.ec_op.p": 25, + "starkware.cairo.common.ec.ec_op.q": 27, + "starkware.cairo.common.ec.ec_op.s": 28 } } } ], - "339": [ + "357": [ { "accessible_scopes": [ "starkware.starknet.common.messages", @@ -4201,16 +4630,16 @@ "code": "syscall_handler.send_message_to_l1(segments=segments, syscall_ptr=ids.syscall_ptr)", "flow_tracking_data": { "ap_tracking": { - "group": 32, + "group": 35, "offset": 1 }, "reference_ids": { - "starkware.starknet.common.messages.send_message_to_l1.syscall_ptr": 28 + "starkware.starknet.common.messages.send_message_to_l1.syscall_ptr": 29 } } } ], - "605": [ + "643": [ { "accessible_scopes": [ "__main__", @@ -4221,14 +4650,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 53, + "group": 57, "offset": 13 }, "reference_ids": {} } } ], - "620": [ + "658": [ { "accessible_scopes": [ "__main__", @@ -4239,14 +4668,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 55, + "group": 59, "offset": 2 }, "reference_ids": {} } } ], - "640": [ + "678": [ { "accessible_scopes": [ "__main__", @@ -4257,14 +4686,50 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 57, + "group": 61, "offset": 4 }, "reference_ids": {} } } ], - "653": [ + "715": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.read_write_read" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 63, + "offset": 26 + }, + "reference_ids": {} + } + } + ], + "746": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.test_builtins_encode_return" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 65, + "offset": 0 + }, + "reference_ids": {} + } + } + ], + "773": [ { "accessible_scopes": [ "__main__", @@ -4275,14 +4740,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 59, + "group": 68, "offset": 0 }, "reference_ids": {} } } ], - "724": [ + "844": [ { "accessible_scopes": [ "__main__", @@ -4293,14 +4758,50 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 63, + "group": 72, "offset": 16 }, "reference_ids": {} } } ], - "751": [ + "878": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.deposit" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 76, + "offset": 0 + }, + "reference_ids": {} + } + } + ], + "920": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.test_library_call_l1_handler" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 78, + "offset": 29 + }, + "reference_ids": {} + } + } + ], + "947": [ { "accessible_scopes": [ "__main__", @@ -4311,14 +4812,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 65, + "group": 80, "offset": 8 }, "reference_ids": {} } } ], - "764": [ + "960": [ { "accessible_scopes": [ "__main__", @@ -4328,17 +4829,17 @@ "code": "from starkware.python.math_utils import isqrt\nvalue = ids.value % PRIME\nassert value < 2 ** 250, f\"value={value} is outside of the range [0, 2**250).\"\nassert 2 ** 250 < PRIME\nids.root = isqrt(value)", "flow_tracking_data": { "ap_tracking": { - "group": 66, + "group": 81, "offset": 1 }, "reference_ids": { - "__main__.sqrt.root": 30, - "__main__.sqrt.value": 29 + "__main__.sqrt.root": 31, + "__main__.sqrt.value": 30 } } } ], - "775": [ + "971": [ { "accessible_scopes": [ "__main__", @@ -4349,14 +4850,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 67, + "group": 82, "offset": 7 }, "reference_ids": {} } } ], - "795": [ + "991": [ { "accessible_scopes": [ "__main__", @@ -4367,14 +4868,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 69, + "group": 84, "offset": 0 }, "reference_ids": {} } } ], - "850": [ + "1046": [ { "accessible_scopes": [ "__main__", @@ -4385,14 +4886,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 75, + "group": 90, "offset": 0 }, "reference_ids": {} } } ], - "880": [ + "1076": [ { "accessible_scopes": [ "__main__", @@ -4403,14 +4904,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 77, + "group": 92, "offset": 15 }, "reference_ids": {} } } ], - "902": [ + "1098": [ { "accessible_scopes": [ "__main__", @@ -4421,14 +4922,32 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 79, + "group": 94, + "offset": 0 + }, + "reference_ids": {} + } + } + ], + "1199": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.test_library_call_syntactic_sugar" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 101, "offset": 0 }, "reference_ids": {} } } ], - "1001": [ + "1248": [ { "accessible_scopes": [ "__main__", @@ -4439,14 +4958,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 84, + "group": 103, "offset": 0 }, "reference_ids": {} } } ], - "1106": [ + "1353": [ { "accessible_scopes": [ "__main__", @@ -4457,14 +4976,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 89, + "group": 108, "offset": 28 }, "reference_ids": {} } } ], - "1212": [ + "1459": [ { "accessible_scopes": [ "__main__", @@ -4475,14 +4994,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 96, + "group": 115, "offset": 23 }, "reference_ids": {} } } ], - "1235": [ + "1482": [ { "accessible_scopes": [ "__main__", @@ -4493,14 +5012,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 98, + "group": 117, "offset": 11 }, "reference_ids": {} } } ], - "1255": [ + "1502": [ { "accessible_scopes": [ "__main__", @@ -4511,14 +5030,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 100, + "group": 119, "offset": 0 }, "reference_ids": {} } } ], - "1314": [ + "1561": [ { "accessible_scopes": [ "__main__", @@ -4529,14 +5048,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 103, + "group": 122, "offset": 0 }, "reference_ids": {} } } ], - "1397": [ + "1644": [ { "accessible_scopes": [ "__main__", @@ -4547,14 +5066,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 109, + "group": 128, "offset": 0 }, "reference_ids": {} } } ], - "1449": [ + "1696": [ { "accessible_scopes": [ "__main__", @@ -4565,14 +5084,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 114, + "group": 133, "offset": 0 }, "reference_ids": {} } } ], - "1485": [ + "1732": [ { "accessible_scopes": [ "__main__", @@ -4583,14 +5102,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 116, + "group": 135, "offset": 126 }, "reference_ids": {} } } ], - "1506": [ + "1753": [ { "accessible_scopes": [ "__main__", @@ -4601,14 +5120,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 119, + "group": 138, "offset": 0 }, "reference_ids": {} } } ], - "1552": [ + "1799": [ { "accessible_scopes": [ "__main__", @@ -4619,14 +5138,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 123, + "group": 142, "offset": 2 }, "reference_ids": {} } } ], - "1639": [ + "1886": [ { "accessible_scopes": [ "__main__", @@ -4637,14 +5156,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 127, + "group": 146, "offset": 0 }, "reference_ids": {} } } ], - "1684": [ + "1931": [ { "accessible_scopes": [ "__main__", @@ -4655,14 +5174,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 131, + "group": 150, "offset": 3 }, "reference_ids": {} } } ], - "1713": [ + "1960": [ { "accessible_scopes": [ "__main__", @@ -4673,14 +5192,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 135, + "group": 154, "offset": 0 }, "reference_ids": {} } } ], - "1738": [ + "1985": [ { "accessible_scopes": [ "__main__", @@ -4691,14 +5210,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 139, + "group": 158, "offset": 0 }, "reference_ids": {} } } ], - "1783": [ + "2030": [ { "accessible_scopes": [ "__main__", @@ -4709,14 +5228,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 142, + "group": 161, "offset": 0 }, "reference_ids": {} } } ], - "1822": [ + "2069": [ { "accessible_scopes": [ "__main__", @@ -4727,14 +5246,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 144, + "group": 163, "offset": 0 }, "reference_ids": {} } } ], - "1879": [ + "2126": [ { "accessible_scopes": [ "__main__", @@ -4745,14 +5264,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 149, + "group": 168, "offset": 12 }, "reference_ids": {} } } ], - "1903": [ + "2150": [ { "accessible_scopes": [ "__main__", @@ -4763,14 +5282,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 151, + "group": 170, "offset": 12 }, "reference_ids": {} } } ], - "1927": [ + "2174": [ { "accessible_scopes": [ "__main__", @@ -4781,14 +5300,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 153, + "group": 172, "offset": 12 }, "reference_ids": {} } } ], - "1988": [ + "2235": [ { "accessible_scopes": [ "__main__", @@ -4799,14 +5318,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 155, + "group": 174, "offset": 45 }, "reference_ids": {} } } ], - "2012": [ + "2259": [ { "accessible_scopes": [ "__main__", @@ -4817,14 +5336,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 157, + "group": 176, "offset": 12 }, "reference_ids": {} } } ], - "2043": [ + "2290": [ { "accessible_scopes": [ "__main__", @@ -4835,14 +5354,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 159, + "group": 178, "offset": 18 }, "reference_ids": {} } } ], - "2175": [ + "2422": [ { "accessible_scopes": [ "__main__", @@ -4853,14 +5372,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 167, + "group": 186, "offset": 145 }, "reference_ids": {} } } ], - "2224": [ + "2471": [ { "accessible_scopes": [ "__main__", @@ -4871,14 +5390,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 169, + "group": 188, "offset": 161 }, "reference_ids": {} } } ], - "2255": [ + "2502": [ { "accessible_scopes": [ "__main__", @@ -4889,14 +5408,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 171, + "group": 190, "offset": 35 }, "reference_ids": {} } } ], - "2295": [ + "2542": [ { "accessible_scopes": [ "__main__", @@ -4907,14 +5426,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 175, + "group": 194, "offset": 0 }, "reference_ids": {} } } ], - "2338": [ + "2585": [ { "accessible_scopes": [ "__main__", @@ -4925,14 +5444,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 177, + "group": 196, "offset": 153 }, "reference_ids": {} } } ], - "2363": [ + "2610": [ { "accessible_scopes": [ "__main__", @@ -4943,14 +5462,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 179, + "group": 198, "offset": 13 }, "reference_ids": {} } } ], - "2379": [ + "2626": [ { "accessible_scopes": [ "__main__", @@ -4961,14 +5480,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 181, + "group": 200, "offset": 0 }, "reference_ids": {} } } ], - "2436": [ + "2683": [ { "accessible_scopes": [ "__main__", @@ -4979,14 +5498,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 184, + "group": 203, "offset": 53 }, "reference_ids": {} } } ], - "2479": [ + "2726": [ { "accessible_scopes": [ "__main__", @@ -4997,14 +5516,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 189, + "group": 208, "offset": 0 }, "reference_ids": {} } } ], - "2508": [ + "2755": [ { "accessible_scopes": [ "__main__", @@ -5015,14 +5534,14 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 191, + "group": 210, "offset": 19 }, "reference_ids": {} } } ], - "2542": [ + "2789": [ { "accessible_scopes": [ "__main__", @@ -5033,14 +5552,50 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 193, + "group": 212, "offset": 17 }, "reference_ids": {} } } ], - "2617": [ + "2813": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.test_get_caller_address" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 214, + "offset": 12 + }, + "reference_ids": {} + } + } + ], + "2837": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.test_get_contract_address" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 216, + "offset": 12 + }, + "reference_ids": {} + } + } + ], + "2912": [ { "accessible_scopes": [ "__main__", @@ -5051,7 +5606,7 @@ "code": "memory[ap] = segments.add()", "flow_tracking_data": { "ap_tracking": { - "group": 199, + "group": 222, "offset": 0 }, "reference_ids": {} @@ -5140,7 +5695,7 @@ }, "__main__.MyContract.xor_counters": { "decorators": [], - "pc": 2054, + "pc": 2301, "type": "function" }, "__main__.MyContract.xor_counters.Args": { @@ -5197,7 +5752,7 @@ "decorators": [ "external" ], - "pc": 2306, + "pc": 2553, "type": "function" }, "__main__.add_signature_to_counters.Args": { @@ -5242,7 +5797,7 @@ "decorators": [ "external" ], - "pc": 2406, + "pc": 2653, "type": "function" }, "__main__.add_value.Args": { @@ -5283,7 +5838,7 @@ "decorators": [ "external" ], - "pc": 2149, + "pc": 2396, "type": "function" }, "__main__.advance_counter.Args": { @@ -5336,6 +5891,10 @@ "destination": "starkware.cairo.common.alloc.alloc", "type": "alias" }, + "__main__.assert_nn_le": { + "destination": "starkware.cairo.common.math.assert_nn_le", + "type": "alias" + }, "__main__.assert_not_zero": { "destination": "starkware.cairo.common.math.assert_not_zero", "type": "alias" @@ -5344,7 +5903,7 @@ "decorators": [ "external" ], - "pc": 735, + "pc": 931, "type": "function" }, "__main__.bitwise_and.Args": { @@ -5393,7 +5952,7 @@ "decorators": [ "external" ], - "pc": 1075, + "pc": 1322, "type": "function" }, "__main__.call_execute_directly.Args": { @@ -5446,7 +6005,7 @@ "decorators": [ "external" ], - "pc": 2235, + "pc": 2482, "type": "function" }, "__main__.call_xor_counters.Args": { @@ -5491,7 +6050,7 @@ "decorators": [ "constructor" ], - "pc": 591, + "pc": 629, "type": "function" }, "__main__.constructor.Args": { @@ -5532,6 +6091,55 @@ "destination": "starkware.starknet.common.syscalls.deploy", "type": "alias" }, + "__main__.deposit": { + "decorators": [ + "l1_handler" + ], + "pc": 855, + "type": "function" + }, + "__main__.deposit.Args": { + "full_name": "__main__.deposit.Args", + "members": { + "amount": { + "cairo_type": "felt", + "offset": 1 + }, + "from_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "__main__.deposit.ImplicitArgs": { + "full_name": "__main__.deposit.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 2 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 1 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.deposit.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.deposit.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, "__main__.ec_op": { "destination": "starkware.cairo.common.ec.ec_op", "type": "alias" @@ -5565,7 +6173,7 @@ }, "__main__.ec_point.addr": { "decorators": [], - "pc": 2127, + "pc": 2374, "type": "function" }, "__main__.ec_point.addr.Args": { @@ -5615,7 +6223,7 @@ }, "__main__.ec_point.write": { "decorators": [], - "pc": 2132, + "pc": 2379, "type": "function" }, "__main__.ec_point.write.Args": { @@ -5662,7 +6270,7 @@ }, "__main__.emit_event_recurse": { "decorators": [], - "pc": 2553, + "pc": 2848, "type": "function" }, "__main__.emit_event_recurse.Args": { @@ -5723,7 +6331,7 @@ "decorators": [ "external" ], - "pc": 1676, + "pc": 1923, "type": "function" }, "__main__.fail.Args": { @@ -5750,7 +6358,7 @@ "decorators": [ "external" ], - "pc": 1548, + "pc": 1795, "type": "function" }, "__main__.foo.Args": { @@ -5813,7 +6421,7 @@ "decorators": [ "external" ], - "pc": 2374, + "pc": 2621, "type": "function" }, "__main__.get_value.Args": { @@ -5846,11 +6454,15 @@ "type": "const", "value": 0 }, + "__main__.hash2": { + "destination": "starkware.cairo.common.hash.hash2", + "type": "alias" + }, "__main__.increase_value": { "decorators": [ "external" ], - "pc": 2490, + "pc": 2737, "type": "function" }, "__main__.increase_value.Args": { @@ -5887,7 +6499,7 @@ "decorators": [ "external" ], - "pc": 1563, + "pc": 1810, "type": "function" }, "__main__.invoke_call_chain.Args": { @@ -5928,7 +6540,7 @@ "decorators": [ "l1_handler" ], - "pc": 704, + "pc": 824, "type": "function" }, "__main__.l1_handler_set_value_and_revert.Args": { @@ -6010,7 +6622,7 @@ }, "__main__.number_map.addr": { "decorators": [], - "pc": 550, + "pc": 588, "type": "function" }, "__main__.number_map.addr.Args": { @@ -6057,7 +6669,7 @@ }, "__main__.number_map.read": { "decorators": [], - "pc": 564, + "pc": 602, "type": "function" }, "__main__.number_map.read.Args": { @@ -6108,7 +6720,7 @@ }, "__main__.number_map.write": { "decorators": [], - "pc": 578, + "pc": 616, "type": "function" }, "__main__.number_map.write.Args": { @@ -6155,7 +6767,7 @@ }, "__main__.other_syscalls": { "decorators": [], - "pc": 679, + "pc": 799, "type": "function" }, "__main__.other_syscalls.Args": { @@ -6183,11 +6795,51 @@ "type": "const", "value": 0 }, + "__main__.read_write_read": { + "decorators": [ + "external" + ], + "pc": 689, + "type": "function" + }, + "__main__.read_write_read.Args": { + "full_name": "__main__.read_write_read.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__main__.read_write_read.ImplicitArgs": { + "full_name": "__main__.read_write_read.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "__main__.read_write_read.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.read_write_read.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.read_write_read.address": { + "type": "const", + "value": 15 + }, "__main__.recurse": { "decorators": [ "external" ], - "pc": 1724, + "pc": 1971, "type": "function" }, "__main__.recurse.Args": { @@ -6219,7 +6871,7 @@ "decorators": [ "external" ], - "pc": 2447, + "pc": 2694, "type": "function" }, "__main__.recursive_add_value.Args": { @@ -6264,7 +6916,7 @@ "decorators": [ "external" ], - "pc": 1695, + "pc": 1942, "type": "function" }, "__main__.recursive_fail.Args": { @@ -6296,7 +6948,7 @@ "decorators": [ "external" ], - "pc": 1749, + "pc": 1996, "type": "function" }, "__main__.recursive_syscall.Args": { @@ -6345,7 +6997,7 @@ "decorators": [ "external" ], - "pc": 651, + "pc": 771, "type": "function" }, "__main__.return_result.Args": { @@ -6377,7 +7029,7 @@ "decorators": [ "external" ], - "pc": 2519, + "pc": 2766, "type": "function" }, "__main__.send_message.Args": { @@ -6418,7 +7070,7 @@ "decorators": [ "external" ], - "pc": 2349, + "pc": 2596, "type": "function" }, "__main__.set_value.Args": { @@ -6459,7 +7111,7 @@ "decorators": [ "external" ], - "pc": 762, + "pc": 958, "type": "function" }, "__main__.sqrt.Args": { @@ -6498,10 +7150,10 @@ "references": [ { "ap_tracking_data": { - "group": 66, + "group": 81, "offset": 1 }, - "pc": 764, + "pc": 960, "value": "[cast(fp, felt*)]" } ], @@ -6513,29 +7165,65 @@ "references": [ { "ap_tracking_data": { - "group": 66, + "group": 81, "offset": 0 }, - "pc": 762, + "pc": 958, "value": "[cast(fp + (-3), felt*)]" } - ], - "type": "reference" + ], + "type": "reference" + }, + "__main__.storage_read": { + "destination": "starkware.starknet.common.syscalls.storage_read", + "type": "alias" + }, + "__main__.storage_write": { + "destination": "starkware.starknet.common.syscalls.storage_write", + "type": "alias" + }, + "__main__.test_builtins": { + "decorators": [ + "external" + ], + "pc": 726, + "type": "function" + }, + "__main__.test_builtins.Args": { + "full_name": "__main__.test_builtins.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__main__.test_builtins.ImplicitArgs": { + "full_name": "__main__.test_builtins.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 0 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 2, + "type": "struct" }, - "__main__.storage_read": { - "destination": "starkware.starknet.common.syscalls.storage_read", - "type": "alias" + "__main__.test_builtins.Return": { + "cairo_type": "(result: felt)", + "type": "type_definition" }, - "__main__.storage_write": { - "destination": "starkware.starknet.common.syscalls.storage_write", - "type": "alias" + "__main__.test_builtins.SIZEOF_LOCALS": { + "type": "const", + "value": 0 }, "__main__.test_call_contract": { "decorators": [ "external", "raw_output" ], - "pc": 1041, + "pc": 1288, "type": "function" }, "__main__.test_call_contract.Args": { @@ -6584,7 +7272,7 @@ "decorators": [ "external" ], - "pc": 1192, + "pc": 1439, "type": "function" }, "__main__.test_call_contract_fail_with_attr_error_msg.Args": { @@ -6625,7 +7313,7 @@ "decorators": [ "external" ], - "pc": 1358, + "pc": 1605, "type": "function" }, "__main__.test_call_storage_consistency.Args": { @@ -6671,7 +7359,7 @@ "external", "raw_output" ], - "pc": 1117, + "pc": 1364, "type": "function" }, "__main__.test_call_two_contracts.Args": { @@ -6736,7 +7424,7 @@ "decorators": [ "external" ], - "pc": 1496, + "pc": 1743, "type": "function" }, "__main__.test_contract_address.Args": { @@ -6793,7 +7481,7 @@ "decorators": [ "external" ], - "pc": 2023, + "pc": 2270, "type": "function" }, "__main__.test_count_actual_storage_changes.Args": { @@ -6833,7 +7521,7 @@ "decorators": [ "external" ], - "pc": 1246, + "pc": 1493, "type": "function" }, "__main__.test_deploy.Args": { @@ -6886,7 +7574,7 @@ "decorators": [ "external" ], - "pc": 1297, + "pc": 1544, "type": "function" }, "__main__.test_deploy_and_call.Args": { @@ -6951,7 +7639,7 @@ "decorators": [ "external" ], - "pc": 2266, + "pc": 2513, "type": "function" }, "__main__.test_ec_op.Args": { @@ -6995,7 +7683,7 @@ "decorators": [ "external" ], - "pc": 2577, + "pc": 2872, "type": "function" }, "__main__.test_emit_events.Args": { @@ -7056,7 +7744,7 @@ "decorators": [ "external" ], - "pc": 1866, + "pc": 2113, "type": "function" }, "__main__.test_get_block_number.Args": { @@ -7093,7 +7781,7 @@ "decorators": [ "external" ], - "pc": 1890, + "pc": 2137, "type": "function" }, "__main__.test_get_block_timestamp.Args": { @@ -7126,11 +7814,85 @@ "type": "const", "value": 0 }, + "__main__.test_get_caller_address": { + "decorators": [ + "external" + ], + "pc": 2800, + "type": "function" + }, + "__main__.test_get_caller_address.Args": { + "full_name": "__main__.test_get_caller_address.Args", + "members": { + "expected_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "__main__.test_get_caller_address.ImplicitArgs": { + "full_name": "__main__.test_get_caller_address.ImplicitArgs", + "members": { + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "__main__.test_get_caller_address.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.test_get_caller_address.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.test_get_contract_address": { + "decorators": [ + "external" + ], + "pc": 2824, + "type": "function" + }, + "__main__.test_get_contract_address.Args": { + "full_name": "__main__.test_get_contract_address.Args", + "members": { + "expected_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "__main__.test_get_contract_address.ImplicitArgs": { + "full_name": "__main__.test_get_contract_address.ImplicitArgs", + "members": { + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "__main__.test_get_contract_address.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.test_get_contract_address.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, "__main__.test_get_sequencer_address": { "decorators": [ "external" ], - "pc": 1914, + "pc": 2161, "type": "function" }, "__main__.test_get_sequencer_address.Args": { @@ -7167,7 +7929,7 @@ "decorators": [ "external" ], - "pc": 1938, + "pc": 2185, "type": "function" }, "__main__.test_get_tx_info.Args": { @@ -7229,7 +7991,7 @@ "external", "raw_output" ], - "pc": 929, + "pc": 1125, "type": "function" }, "__main__.test_library_call.Args": { @@ -7274,11 +8036,109 @@ "type": "const", "value": 0 }, + "__main__.test_library_call_l1_handler": { + "decorators": [ + "external" + ], + "pc": 889, + "type": "function" + }, + "__main__.test_library_call_l1_handler.Args": { + "full_name": "__main__.test_library_call_l1_handler.Args", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 3 + }, + "calldata_len": { + "cairo_type": "felt", + "offset": 2 + }, + "class_hash": { + "cairo_type": "felt", + "offset": 0 + }, + "selector": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.test_library_call_l1_handler.ImplicitArgs": { + "full_name": "__main__.test_library_call_l1_handler.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.test_library_call_l1_handler.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.test_library_call_l1_handler.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.test_library_call_syntactic_sugar": { + "decorators": [ + "external" + ], + "pc": 1159, + "type": "function" + }, + "__main__.test_library_call_syntactic_sugar.Args": { + "full_name": "__main__.test_library_call_syntactic_sugar.Args", + "members": { + "class_hash": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "__main__.test_library_call_syntactic_sugar.ImplicitArgs": { + "full_name": "__main__.test_library_call_syntactic_sugar.ImplicitArgs", + "members": { + "range_check_ptr": { + "cairo_type": "felt", + "offset": 1 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "__main__.test_library_call_syntactic_sugar.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.test_library_call_syntactic_sugar.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, "__main__.test_long_retdata": { "decorators": [ "external" ], - "pc": 891, + "pc": 1087, "type": "function" }, "__main__.test_long_retdata.Args": { @@ -7305,7 +8165,7 @@ "decorators": [ "external" ], - "pc": 963, + "pc": 1210, "type": "function" }, "__main__.test_nested_library_call.Args": { @@ -7358,7 +8218,7 @@ "decorators": [ "external" ], - "pc": 1408, + "pc": 1655, "type": "function" }, "__main__.test_re_entrance.Args": { @@ -7403,7 +8263,7 @@ "decorators": [ "external" ], - "pc": 1223, + "pc": 1470, "type": "function" }, "__main__.test_replace_class.Args": { @@ -7440,7 +8300,7 @@ "decorators": [ "external" ], - "pc": 786, + "pc": 982, "type": "function" }, "__main__.test_storage_read_write.Args": { @@ -7481,7 +8341,7 @@ "decorators": [ "external" ], - "pc": 1460, + "pc": 1707, "type": "function" }, "__main__.test_storage_var.Args": { @@ -7521,7 +8381,7 @@ "decorators": [ "external" ], - "pc": 1999, + "pc": 2246, "type": "function" }, "__main__.test_tx_version.Args": { @@ -7558,7 +8418,7 @@ "decorators": [ "external" ], - "pc": 1794, + "pc": 2041, "type": "function" }, "__main__.test_write_and_transfer.Args": { @@ -7636,7 +8496,7 @@ }, "__main__.two_counters.addr": { "decorators": [], - "pc": 2075, + "pc": 2322, "type": "function" }, "__main__.two_counters.addr.Args": { @@ -7683,7 +8543,7 @@ }, "__main__.two_counters.read": { "decorators": [], - "pc": 2089, + "pc": 2336, "type": "function" }, "__main__.two_counters.read.Args": { @@ -7734,7 +8594,7 @@ }, "__main__.two_counters.write": { "decorators": [], - "pc": 2109, + "pc": 2356, "type": "function" }, "__main__.two_counters.write.Args": { @@ -7783,7 +8643,7 @@ "decorators": [ "external" ], - "pc": 631, + "pc": 669, "type": "function" }, "__main__.with_arg.Args": { @@ -7815,7 +8675,7 @@ "decorators": [ "external" ], - "pc": 616, + "pc": 654, "type": "function" }, "__main__.without_arg.Args": { @@ -7842,7 +8702,7 @@ "decorators": [ "external" ], - "pc": 823, + "pc": 1019, "type": "function" }, "__main__.write_a_lot.Args": { @@ -7883,7 +8743,7 @@ "decorators": [ "external" ], - "pc": 861, + "pc": 1057, "type": "function" }, "__main__.write_and_revert.Args": { @@ -7924,7 +8784,7 @@ "decorators": [ "external" ], - "pc": 2186, + "pc": 2433, "type": "function" }, "__main__.xor_counters.Args": { @@ -7973,7 +8833,7 @@ "decorators": [ "external" ], - "pc": 2329, + "pc": 2576, "type": "function" }, "__wrappers__.add_signature_to_counters.Args": { @@ -8008,7 +8868,7 @@ "decorators": [ "external" ], - "pc": 2428, + "pc": 2675, "type": "function" }, "__wrappers__.add_value.Args": { @@ -8043,7 +8903,7 @@ "decorators": [ "external" ], - "pc": 2164, + "pc": 2411, "type": "function" }, "__wrappers__.advance_counter.Args": { @@ -8078,7 +8938,7 @@ "decorators": [ "external" ], - "pc": 743, + "pc": 939, "type": "function" }, "__wrappers__.bitwise_and.Args": { @@ -8113,7 +8973,7 @@ "decorators": [ "external" ], - "pc": 1087, + "pc": 1334, "type": "function" }, "__wrappers__.call_execute_directly.Args": { @@ -8148,7 +9008,7 @@ "decorators": [ "external" ], - "pc": 2244, + "pc": 2491, "type": "function" }, "__wrappers__.call_xor_counters.Args": { @@ -8183,7 +9043,7 @@ "decorators": [ "constructor" ], - "pc": 597, + "pc": 635, "type": "function" }, "__wrappers__.constructor.Args": { @@ -8214,11 +9074,46 @@ "destination": "starkware.cairo.common.memcpy.memcpy", "type": "alias" }, + "__wrappers__.deposit": { + "decorators": [ + "l1_handler" + ], + "pc": 868, + "type": "function" + }, + "__wrappers__.deposit.Args": { + "full_name": "__wrappers__.deposit.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.deposit.ImplicitArgs": { + "full_name": "__wrappers__.deposit.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.deposit.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, bitwise_ptr: felt, ec_op_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.deposit.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.deposit.__wrapped_func": { + "destination": "__main__.deposit", + "type": "alias" + }, + "__wrappers__.deposit_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, "__wrappers__.fail": { "decorators": [ "external" ], - "pc": 1681, + "pc": 1928, "type": "function" }, "__wrappers__.fail.Args": { @@ -8253,7 +9148,7 @@ "decorators": [ "external" ], - "pc": 1549, + "pc": 1796, "type": "function" }, "__wrappers__.foo.Args": { @@ -8288,7 +9183,7 @@ "decorators": [ "external" ], - "pc": 2388, + "pc": 2635, "type": "function" }, "__wrappers__.get_value.Args": { @@ -8317,7 +9212,7 @@ }, "__wrappers__.get_value_encode_return": { "decorators": [], - "pc": 2379, + "pc": 2626, "type": "function" }, "__wrappers__.get_value_encode_return.Args": { @@ -8357,7 +9252,7 @@ "decorators": [ "external" ], - "pc": 2501, + "pc": 2748, "type": "function" }, "__wrappers__.increase_value.Args": { @@ -8392,7 +9287,7 @@ "decorators": [ "external" ], - "pc": 1648, + "pc": 1895, "type": "function" }, "__wrappers__.invoke_call_chain.Args": { @@ -8421,7 +9316,7 @@ }, "__wrappers__.invoke_call_chain_encode_return": { "decorators": [], - "pc": 1639, + "pc": 1886, "type": "function" }, "__wrappers__.invoke_call_chain_encode_return.Args": { @@ -8461,7 +9356,7 @@ "decorators": [ "l1_handler" ], - "pc": 715, + "pc": 835, "type": "function" }, "__wrappers__.l1_handler_set_value_and_revert.Args": { @@ -8492,11 +9387,46 @@ "destination": "starkware.cairo.common.memcpy.memcpy", "type": "alias" }, + "__wrappers__.read_write_read": { + "decorators": [ + "external" + ], + "pc": 710, + "type": "function" + }, + "__wrappers__.read_write_read.Args": { + "full_name": "__wrappers__.read_write_read.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.read_write_read.ImplicitArgs": { + "full_name": "__wrappers__.read_write_read.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.read_write_read.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, bitwise_ptr: felt, ec_op_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.read_write_read.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.read_write_read.__wrapped_func": { + "destination": "__main__.read_write_read", + "type": "alias" + }, + "__wrappers__.read_write_read_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, "__wrappers__.recurse": { "decorators": [ "external" ], - "pc": 1732, + "pc": 1979, "type": "function" }, "__wrappers__.recurse.Args": { @@ -8531,7 +9461,7 @@ "decorators": [ "external" ], - "pc": 2470, + "pc": 2717, "type": "function" }, "__wrappers__.recursive_add_value.Args": { @@ -8566,7 +9496,7 @@ "decorators": [ "external" ], - "pc": 1707, + "pc": 1954, "type": "function" }, "__wrappers__.recursive_fail.Args": { @@ -8601,7 +9531,7 @@ "decorators": [ "external" ], - "pc": 1774, + "pc": 2021, "type": "function" }, "__wrappers__.recursive_syscall.Args": { @@ -8636,7 +9566,7 @@ "decorators": [ "external" ], - "pc": 662, + "pc": 782, "type": "function" }, "__wrappers__.return_result.Args": { @@ -8665,7 +9595,7 @@ }, "__wrappers__.return_result_encode_return": { "decorators": [], - "pc": 653, + "pc": 773, "type": "function" }, "__wrappers__.return_result_encode_return.Args": { @@ -8705,7 +9635,7 @@ "decorators": [ "external" ], - "pc": 2535, + "pc": 2782, "type": "function" }, "__wrappers__.send_message.Args": { @@ -8740,7 +9670,7 @@ "decorators": [ "external" ], - "pc": 2355, + "pc": 2602, "type": "function" }, "__wrappers__.set_value.Args": { @@ -8775,7 +9705,7 @@ "decorators": [ "external" ], - "pc": 768, + "pc": 964, "type": "function" }, "__wrappers__.sqrt.Args": { @@ -8802,7 +9732,76 @@ "destination": "__main__.sqrt", "type": "alias" }, - "__wrappers__.sqrt_encode_return.memcpy": { + "__wrappers__.sqrt_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.test_builtins": { + "decorators": [ + "external" + ], + "pc": 755, + "type": "function" + }, + "__wrappers__.test_builtins.Args": { + "full_name": "__wrappers__.test_builtins.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_builtins.ImplicitArgs": { + "full_name": "__wrappers__.test_builtins.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_builtins.Return": { + "cairo_type": "(syscall_ptr: felt, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, bitwise_ptr: felt, ec_op_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.test_builtins.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.test_builtins.__wrapped_func": { + "destination": "__main__.test_builtins", + "type": "alias" + }, + "__wrappers__.test_builtins_encode_return": { + "decorators": [], + "pc": 746, + "type": "function" + }, + "__wrappers__.test_builtins_encode_return.Args": { + "full_name": "__wrappers__.test_builtins_encode_return.Args", + "members": { + "range_check_ptr": { + "cairo_type": "felt", + "offset": 1 + }, + "ret_value": { + "cairo_type": "(result: felt)", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "__wrappers__.test_builtins_encode_return.ImplicitArgs": { + "full_name": "__wrappers__.test_builtins_encode_return.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_builtins_encode_return.Return": { + "cairo_type": "(range_check_ptr: felt, data_len: felt, data: felt*)", + "type": "type_definition" + }, + "__wrappers__.test_builtins_encode_return.SIZEOF_LOCALS": { + "type": "const", + "value": 1 + }, + "__wrappers__.test_builtins_encode_return.memcpy": { "destination": "starkware.cairo.common.memcpy.memcpy", "type": "alias" }, @@ -8811,7 +9810,7 @@ "external", "raw_output" ], - "pc": 1049, + "pc": 1296, "type": "function" }, "__wrappers__.test_call_contract.Args": { @@ -8846,7 +9845,7 @@ "decorators": [ "external" ], - "pc": 1204, + "pc": 1451, "type": "function" }, "__wrappers__.test_call_contract_fail_with_attr_error_msg.Args": { @@ -8881,7 +9880,7 @@ "decorators": [ "external" ], - "pc": 1388, + "pc": 1635, "type": "function" }, "__wrappers__.test_call_storage_consistency.Args": { @@ -8917,7 +9916,7 @@ "external", "raw_output" ], - "pc": 1154, + "pc": 1401, "type": "function" }, "__wrappers__.test_call_two_contracts.Args": { @@ -8952,7 +9951,7 @@ "decorators": [ "external" ], - "pc": 1515, + "pc": 1762, "type": "function" }, "__wrappers__.test_contract_address.Args": { @@ -8981,7 +9980,7 @@ }, "__wrappers__.test_contract_address_encode_return": { "decorators": [], - "pc": 1506, + "pc": 1753, "type": "function" }, "__wrappers__.test_contract_address_encode_return.Args": { @@ -9021,7 +10020,7 @@ "decorators": [ "external" ], - "pc": 2038, + "pc": 2285, "type": "function" }, "__wrappers__.test_count_actual_storage_changes.Args": { @@ -9056,7 +10055,7 @@ "decorators": [ "external" ], - "pc": 1264, + "pc": 1511, "type": "function" }, "__wrappers__.test_deploy.Args": { @@ -9087,7 +10086,7 @@ "decorators": [ "external" ], - "pc": 1323, + "pc": 1570, "type": "function" }, "__wrappers__.test_deploy_and_call.Args": { @@ -9116,7 +10115,7 @@ }, "__wrappers__.test_deploy_and_call_encode_return": { "decorators": [], - "pc": 1314, + "pc": 1561, "type": "function" }, "__wrappers__.test_deploy_and_call_encode_return.Args": { @@ -9154,7 +10153,7 @@ }, "__wrappers__.test_deploy_encode_return": { "decorators": [], - "pc": 1255, + "pc": 1502, "type": "function" }, "__wrappers__.test_deploy_encode_return.Args": { @@ -9194,7 +10193,7 @@ "decorators": [ "external" ], - "pc": 2288, + "pc": 2535, "type": "function" }, "__wrappers__.test_ec_op.Args": { @@ -9229,7 +10228,7 @@ "decorators": [ "external" ], - "pc": 2588, + "pc": 2883, "type": "function" }, "__wrappers__.test_emit_events.Args": { @@ -9264,7 +10263,7 @@ "decorators": [ "external" ], - "pc": 1872, + "pc": 2119, "type": "function" }, "__wrappers__.test_get_block_number.Args": { @@ -9299,7 +10298,7 @@ "decorators": [ "external" ], - "pc": 1896, + "pc": 2143, "type": "function" }, "__wrappers__.test_get_block_timestamp.Args": { @@ -9330,11 +10329,81 @@ "destination": "starkware.cairo.common.memcpy.memcpy", "type": "alias" }, + "__wrappers__.test_get_caller_address": { + "decorators": [ + "external" + ], + "pc": 2806, + "type": "function" + }, + "__wrappers__.test_get_caller_address.Args": { + "full_name": "__wrappers__.test_get_caller_address.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_get_caller_address.ImplicitArgs": { + "full_name": "__wrappers__.test_get_caller_address.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_get_caller_address.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: felt, range_check_ptr: felt, bitwise_ptr: felt, ec_op_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.test_get_caller_address.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.test_get_caller_address.__wrapped_func": { + "destination": "__main__.test_get_caller_address", + "type": "alias" + }, + "__wrappers__.test_get_caller_address_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.test_get_contract_address": { + "decorators": [ + "external" + ], + "pc": 2830, + "type": "function" + }, + "__wrappers__.test_get_contract_address.Args": { + "full_name": "__wrappers__.test_get_contract_address.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_get_contract_address.ImplicitArgs": { + "full_name": "__wrappers__.test_get_contract_address.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_get_contract_address.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: felt, range_check_ptr: felt, bitwise_ptr: felt, ec_op_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.test_get_contract_address.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.test_get_contract_address.__wrapped_func": { + "destination": "__main__.test_get_contract_address", + "type": "alias" + }, + "__wrappers__.test_get_contract_address_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, "__wrappers__.test_get_sequencer_address": { "decorators": [ "external" ], - "pc": 1920, + "pc": 2167, "type": "function" }, "__wrappers__.test_get_sequencer_address.Args": { @@ -9369,7 +10438,7 @@ "decorators": [ "external" ], - "pc": 1975, + "pc": 2222, "type": "function" }, "__wrappers__.test_get_tx_info.Args": { @@ -9405,7 +10474,7 @@ "external", "raw_output" ], - "pc": 937, + "pc": 1133, "type": "function" }, "__wrappers__.test_library_call.Args": { @@ -9436,11 +10505,81 @@ "destination": "starkware.cairo.common.memcpy.memcpy", "type": "alias" }, + "__wrappers__.test_library_call_l1_handler": { + "decorators": [ + "external" + ], + "pc": 900, + "type": "function" + }, + "__wrappers__.test_library_call_l1_handler.Args": { + "full_name": "__wrappers__.test_library_call_l1_handler.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_library_call_l1_handler.ImplicitArgs": { + "full_name": "__wrappers__.test_library_call_l1_handler.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_library_call_l1_handler.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, bitwise_ptr: felt, ec_op_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.test_library_call_l1_handler.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.test_library_call_l1_handler.__wrapped_func": { + "destination": "__main__.test_library_call_l1_handler", + "type": "alias" + }, + "__wrappers__.test_library_call_l1_handler_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.test_library_call_syntactic_sugar": { + "decorators": [ + "external" + ], + "pc": 1191, + "type": "function" + }, + "__wrappers__.test_library_call_syntactic_sugar.Args": { + "full_name": "__wrappers__.test_library_call_syntactic_sugar.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_library_call_syntactic_sugar.ImplicitArgs": { + "full_name": "__wrappers__.test_library_call_syntactic_sugar.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.test_library_call_syntactic_sugar.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: felt, range_check_ptr: felt, bitwise_ptr: felt, ec_op_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.test_library_call_syntactic_sugar.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.test_library_call_syntactic_sugar.__wrapped_func": { + "destination": "__main__.test_library_call_syntactic_sugar", + "type": "alias" + }, + "__wrappers__.test_library_call_syntactic_sugar_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, "__wrappers__.test_long_retdata": { "decorators": [ "external" ], - "pc": 915, + "pc": 1111, "type": "function" }, "__wrappers__.test_long_retdata.Args": { @@ -9469,7 +10608,7 @@ }, "__wrappers__.test_long_retdata_encode_return": { "decorators": [], - "pc": 902, + "pc": 1098, "type": "function" }, "__wrappers__.test_long_retdata_encode_return.Args": { @@ -9509,7 +10648,7 @@ "decorators": [ "external" ], - "pc": 1010, + "pc": 1257, "type": "function" }, "__wrappers__.test_nested_library_call.Args": { @@ -9538,7 +10677,7 @@ }, "__wrappers__.test_nested_library_call_encode_return": { "decorators": [], - "pc": 1001, + "pc": 1248, "type": "function" }, "__wrappers__.test_nested_library_call_encode_return.Args": { @@ -9578,7 +10717,7 @@ "decorators": [ "external" ], - "pc": 1440, + "pc": 1687, "type": "function" }, "__wrappers__.test_re_entrance.Args": { @@ -9613,7 +10752,7 @@ "decorators": [ "external" ], - "pc": 1228, + "pc": 1475, "type": "function" }, "__wrappers__.test_replace_class.Args": { @@ -9648,7 +10787,7 @@ "decorators": [ "external" ], - "pc": 804, + "pc": 1000, "type": "function" }, "__wrappers__.test_storage_read_write.Args": { @@ -9677,7 +10816,7 @@ }, "__wrappers__.test_storage_read_write_encode_return": { "decorators": [], - "pc": 795, + "pc": 991, "type": "function" }, "__wrappers__.test_storage_read_write_encode_return.Args": { @@ -9717,7 +10856,7 @@ "decorators": [ "external" ], - "pc": 1479, + "pc": 1726, "type": "function" }, "__wrappers__.test_storage_var.Args": { @@ -9752,7 +10891,7 @@ "decorators": [ "external" ], - "pc": 2005, + "pc": 2252, "type": "function" }, "__wrappers__.test_tx_version.Args": { @@ -9787,7 +10926,7 @@ "decorators": [ "external" ], - "pc": 1841, + "pc": 2088, "type": "function" }, "__wrappers__.test_write_and_transfer.Args": { @@ -9816,7 +10955,7 @@ }, "__wrappers__.test_write_and_transfer_encode_return": { "decorators": [], - "pc": 1822, + "pc": 2069, "type": "function" }, "__wrappers__.test_write_and_transfer_encode_return.Args": { @@ -9856,7 +10995,7 @@ "decorators": [ "external" ], - "pc": 634, + "pc": 672, "type": "function" }, "__wrappers__.with_arg.Args": { @@ -9891,7 +11030,7 @@ "decorators": [ "external" ], - "pc": 617, + "pc": 655, "type": "function" }, "__wrappers__.without_arg.Args": { @@ -9926,7 +11065,7 @@ "decorators": [ "external" ], - "pc": 842, + "pc": 1038, "type": "function" }, "__wrappers__.write_a_lot.Args": { @@ -9961,7 +11100,7 @@ "decorators": [ "external" ], - "pc": 872, + "pc": 1068, "type": "function" }, "__wrappers__.write_and_revert.Args": { @@ -9996,7 +11135,7 @@ "decorators": [ "external" ], - "pc": 2212, + "pc": 2459, "type": "function" }, "__wrappers__.xor_counters.Args": { @@ -10062,7 +11201,7 @@ }, "starkware.cairo.common.bitwise.bitwise_xor": { "decorators": [], - "pc": 219, + "pc": 237, "type": "function" }, "starkware.cairo.common.bitwise.bitwise_xor.Args": { @@ -10351,7 +11490,7 @@ }, "starkware.cairo.common.ec.assert_on_curve": { "decorators": [], - "pc": 225, + "pc": 243, "type": "function" }, "starkware.cairo.common.ec.assert_on_curve.Args": { @@ -10381,7 +11520,7 @@ }, "starkware.cairo.common.ec.ec_add": { "decorators": [], - "pc": 261, + "pc": 279, "type": "function" }, "starkware.cairo.common.ec.ec_add.Args": { @@ -10415,7 +11554,7 @@ }, "starkware.cairo.common.ec.ec_double": { "decorators": [], - "pc": 238, + "pc": 256, "type": "function" }, "starkware.cairo.common.ec.ec_double.Args": { @@ -10445,7 +11584,7 @@ }, "starkware.cairo.common.ec.ec_op": { "decorators": [], - "pc": 298, + "pc": 316, "type": "function" }, "starkware.cairo.common.ec.ec_op.Args": { @@ -10492,10 +11631,10 @@ "references": [ { "ap_tracking_data": { - "group": 28, + "group": 31, "offset": 0 }, - "pc": 298, + "pc": 316, "value": "[cast(fp + (-5), felt*)]" } ], @@ -10507,10 +11646,10 @@ "references": [ { "ap_tracking_data": { - "group": 28, + "group": 31, "offset": 0 }, - "pc": 298, + "pc": 316, "value": "[cast(fp + (-7), starkware.cairo.common.ec_point.EcPoint*)]" } ], @@ -10522,10 +11661,10 @@ "references": [ { "ap_tracking_data": { - "group": 28, + "group": 31, "offset": 0 }, - "pc": 298, + "pc": 316, "value": "[cast(fp + (-4), starkware.cairo.common.ec_point.EcPoint*)]" } ], @@ -10537,10 +11676,10 @@ "references": [ { "ap_tracking_data": { - "group": 28, + "group": 31, "offset": 2 }, - "pc": 306, + "pc": 324, "value": "[cast(fp, starkware.cairo.common.ec_point.EcPoint*)]" } ], @@ -10637,7 +11776,7 @@ }, "starkware.cairo.common.hash_state.hash_felts": { "decorators": [], - "pc": 426, + "pc": 444, "type": "function" }, "starkware.cairo.common.hash_state.hash_felts.Args": { @@ -10676,7 +11815,7 @@ }, "starkware.cairo.common.hash_state.hash_felts_no_padding": { "decorators": [], - "pc": 401, + "pc": 419, "type": "function" }, "starkware.cairo.common.hash_state.hash_felts_no_padding.Args": { @@ -10737,12 +11876,12 @@ "value": 1 }, "starkware.cairo.common.hash_state.hash_felts_no_padding.hash_loop": { - "pc": 414, + "pc": 432, "type": "label" }, "starkware.cairo.common.hash_state.hash_finalize": { "decorators": [], - "pc": 395, + "pc": 413, "type": "function" }, "starkware.cairo.common.hash_state.hash_finalize.Args": { @@ -10777,7 +11916,7 @@ }, "starkware.cairo.common.hash_state.hash_init": { "decorators": [], - "pc": 342, + "pc": 360, "type": "function" }, "starkware.cairo.common.hash_state.hash_init.Args": { @@ -10802,7 +11941,7 @@ }, "starkware.cairo.common.hash_state.hash_update": { "decorators": [], - "pc": 352, + "pc": 370, "type": "function" }, "starkware.cairo.common.hash_state.hash_update.Args": { @@ -10845,7 +11984,7 @@ }, "starkware.cairo.common.hash_state.hash_update_single": { "decorators": [], - "pc": 368, + "pc": 386, "type": "function" }, "starkware.cairo.common.hash_state.hash_update_single.Args": { @@ -10884,7 +12023,7 @@ }, "starkware.cairo.common.hash_state.hash_update_with_hashchain": { "decorators": [], - "pc": 384, + "pc": 402, "type": "function" }, "starkware.cairo.common.hash_state.hash_update_with_hashchain.Args": { @@ -10976,7 +12115,7 @@ "decorators": [ "known_ap_change" ], - "pc": 166, + "pc": 184, "type": "function" }, "starkware.cairo.common.math.assert_250_bit.Args": { @@ -11027,10 +12166,10 @@ "references": [ { "ap_tracking_data": { - "group": 21, + "group": 24, "offset": 0 }, - "pc": 166, + "pc": 184, "value": "[cast([fp + (-4)] + 1, felt*)]" } ], @@ -11042,10 +12181,10 @@ "references": [ { "ap_tracking_data": { - "group": 21, + "group": 24, "offset": 0 }, - "pc": 166, + "pc": 184, "value": "[cast([fp + (-4)], felt*)]" } ], @@ -11054,6 +12193,95 @@ "starkware.cairo.common.math.assert_250_bit.value": { "cairo_type": "felt", "full_name": "starkware.cairo.common.math.assert_250_bit.value", + "references": [ + { + "ap_tracking_data": { + "group": 24, + "offset": 0 + }, + "pc": 184, + "value": "[cast(fp + (-3), felt*)]" + } + ], + "type": "reference" + }, + "starkware.cairo.common.math.assert_le": { + "decorators": [], + "pc": 170, + "type": "function" + }, + "starkware.cairo.common.math.assert_le.Args": { + "full_name": "starkware.cairo.common.math.assert_le.Args", + "members": { + "a": { + "cairo_type": "felt", + "offset": 0 + }, + "b": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.cairo.common.math.assert_le.ImplicitArgs": { + "full_name": "starkware.cairo.common.math.assert_le.ImplicitArgs", + "members": { + "range_check_ptr": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.cairo.common.math.assert_le.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "starkware.cairo.common.math.assert_le.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.cairo.common.math.assert_nn": { + "decorators": [], + "pc": 166, + "type": "function" + }, + "starkware.cairo.common.math.assert_nn.Args": { + "full_name": "starkware.cairo.common.math.assert_nn.Args", + "members": { + "a": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.cairo.common.math.assert_nn.ImplicitArgs": { + "full_name": "starkware.cairo.common.math.assert_nn.ImplicitArgs", + "members": { + "range_check_ptr": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.cairo.common.math.assert_nn.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "starkware.cairo.common.math.assert_nn.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.cairo.common.math.assert_nn.a": { + "cairo_type": "felt", + "full_name": "starkware.cairo.common.math.assert_nn.a", "references": [ { "ap_tracking_data": { @@ -11066,6 +12294,45 @@ ], "type": "reference" }, + "starkware.cairo.common.math.assert_nn_le": { + "decorators": [], + "pc": 175, + "type": "function" + }, + "starkware.cairo.common.math.assert_nn_le.Args": { + "full_name": "starkware.cairo.common.math.assert_nn_le.Args", + "members": { + "a": { + "cairo_type": "felt", + "offset": 0 + }, + "b": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.cairo.common.math.assert_nn_le.ImplicitArgs": { + "full_name": "starkware.cairo.common.math.assert_nn_le.ImplicitArgs", + "members": { + "range_check_ptr": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.cairo.common.math.assert_nn_le.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "starkware.cairo.common.math.assert_nn_le.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, "starkware.cairo.common.math.assert_not_zero": { "decorators": [], "pc": 161, @@ -11287,7 +12554,7 @@ }, "starkware.starknet.common.messages.send_message_to_l1": { "decorators": [], - "pc": 333, + "pc": 351, "type": "function" }, "starkware.starknet.common.messages.send_message_to_l1.Args": { @@ -11334,18 +12601,18 @@ "references": [ { "ap_tracking_data": { - "group": 32, + "group": 35, "offset": 0 }, - "pc": 333, + "pc": 351, "value": "[cast(fp + (-6), felt**)]" }, { "ap_tracking_data": { - "group": 32, + "group": 35, "offset": 1 }, - "pc": 339, + "pc": 357, "value": "cast([fp + (-6)] + 4, felt*)" } ], @@ -11367,7 +12634,7 @@ "decorators": [ "known_ap_change" ], - "pc": 179, + "pc": 197, "type": "function" }, "starkware.starknet.common.storage.normalize_address.Args": { @@ -11406,10 +12673,10 @@ "references": [ { "ap_tracking_data": { - "group": 22, + "group": 25, "offset": 0 }, - "pc": 179, + "pc": 197, "value": "[cast(fp + (-3), felt*)]" } ], @@ -11421,10 +12688,10 @@ "references": [ { "ap_tracking_data": { - "group": 22, + "group": 25, "offset": 2 }, - "pc": 199, + "pc": 217, "value": "[cast(ap + (-1), felt*)]" } ], @@ -11436,10 +12703,10 @@ "references": [ { "ap_tracking_data": { - "group": 22, + "group": 25, "offset": 1 }, - "pc": 181, + "pc": 199, "value": "[cast(ap + (-1), felt*)]" } ], @@ -13025,7 +14292,7 @@ }, "starkware.starknet.core.os.contract_address.contract_address.get_contract_address": { "decorators": [], - "pc": 437, + "pc": 455, "type": "function" }, "starkware.starknet.core.os.contract_address.contract_address.get_contract_address.Args": { @@ -13166,7 +14433,7 @@ }, "starkware.starknet.core.test_contract.test_contract_interface.TestContract.add_value": { "decorators": [], - "pc": 511, + "pc": 549, "type": "function" }, "starkware.starknet.core.test_contract.test_contract_interface.TestContract.add_value.Args": { @@ -13217,7 +14484,7 @@ }, "starkware.starknet.core.test_contract.test_contract_interface.TestContract.get_value": { "decorators": [], - "pc": 488, + "pc": 526, "type": "function" }, "starkware.starknet.core.test_contract.test_contract_interface.TestContract.get_value.Args": { @@ -13262,13 +14529,60 @@ "destination": "starkware.starknet.common.syscalls.library_call", "type": "alias" }, + "starkware.starknet.core.test_contract.test_contract_interface.TestContract.library_call_set_value": { + "decorators": [], + "pc": 506, + "type": "function" + }, + "starkware.starknet.core.test_contract.test_contract_interface.TestContract.library_call_set_value.Args": { + "full_name": "starkware.starknet.core.test_contract.test_contract_interface.TestContract.library_call_set_value.Args", + "members": { + "address": { + "cairo_type": "felt", + "offset": 1 + }, + "class_hash": { + "cairo_type": "felt", + "offset": 0 + }, + "value": { + "cairo_type": "felt", + "offset": 2 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.core.test_contract.test_contract_interface.TestContract.library_call_set_value.ImplicitArgs": { + "full_name": "starkware.starknet.core.test_contract.test_contract_interface.TestContract.library_call_set_value.ImplicitArgs", + "members": { + "range_check_ptr": { + "cairo_type": "felt", + "offset": 1 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.core.test_contract.test_contract_interface.TestContract.library_call_set_value.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "starkware.starknet.core.test_contract.test_contract_interface.TestContract.library_call_set_value.SIZEOF_LOCALS": { + "type": "const", + "value": 1 + }, "starkware.starknet.core.test_contract.test_contract_interface.TestContract.memcpy": { "destination": "starkware.cairo.common.memcpy.memcpy", "type": "alias" }, "starkware.starknet.core.test_contract.test_contract_interface.TestContract.recursive_add_value": { "decorators": [], - "pc": 530, + "pc": 568, "type": "function" }, "starkware.starknet.core.test_contract.test_contract_interface.TestContract.recursive_add_value.Args": { @@ -13315,7 +14629,7 @@ }, "starkware.starknet.core.test_contract.test_contract_interface.TestContract.set_value": { "decorators": [], - "pc": 468, + "pc": 486, "type": "function" }, "starkware.starknet.core.test_contract.test_contract_interface.TestContract.set_value.Args": { @@ -13519,98 +14833,106 @@ }, { "ap_tracking_data": { - "group": 21, + "group": 24, "offset": 0 }, - "pc": 166, + "pc": 184, + "value": "[cast(fp + (-3), felt*)]" + }, + { + "ap_tracking_data": { + "group": 24, + "offset": 0 + }, + "pc": 184, "value": "[cast([fp + (-4)], felt*)]" }, { "ap_tracking_data": { - "group": 21, + "group": 24, "offset": 0 }, - "pc": 166, + "pc": 184, "value": "[cast([fp + (-4)] + 1, felt*)]" }, { "ap_tracking_data": { - "group": 22, + "group": 25, "offset": 0 }, - "pc": 179, + "pc": 197, "value": "[cast(fp + (-3), felt*)]" }, { "ap_tracking_data": { - "group": 22, + "group": 25, "offset": 1 }, - "pc": 181, + "pc": 199, "value": "[cast(ap + (-1), felt*)]" }, { "ap_tracking_data": { - "group": 22, + "group": 25, "offset": 2 }, - "pc": 199, + "pc": 217, "value": "[cast(ap + (-1), felt*)]" }, { "ap_tracking_data": { - "group": 28, + "group": 31, "offset": 0 }, - "pc": 298, + "pc": 316, "value": "[cast(fp + (-7), starkware.cairo.common.ec_point.EcPoint*)]" }, { "ap_tracking_data": { - "group": 28, + "group": 31, "offset": 0 }, - "pc": 298, + "pc": 316, "value": "[cast(fp + (-5), felt*)]" }, { "ap_tracking_data": { - "group": 28, + "group": 31, "offset": 0 }, - "pc": 298, + "pc": 316, "value": "[cast(fp + (-4), starkware.cairo.common.ec_point.EcPoint*)]" }, { "ap_tracking_data": { - "group": 28, + "group": 31, "offset": 2 }, - "pc": 306, + "pc": 324, "value": "[cast(fp, starkware.cairo.common.ec_point.EcPoint*)]" }, { "ap_tracking_data": { - "group": 32, + "group": 35, "offset": 0 }, - "pc": 333, + "pc": 351, "value": "[cast(fp + (-6), felt**)]" }, { "ap_tracking_data": { - "group": 66, + "group": 81, "offset": 0 }, - "pc": 762, + "pc": 958, "value": "[cast(fp + (-3), felt*)]" }, { "ap_tracking_data": { - "group": 66, + "group": 81, "offset": 1 }, - "pc": 764, + "pc": 960, "value": "[cast(fp, felt*)]" } ] diff --git a/crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo b/crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo index 9c476eee9b8..f0209a09f63 100644 --- a/crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo +++ b/crates/blockifier_test_utils/resources/feature_contracts/cairo0/test_contract.cairo @@ -6,7 +6,8 @@ from starkware.cairo.common.bool import FALSE from starkware.cairo.common.cairo_builtins import BitwiseBuiltin, HashBuiltin, EcOpBuiltin from starkware.cairo.common.ec import ec_op from starkware.cairo.common.ec_point import EcPoint -from starkware.cairo.common.math import assert_not_zero +from starkware.cairo.common.hash import hash2 +from starkware.cairo.common.math import assert_nn_le, assert_not_zero from starkware.cairo.common.memcpy import memcpy from starkware.cairo.common.registers import get_fp_and_pc from starkware.starknet.common.messages import send_message_to_l1 @@ -55,6 +56,26 @@ func with_arg(num: felt) { return (); } +@external +func read_write_read{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*}() { + const address = 15; + + let (value) = storage_read(address=address); + storage_write(address=address, value=value + 1); + let (new_value) = storage_read(address=address); + + assert new_value = value + 1; + return (); +} + +@external +func test_builtins{pedersen_ptr: HashBuiltin*, range_check_ptr}() -> (result: felt) { + assert_nn_le(17, 85); + let (result) = hash2{hash_ptr=pedersen_ptr}(x=1, y=2); + assert result = 2592987851775965742543459319508348457290966253241455514226127639100457844774; + return (result=result); +} + @external func return_result(num: felt) -> (result: felt) { return (result=num); @@ -81,6 +102,26 @@ func l1_handler_set_value_and_revert{syscall_ptr: felt*}( return (); } +@l1_handler +func deposit{syscall_ptr: felt*, range_check_ptr, pedersen_ptr: HashBuiltin*}( + from_address: felt, amount: felt +) { + advance_counter(index=from_address, diff_0=amount, diff_1=0); + return (); +} + +@external +func test_library_call_l1_handler{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}( + class_hash: felt, selector: felt, calldata_len: felt, calldata: felt* +) { + library_call_l1_handler( + class_hash=class_hash, + function_selector=selector, + calldata_size=calldata_len, + calldata=calldata, + ); + return (); +} @external func bitwise_and{bitwise_ptr: BitwiseBuiltin*}(x: felt, y: felt) { @@ -154,6 +195,21 @@ func test_library_call{syscall_ptr: felt*}( return (retdata_size=retdata_size, retdata=retdata); } +@external +func test_library_call_syntactic_sugar{syscall_ptr: felt*, range_check_ptr}(class_hash: felt) { + // Set value in this contract context. + set_value(address=444, value=555); + let (value) = storage_read(address=444); + assert value = 555; + + // Set value in this contract context using library call. + TestContract.library_call_set_value(class_hash=class_hash, address=444, value=666); + let (value) = storage_read(address=444); + assert value = 666; + + return (); +} + @external func test_nested_library_call{syscall_ptr: felt*}( class_hash: felt, lib_selector: felt, nested_selector: felt, calldata_len: felt, calldata: felt* @@ -706,6 +762,20 @@ func send_message{syscall_ptr: felt*}(to_address: felt) { return (); } +@external +func test_get_caller_address{syscall_ptr: felt*}(expected_address: felt) { + let (caller_address) = get_caller_address(); + assert caller_address = expected_address; + return (); +} + +@external +func test_get_contract_address{syscall_ptr: felt*}(expected_address: felt) { + let (contract_address) = get_contract_address_syscall(); + assert contract_address = expected_address; + return (); +} + func emit_event_recurse{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}( counter: felt, keys_len: felt, keys: felt*, data_len: felt, data: felt* ) { diff --git a/crates/starknet_os/src/io/os_output.rs b/crates/starknet_os/src/io/os_output.rs index 0ab263a4680..4557e445384 100644 --- a/crates/starknet_os/src/io/os_output.rs +++ b/crates/starknet_os/src/io/os_output.rs @@ -111,12 +111,12 @@ pub fn message_l1_from_output_iter>( // An L1 to L2 message header, the message payload is concatenated to the end of the header. pub struct MessageToL2 { // The L1 address of the contract sending the message. - pub(crate) from_address: EthAddress, + pub from_address: EthAddress, // The L2 address of the contract receiving the message. - pub(crate) to_address: ContractAddress, - pub(crate) nonce: Nonce, - pub(crate) selector: EntryPointSelector, - pub(crate) payload: L1ToL2Payload, + pub to_address: ContractAddress, + pub nonce: Nonce, + pub selector: EntryPointSelector, + pub payload: L1ToL2Payload, } impl TryFromOutputIter for MessageToL2 { diff --git a/crates/starknet_os_flow_tests/src/initial_state.rs b/crates/starknet_os_flow_tests/src/initial_state.rs index cdcf0d3be5c..408936867a7 100644 --- a/crates/starknet_os_flow_tests/src/initial_state.rs +++ b/crates/starknet_os_flow_tests/src/initial_state.rs @@ -298,8 +298,30 @@ pub(crate) fn get_deploy_contract_tx_and_address( nonce: Nonce, resource_bounds: ValidResourceBounds, ) -> (Transaction, ContractAddress) { - let contract_address_salt = Felt::ONE; - let calldata = [class_hash.0, contract_address_salt, ctor_calldata.0.len().into()] + let (deploy_contract_tx, contract_address) = get_deploy_contract_tx_and_address_with_salt( + class_hash, + ctor_calldata, + nonce, + resource_bounds, + // Default salt. + ContractAddressSalt(Felt::ONE), + ); + ( + Transaction::new_for_sequencing(StarknetAPITransaction::Account( + AccountTransaction::Invoke(deploy_contract_tx), + )), + contract_address, + ) +} + +pub(crate) fn get_deploy_contract_tx_and_address_with_salt( + class_hash: ClassHash, + ctor_calldata: Calldata, + nonce: Nonce, + resource_bounds: ValidResourceBounds, + contract_address_salt: ContractAddressSalt, +) -> (InvokeTransaction, ContractAddress) { + let calldata = [class_hash.0, contract_address_salt.0, ctor_calldata.0.len().into()] .iter() .chain(ctor_calldata.0.iter()) .cloned() @@ -322,18 +344,13 @@ pub(crate) fn get_deploy_contract_tx_and_address( InvokeTransaction::create(deploy_contract_tx, &CHAIN_ID_FOR_TESTS).unwrap(); let contract_address = calculate_contract_address( - ContractAddressSalt(contract_address_salt), + contract_address_salt, class_hash, &ctor_calldata, *FUNDED_ACCOUNT_ADDRESS, ) .unwrap(); - ( - Transaction::new_for_sequencing(StarknetAPITransaction::Account( - AccountTransaction::Invoke(deploy_contract_tx), - )), - contract_address, - ) + (deploy_contract_tx, contract_address) } pub(crate) fn get_deploy_fee_token_tx_and_address(nonce: Nonce) -> (Transaction, ContractAddress) { diff --git a/crates/starknet_os_flow_tests/src/test_manager.rs b/crates/starknet_os_flow_tests/src/test_manager.rs index 56bbb4c5960..966b43d482b 100644 --- a/crates/starknet_os_flow_tests/src/test_manager.rs +++ b/crates/starknet_os_flow_tests/src/test_manager.rs @@ -280,6 +280,10 @@ impl TestManager { self.per_block_transactions.push(vec![]); } + pub(crate) fn total_txs(&self) -> usize { + self.per_block_transactions.iter().map(|block| block.len()).sum() + } + fn last_block_txs_mut(&mut self) -> &mut Vec { self.per_block_transactions .last_mut() @@ -462,22 +466,29 @@ impl TestManager { /// Verifies all the execution outputs are as expected w.r.t. revert reasons. fn verify_execution_outputs( + block_index: usize, revert_reasons: &[Option], execution_outputs: &[(TransactionExecutionInfo, StateMaps)], ) { assert_eq!(revert_reasons.len(), execution_outputs.len()); - for (revert_reason, (execution_info, _)) in - revert_reasons.iter().zip(execution_outputs.iter()) + for ((i, revert_reason), (execution_info, _)) in + revert_reasons.iter().enumerate().zip(execution_outputs.iter()) { + let preamble = format!("Block {block_index}, transaction {i}:"); if let Some(revert_reason) = revert_reason { let actual_revert_reason = execution_info.revert_error.as_ref().unwrap().to_string(); assert!( actual_revert_reason.contains(revert_reason), - "Expected '{revert_reason}' to be in revert string:\n'{actual_revert_reason}'" + "{preamble} Expected '{revert_reason}' to be in revert \ + string:\n'{actual_revert_reason}'" ); } else { - assert!(execution_info.revert_error.is_none()); + assert!( + execution_info.revert_error.is_none(), + "{preamble} Expected no revert error, got: {}.", + execution_info.revert_error.as_ref().unwrap() + ); } } } @@ -545,8 +556,8 @@ impl TestManager { "use_kzg_da flag in block contexts must match the test parameter." ); let mut alias_keys = HashSet::new(); - for (block_txs_with_reason, block_context) in - per_block_txs.into_iter().zip(block_contexts.into_iter()) + for ((block_index, block_txs_with_reason), block_context) in + per_block_txs.into_iter().enumerate().zip(block_contexts.into_iter()) { let (block_txs, revert_reasons): (Vec<_>, Vec<_>) = block_txs_with_reason .into_iter() @@ -557,7 +568,7 @@ impl TestManager { // Execute the transactions. let ExecutionOutput { execution_outputs, block_summary, mut final_state } = execute_transactions(state, &block_txs, block_context); - Self::verify_execution_outputs(&revert_reasons, &execution_outputs); + Self::verify_execution_outputs(block_index, &revert_reasons, &execution_outputs); let extended_state_diff = final_state.cache.borrow().extended_state_diff(); // Update the wrapped state. let state_diff = final_state.to_state_diff().unwrap(); diff --git a/crates/starknet_os_flow_tests/src/tests.rs b/crates/starknet_os_flow_tests/src/tests.rs index 90303e8d83b..789df63da50 100644 --- a/crates/starknet_os_flow_tests/src/tests.rs +++ b/crates/starknet_os_flow_tests/src/tests.rs @@ -1,5 +1,5 @@ use std::collections::HashMap; -use std::sync::LazyLock; +use std::sync::{Arc, LazyLock}; use blockifier::test_utils::dict_state_reader::DictStateReader; use blockifier_test_utils::cairo_versions::{CairoVersion, RunnableCairo1}; @@ -8,18 +8,21 @@ use blockifier_test_utils::contracts::FeatureContract; use rstest::rstest; use starknet_api::abi::abi_utils::{get_storage_var_address, selector_from_name}; use starknet_api::contract_class::compiled_class_hash::HashVersion; -use starknet_api::core::{calculate_contract_address, Nonce}; +use starknet_api::core::{calculate_contract_address, ClassHash, EthAddress, Nonce, PatriciaKey}; use starknet_api::executable_transaction::{ DeclareTransaction, L1HandlerTransaction as ExecutableL1HandlerTransaction, }; use starknet_api::execution_resources::GasAmount; +use starknet_api::state::StorageKey; use starknet_api::test_utils::declare::declare_tx; use starknet_api::test_utils::{ CHAIN_ID_FOR_TESTS, + CURRENT_BLOCK_TIMESTAMP, DEFAULT_STRK_L1_DATA_GAS_PRICE, DEFAULT_STRK_L1_GAS_PRICE, DEFAULT_STRK_L2_GAS_PRICE, + TEST_SEQUENCER_ADDRESS, }; use starknet_api::transaction::constants::DEPLOY_CONTRACT_FUNCTION_ENTRY_POINT_NAME; use starknet_api::transaction::fields::{ @@ -28,21 +31,36 @@ use starknet_api::transaction::fields::{ ContractAddressSalt, Fee, ResourceBounds, + TransactionSignature, ValidResourceBounds, }; -use starknet_api::transaction::L1HandlerTransaction; -use starknet_api::{calldata, declare_tx_args, invoke_tx_args}; +use starknet_api::transaction::{ + L1HandlerTransaction, + L1ToL2Payload, + L2ToL1Payload, + MessageToL1, + TransactionVersion, +}; +use starknet_api::{calldata, declare_tx_args, invoke_tx_args, storage_key}; use starknet_committer::block_committer::input::{ StarknetStorageKey, StarknetStorageValue, StateDiff, }; use starknet_committer::patricia_merkle_tree::types::CompiledClassHash; +use starknet_os::io::os_output::MessageToL2; use starknet_types_core::felt::Felt; -use crate::initial_state::create_default_initial_state_data; +use crate::initial_state::{ + create_default_initial_state_data, + get_deploy_contract_tx_and_address_with_salt, +}; use crate::test_manager::{TestManager, TestParameters, FUNDED_ACCOUNT_ADDRESS}; -use crate::utils::{divide_vec_into_n_parts, get_class_info_of_feature_contract}; +use crate::utils::{ + divide_vec_into_n_parts, + get_class_hash_of_feature_contract, + get_class_info_of_feature_contract, +}; pub(crate) static NON_TRIVIAL_RESOURCE_BOUNDS: LazyLock = LazyLock::new(|| { @@ -374,3 +392,401 @@ async fn test_reverted_l1_handler_tx( assert!(test_output.expected_values.messages_to_l2.is_empty()); test_output.perform_default_validations(); } + +#[rstest] +#[tokio::test] +async fn test_os_logic( + #[values(1, 3)] n_blocks_in_multi_block: usize, + #[values(None, Some(vec![Felt::ONE, Felt::TWO]))] private_keys: Option>, +) { + let (mut test_manager, _) = + TestManager::::new_with_default_initial_state([]).await; + let n_expected_txs = 29; + + // Declare a Cairo 0 test contract. + let cairo0_test_contract = FeatureContract::TestContract(CairoVersion::Cairo0); + let test_class_hash = get_class_hash_of_feature_contract(cairo0_test_contract); + let declare_args = declare_tx_args! { + version: TransactionVersion::ZERO, + max_fee: Fee(1_000_000_000_000_000), + class_hash: ClassHash(test_class_hash.0), + sender_address: *FUNDED_ACCOUNT_ADDRESS, + }; + let account_declare_tx = declare_tx(declare_args); + let class_info = get_class_info_of_feature_contract(cairo0_test_contract); + let tx = + DeclareTransaction::create(account_declare_tx, class_info, &CHAIN_ID_FOR_TESTS).unwrap(); + test_manager + .add_cairo0_declare_tx(tx, get_class_hash_of_feature_contract(cairo0_test_contract)); + + // Deploy some instances of the deprecated (cairo0) test contract. + let mut contract_addresses = Vec::new(); + for (salt, ctor_calldata) in + std::iter::zip([17u8, 42, 53], [[321u16, 543], [111, 987], [444, 0]]) + { + let contract_address_salt = ContractAddressSalt(Felt::from(salt)); + let (deploy_tx, address) = get_deploy_contract_tx_and_address_with_salt( + test_class_hash, + Calldata(Arc::new(ctor_calldata.into_iter().map(Felt::from).collect())), + test_manager.next_nonce(*FUNDED_ACCOUNT_ADDRESS), + *NON_TRIVIAL_RESOURCE_BOUNDS, + contract_address_salt, + ); + contract_addresses.push(address); + test_manager.add_invoke_tx(deploy_tx, None); + } + + // Call set_value(address=85, value=47) on the first contract. + // Used to test normal value update and make sure it is written to on-chain data. + let calldata = create_calldata( + contract_addresses[0], + "test_storage_read_write", + &[Felt::from(85), Felt::from(47)], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Call set_value(address=81, value=0) on the first contract. + // Used to test redundant value update (0 -> 0) and make sure it is not written to on-chain + // data. + let calldata = create_calldata( + contract_addresses[0], + "test_storage_read_write", + &[Felt::from(81), Felt::ZERO], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Call set_value(address=97, value=0). + // Used to test redundant value update (0 -> 0) in contract with only redundant updates + // and make sure the whole contract is not written to on-chain data. + let calldata = create_calldata( + contract_addresses[2], + "test_storage_read_write", + &[Felt::from(97), Felt::ZERO], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + let calldata = create_calldata(contract_addresses[1], "read_write_read", &[]); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + let calldata = create_calldata(contract_addresses[0], "test_builtins", &[]); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Call test_get_block_timestamp with the current (testing) block timestamp. + let calldata = create_calldata( + contract_addresses[1], + "test_get_block_timestamp", + &[Felt::from(CURRENT_BLOCK_TIMESTAMP)], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // TODO(Yoni): test the effect of the event emission on the block hash, once calculated in the + // OS. + let calldata = create_calldata( + contract_addresses[1], + "test_emit_events", + // n_events, keys_len, keys, data_len, data. + &[Felt::ONE, Felt::ONE, Felt::from(1991), Felt::ONE, Felt::from(2021)], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Calculate the block number of the next transaction. + let txs_per_block = n_expected_txs / n_blocks_in_multi_block; + // Calculate the block number of tx 'len(txs) + 1' without the added empty block. + let mut block_number_offset = (test_manager.total_txs() + 1) / txs_per_block; + if block_number_offset * txs_per_block < test_manager.total_txs() + 1 { + block_number_offset += 1; + } + // If the block number is the last then we added an empty block before this block so its + // block number is `n_blocks_in_multi_block + 1` + if n_blocks_in_multi_block > 1 && block_number_offset == n_blocks_in_multi_block { + block_number_offset = n_blocks_in_multi_block + 1; + } + + // Call test_get_block_number(expected_block_number). + let expected_block_number = test_manager.initial_state.next_block_number.0 - 1 + + u64::try_from(block_number_offset).unwrap(); + let calldata = create_calldata( + contract_addresses[0], + "test_get_block_number", + &[Felt::from(expected_block_number)], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Call contract -> send message to L1. + let inner_calldata = [Felt::from(85)]; + let calldata = create_calldata( + contract_addresses[0], + "test_call_contract", + &[ + **contract_addresses[0], + selector_from_name("send_message").0, + inner_calldata.len().into(), + inner_calldata[0], + ], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + let expected_message_to_l1 = MessageToL1 { + from_address: contract_addresses[0], + to_address: EthAddress::try_from(Felt::from(85)).unwrap(), + payload: L2ToL1Payload(vec![Felt::from(12), Felt::from(34)]), + }; + + // Test get_caller_address syscall. + let calldata = create_calldata( + contract_addresses[0], + "test_call_contract", + &[ + *contract_addresses[1].0.key(), + selector_from_name("test_get_caller_address").0, + Felt::ONE, // Inner calldata length. + **contract_addresses[0], // Expected caller address. + ], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + let calldata = create_calldata( + contract_addresses[0], + "test_get_contract_address", + &[**contract_addresses[0]], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Delegate proxy tests. + + let delegate_proxy_contract = FeatureContract::DelegateProxy; + + // Declare and deploy the delegate proxy contract. + let delegate_proxy_class_hash = get_class_hash_of_feature_contract(delegate_proxy_contract); + let delegate_proxy_declare_tx = declare_tx(declare_tx_args! { + version: TransactionVersion::ZERO, + sender_address: *FUNDED_ACCOUNT_ADDRESS, + class_hash: delegate_proxy_class_hash, + max_fee: Fee(1_000_000_000_000_000), + }); + let class_info = get_class_info_of_feature_contract(delegate_proxy_contract); + let tx = DeclareTransaction::create(delegate_proxy_declare_tx, class_info, &CHAIN_ID_FOR_TESTS) + .unwrap(); + test_manager.add_cairo0_declare_tx(tx, delegate_proxy_class_hash); + + let contract_address_salt = ContractAddressSalt(Felt::ZERO); + let (deploy_tx, delegate_proxy_address) = get_deploy_contract_tx_and_address_with_salt( + delegate_proxy_class_hash, + Calldata::default(), + test_manager.next_nonce(*FUNDED_ACCOUNT_ADDRESS), + *NON_TRIVIAL_RESOURCE_BOUNDS, + contract_address_salt, + ); + test_manager.add_invoke_tx(deploy_tx, None); + + // Set implementation to the test contract. + let calldata = + create_calldata(delegate_proxy_address, "set_implementation_hash", &[test_class_hash.0]); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Call test_get_contract_address(expected_address=delegate_proxy_address) through the delegate + // proxy. + let calldata = create_calldata( + delegate_proxy_address, + "test_get_contract_address", + &[**delegate_proxy_address], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Call set_value(address=123, value=456) through the delegate proxy. + let calldata = create_calldata( + delegate_proxy_address, + "test_storage_read_write", + &[Felt::from(123), Felt::from(456)], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Call test_get_caller_address(expected_address=account_address) through the delegate proxy. + let calldata = create_calldata( + delegate_proxy_address, + "test_get_caller_address", + &[***FUNDED_ACCOUNT_ADDRESS], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // call_contract -> get_sequencer_address. + let calldata = create_calldata( + delegate_proxy_address, + "test_call_contract", + &[ + **delegate_proxy_address, + selector_from_name("test_get_sequencer_address").0, + Felt::ONE, + Felt::from_hex_unchecked(TEST_SEQUENCER_ADDRESS), + ], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Invoke the l1_handler deposit(from_address=85, amount=2) through the delegate proxy, and + // define the expected consumed message. + let l1_handler_calldata = calldata![Felt::from(85), Felt::TWO]; + let l1_handler_nonce = Nonce::default(); + let l1_handler_selector = selector_from_name("deposit"); + let tx = ExecutableL1HandlerTransaction::create( + L1HandlerTransaction { + version: L1HandlerTransaction::VERSION, + nonce: l1_handler_nonce, + contract_address: delegate_proxy_address, + entry_point_selector: l1_handler_selector, + calldata: l1_handler_calldata.clone(), + }, + &CHAIN_ID_FOR_TESTS, + Fee(1_000_000), + ) + .unwrap(); + test_manager.add_l1_handler_tx(tx, None); + let expected_message_to_l2 = MessageToL2 { + from_address: EthAddress::try_from(l1_handler_calldata.0[0]).unwrap(), + to_address: delegate_proxy_address, + payload: L1ToL2Payload(l1_handler_calldata.0[1..].to_vec()), + nonce: l1_handler_nonce, + selector: l1_handler_selector, + }; + + // Call test_library_call_syntactic_sugar from contract_addresses[0] to test library calls + // using the syntactic sugar of 'library_call_'. + let calldata = create_calldata( + contract_addresses[0], + "test_library_call_syntactic_sugar", + &[test_class_hash.0], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Call add_signature_to_counters(index=2021). + let calldata = + create_calldata(contract_addresses[0], "add_signature_to_counters", &[Felt::from(2021)]); + let signature = TransactionSignature(Arc::new(vec![Felt::from(100), Felt::from(200)])); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata, signature }); + + // Declare test_contract2. + let test_contract2 = FeatureContract::TestContract2; + let test_contract2_class_hash = get_class_hash_of_feature_contract(test_contract2); + let test_contract2_declare_tx = declare_tx(declare_tx_args! { + version: TransactionVersion::ZERO, + sender_address: *FUNDED_ACCOUNT_ADDRESS, + class_hash: test_contract2_class_hash, + max_fee: Fee(1_000_000_000_000_000), + }); + let class_info = get_class_info_of_feature_contract(test_contract2); + let tx = DeclareTransaction::create(test_contract2_declare_tx, class_info, &CHAIN_ID_FOR_TESTS) + .unwrap(); + test_manager.add_cairo0_declare_tx(tx, test_contract2_class_hash); + + // Use library_call to call test_contract2.test_storage_write(address=555, value=888). + let calldata = create_calldata( + contract_addresses[1], + "test_library_call", + &[ + test_contract2_class_hash.0, + selector_from_name("test_storage_write").0, + Felt::TWO, + Felt::from(555), + Felt::from(888), + ], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Use library_call_l1_handler to invoke test_contract2.test_l1_handler_storage_write with + // from_address=85, address=666, value=999. + let calldata = create_calldata( + contract_addresses[1], + "test_library_call_l1_handler", + &[ + test_contract2_class_hash.0, + selector_from_name("test_l1_handler_storage_write").0, + Felt::THREE, + Felt::from(85), + Felt::from(666), + Felt::from(999), + ], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Replace the class of contract_addresses[0] to the class of test_contract2. + let calldata = create_calldata( + contract_addresses[0], + "test_replace_class", + &[test_contract2_class_hash.0], + ); + test_manager.add_funded_account_invoke(invoke_tx_args! { calldata }); + + // Expected values: + + // Storage updates: + let storage_updates = HashMap::from([ + ( + contract_addresses[0], + HashMap::from([ + (StarknetStorageKey(storage_key!(85u16)), StarknetStorageValue(Felt::from(47))), + (StarknetStorageKey(storage_key!(321u16)), StarknetStorageValue(Felt::from(543))), + (StarknetStorageKey(storage_key!(444u16)), StarknetStorageValue(Felt::from(666))), + ( + StarknetStorageKey(get_storage_var_address( + "two_counters", + &[Felt::from(2021)], + )), + StarknetStorageValue(Felt::from(100)), + ), + ( + StarknetStorageKey(StorageKey( + PatriciaKey::try_from( + **get_storage_var_address("two_counters", &[Felt::from(2021)]) + + Felt::ONE, + ) + .unwrap(), + )), + StarknetStorageValue(Felt::from(200)), + ), + ]), + ), + ( + contract_addresses[1], + HashMap::from([ + (StarknetStorageKey(storage_key!(15u16)), StarknetStorageValue(Felt::from(1))), + (StarknetStorageKey(storage_key!(111u16)), StarknetStorageValue(Felt::from(987))), + (StarknetStorageKey(storage_key!(555u16)), StarknetStorageValue(Felt::from(888))), + (StarknetStorageKey(storage_key!(666u16)), StarknetStorageValue(Felt::from(999))), + ]), + ), + ( + delegate_proxy_address, + HashMap::from([ + (StarknetStorageKey(storage_key!(123u16)), StarknetStorageValue(Felt::from(456))), + ( + StarknetStorageKey(get_storage_var_address("implementation_hash", &[])), + StarknetStorageValue(test_class_hash.0), + ), + ( + StarknetStorageKey(get_storage_var_address( + "two_counters", + &[Felt::from(expected_message_to_l2.from_address)], + )), + StarknetStorageValue(*expected_message_to_l2.payload.0.last().unwrap()), + ), + ]), + ), + ]); + + // Expected number of txs. + assert_eq!(test_manager.total_txs(), n_expected_txs); + + // Run the test. + test_manager.divide_transactions_into_n_blocks(n_blocks_in_multi_block); + let test_output = test_manager + .execute_test_with_default_block_contexts(&TestParameters { + messages_to_l1: vec![expected_message_to_l1], + messages_to_l2: vec![expected_message_to_l2], + private_keys, + ..Default::default() + }) + .await; + + // Perform validations. + let perform_global_validations = true; + let partial_state_diff = Some(&StateDiff { storage_updates, ..Default::default() }); + test_output.perform_validations(perform_global_validations, partial_state_diff); +}