Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add typed contract to contract calls #112

Merged
merged 40 commits into from
Mar 14, 2024
Merged

feat: add typed contract to contract calls #112

merged 40 commits into from
Mar 14, 2024

Conversation

daniel-makerx
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Mar 5, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/puya
   __main__.py31197%116
   arc4_util.py134894%30, 78–79, 91, 103, 105, 173, 200
   arc32.py126398%103, 114, 220
   client_gen.py1071070%1–195
   compile.py158398%141, 155–158
   errors.py1222976%47–48, 52, 54–57, 82, 124, 144–145, 150–164, 175–178
   logging_config.py1292878%15, 36–39, 45, 47, 50–54, 69, 88, 141–143, 146–148, 150, 163–172, 194
   models.py80298%11–12
   options.py30293%12–13
   parse.py2041891%86, 98, 127, 166, 169, 223, 266, 276, 278, 282, 310–315, 319, 349, 363, 376–377
   utils.py1501987%49, 53, 87, 93, 108, 111–113, 120, 142, 155–156, 160, 164–167, 196, 198, 221
src/puya/awst
   function_traverser.py188398%113, 143–144
   nodes.py9696793%19–28, 44, 53, 87, 93, 97–100, 134, 140, 144–147, 281, 495, 533, 738–739, 759, 771, 809, 815–816, 846, 872, 876–880, 892, 948, 990–991, 996, 1011, 1062, 1067, 1125, 1148, 1165, 1344, 1349–1350, 1357–1362, 1474, 1522, 1531, 1559, 1566, 1579, 1628, 1639, 1641, 1646, 1654, 1659, 1664, 1673, 1678, 1683, 1690
   to_code_visitor.py3201496%83–84, 87–90, 114–115, 196, 321–322, 332, 413–414, 485, 513
   visitors.py2177167%7, 15, 19, 23, 27, 31, 35, 39, 43, 47, 53, 59, 65, 69, 73, 77, 83, 87, 91, 95, 99, 105, 109, 113, 117, 121, 125, 129, 133, 139, 143, 147, 153, 159, 163, 169, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 231, 234, 237, 243, 249, 253, 257, 261, 265, 269, 273, 277, 281, 285, 289, 293, 297, 301, 305, 309, 313
   wtypes.py2963588%21, 69, 181–192, 207–210, 227, 229, 274, 277, 302, 305, 307, 310, 335, 354, 390, 393, 442–443, 452–453, 461–462, 473, 476, 531, 536, 552
src/puya/awst_build
   arc4_utils.py1423675%51, 53, 56, 68, 95–96, 111, 115, 118, 124, 127, 130, 133, 141, 149, 152, 155–167, 170, 179, 182, 283, 313, 320, 323
   base_mypy_visitor.py1334467%39, 59, 71–77, 95, 106–121, 135, 139, 143, 154, 158, 166, 172, 178, 196, 202, 207, 210, 213, 222, 226, 231, 236, 242, 247, 253, 260, 264, 268, 272, 276, 280, 284, 288, 292, 296, 300, 304, 308
   context.py1472285%59–60, 136–141, 149, 151–156, 159–160, 180, 185, 189, 202, 214–215
   contract.py2205973%128–129, 131–134, 142–143, 146, 158, 169, 191, 209, 215, 217, 226, 236, 245, 273, 277, 293–297, 305–306, 311, 314, 317, 320, 325–326, 329, 332, 335, 338, 341, 344, 347, 350, 353, 356, 359, 373, 387–394, 403–410, 417–418, 441, 451–452, 459, 465, 487–493
   intrinsic_models.py32584%21, 26–29
   main.py48394%32, 49, 59
   module.py3748178%67, 115, 133–134, 141, 149, 155, 161–165, 170, 182, 206–207, 218, 248, 274–275, 298, 305, 313–326, 339–340, 363–368, 422–423, 434, 458, 461, 467, 475, 478, 485, 491, 503, 506, 527, 546–547, 564–595, 623–624, 638–640, 642, 644–645, 677–684, 696, 698
   subroutine.py6137388%217, 228, 283, 351, 355, 369, 377, 410–411, 550–564, 572, 580, 583, 595, 631–632, 637, 642, 678, 698–699, 729–735, 788–789, 794, 810, 813, 816, 824–830, 885, 889–890, 894–895, 911, 913, 916–918, 945–946, 954, 989–997, 1032, 1060, 1064, 1095, 1192, 1199, 1209, 1220–1224, 1233, 1236, 1239, 1242, 1245, 1250, 1255, 1262, 1269
   utils.py1681889%48–49, 64, 101, 116–117, 119, 139–140, 160, 174, 187, 194, 219, 230, 251, 304–305
src/puya/awst_build/eb
   _utils.py21290%13–14
   app_account_state.py1282878%51–54, 62, 79, 81, 114–115, 136–143, 165–166, 171, 178–179, 181, 198–199, 206–207, 236, 241–242
   app_state.py1202282%47–54, 76–77, 82, 92–93, 98, 115–116, 123–124, 165–166, 190, 209
   array.py684534%26–27, 30–32, 37–44, 57–73, 78–80, 83, 86–89, 94–96, 101–103, 113–125
   base.py2076171%24–31, 103, 107, 111, 117, 121, 127–132, 143–149, 154–160, 166, 172, 182, 193, 197, 201, 211, 214, 217, 220, 223, 226, 231, 234, 256, 277, 280, 285, 288, 291, 294, 297, 302, 305, 316, 329, 340, 343, 356, 377, 382, 392, 395, 399, 406, 409, 412, 417, 422, 427, 433
   biguint.py902276%34–38, 63–64, 78, 93, 103–106, 128–131, 148–153, 170–178, 181–182
   bool.py40880%27–31, 50–51, 54–55, 73
   bytes.py1401986%55–59, 82–83, 94–95, 116–117, 121, 125, 130, 132–133, 153, 175, 296–297, 330
   bytes_backed.py29486%38–39, 48–49
   ensure_budget.py481569%25–29, 50–51, 71–72, 80, 92, 98–103
   intrinsics.py1564372%32–34, 56–57, 65–66, 72–73, 90–91, 98, 128, 137, 139–163, 170–171, 215, 223, 235–236, 238, 255–256, 268, 273, 280, 283
   log.py55984%25–29, 78–84, 94, 96
   named_int_constants.py20290%23–24
   struct.py321553%21–22, 25, 36–42, 47–49, 52–57
   subroutine.py35294%52, 72
   template_variables.py471079%25–26, 60–61, 65, 70, 73–74, 83–84
   tuple.py982080%39–40, 47, 58, 60–61, 83–84, 93–94, 107, 113, 131–132, 137–138, 150, 158, 166, 198
   type_registry.py28293%146–147
   uint64.py791581%37–41, 63–64, 85, 103, 126, 145–148, 162–170, 173–174
   unsigned_builtins.py701184%30–34, 52, 59, 94, 97–98, 129, 132–133
   value_proxy.py391269%24, 27, 30, 33, 36, 41, 56, 66, 75, 85, 88, 91
src/puya/awst_build/eb/arc4
   utils.py541081%19, 50–51, 53, 56–57, 79–80, 100, 115
   abi_call.py1992786%48–52, 104–105, 125–126, 130–131, 158, 182, 199–200, 244, 249–251, 300–306, 340–341, 412, 415, 417
   arrays.py2242987%62–66, 79–80, 108, 139, 159–160, 196, 198, 232, 260, 276–277, 290, 333–334, 387–388, 410, 420–421, 437, 467, 487–488, 496, 543
   base.py1151983%36–40, 70–71, 92–93, 163–164, 185, 196–197, 211–212, 229–230, 240, 250, 255
   bool.py28679%22–29, 55–56
   dynamic_bytes.py42490%16–18, 60–61
   numeric.py931881%29–33, 45, 60, 74, 81–82, 100, 114–115, 120, 125, 162–165, 186
   string.py651282%32–36, 55, 78, 92, 111–112, 137–138, 156–157
   struct.py58886%26–33, 69, 72, 107–108
   tuple.py862176%31–35, 50, 54–55, 80, 85–87, 96, 107, 116, 129, 133–134, 146, 162–163, 172–173
src/puya/awst_build/eb/reference_types
   account.py62985%31–33, 51, 60–64, 106
   application.py31681%17–19, 36–37, 41–42
   asset.py52885%27–29, 46–47, 51–52, 89–90
   base.py44491%25–27, 61, 87
src/puya/awst_build/eb/transaction
   base.py33779%16, 24, 28, 33–34, 41, 50
   group.py571574%33–37, 88–89, 143–156
   inner.py56788%28–31, 64–65, 116, 144
   inner_params.py1021189%29–33, 44–45, 55, 111, 147, 172, 189, 221
src/puya/awst_build/validation
   arc4_copy.py42198%37
   inner_transactions.py94298%112, 126
   scratch_slots.py37489%17, 30, 46, 48
src/puya/ir
   arc4_router.py2482092%157, 175, 183, 341, 421, 467, 534–535, 549, 589–590, 602, 607, 612, 617, 622, 627, 647–652
   avm_ops.py316299%44–45
   avm_ops_models.py36294%20, 28
   context.py881286%18, 59–60, 62, 80–86, 91, 102, 109, 119
   main.py175697%113, 116, 245, 247, 303, 314
   models.py4552694%29, 45, 63, 79, 186, 196, 200, 370, 444, 486, 566, 582, 623, 626, 633, 636, 692, 701, 709, 715, 726–728, 738, 750, 787
   ssa.py136993%43, 51–52, 99, 105, 141, 145, 166, 170
   to_text_visitor.py134795%85, 90, 172–177
   types.py50786%27–28, 52–56, 67
   visitor.py1713778%10–12, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 174, 186, 201, 204, 207, 213, 216, 222, 225, 228, 231, 234, 237, 240, 243
   visitor_mutator.py93298%138–139
   vla.py73297%50, 87
src/puya/ir/builder
   _utils.py71889%33, 44, 57, 79–80, 157, 203–204
   arc4.py4184889%75–76, 125, 149–155, 219, 227, 450, 462, 465, 621–635, 964–978, 1004–1028, 1037–1053, 1076, 1177–1178, 1223–1240, 1279–1280, 1333, 1366–1367, 1517–1518, 1581
   assignment.py43588%59, 75, 102, 133–134
   blocks.py931089%62, 72, 76, 112, 120, 124, 157–159, 165–167
   callsub.py57198%93
   flow_control.py98496%63, 117, 141, 155
   iteration.py190597%46, 66, 95, 176–177
   itxn.py2632690%120–121, 136–137, 147–148, 154–159, 185, 464–465, 470–471, 476–477, 483, 494, 511–512, 554–557
   main.py4775389%94, 119, 145, 154, 158, 203–204, 220–221, 248, 256, 263–264, 335, 363–364, 379, 391, 408, 429, 436, 470, 483, 521, 534–535, 599–600, 622, 670, 698, 716, 751–752, 827, 830, 836, 843–844, 874–875, 890, 936–937, 953–954, 988, 1003–1005, 1014, 1017–1018
src/puya/ir/destructure
   coalesce_locals.py941584%33, 36, 118, 127–128, 131–134, 137–139, 153–156
   parcopy.py84298%47, 83
src/puya/ir/optimize
   _utils.py28196%21
   collapse_blocks.py92595%65–69
   control_op_simplification.py96694%156–162, 232
   dead_code_elimination.py119298%288, 324
   intrinsic_simplification.py3704089%64, 128, 140, 202, 268, 326, 332, 383, 405, 426, 428, 434, 478, 480, 482, 489, 505, 519, 525, 527, 529, 534, 536, 538, 540, 542, 545–548, 555, 557, 559, 561, 563, 565, 569, 592–593, 600
   main.py85396%106–107, 123
src/puya/mir
   annotaters.py173796%57, 63, 99, 103, 136, 140, 217
   builder.py122695%90, 138, 144, 151, 258–259
   context.py39197%35
   models.py3352493%14–18, 30, 41, 53, 69–70, 78, 89, 100, 111, 141, 251, 282, 319, 331, 348, 356–362, 368
   output.py61297%29, 31
   stack.py2532291%68, 72, 115, 119, 125, 135, 146, 157, 167, 182, 199, 209, 228, 246, 252, 254, 293, 304, 328, 360, 365, 403
   visitor.py762468%7, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 103
src/puya/mir/stack_allocation
   baileys.py208697%31, 103, 123, 330–334, 359
   frame_allocation.py80396%21, 64–65
   koopmans.py61198%55
   peephole.py100694%75, 89, 99, 101, 103, 145
src/puya/teal
   models.py229299%292, 298
src/puya/teal/optimize
   peephole.py112596%64, 154–164, 172
   repeated_rotations.py30197%13
   repeated_rotations_search.py88693%34, 40–41, 57, 67–68
TOTAL15836182888% 

Tests Skipped Failures Errors Time
250 2 💤 0 ❌ 0 🔥 2m 35s ⏱️

@daniel-makerx daniel-makerx force-pushed the typed-c2c branch 9 times, most recently from dad2ef0 to 35da87d Compare March 13, 2024 10:02
src/puyapy-stubs/arc4.pyi Outdated Show resolved Hide resolved
src/puyapy-stubs/arc4.pyi Outdated Show resolved Hide resolved
src/puya/client_gen.py Outdated Show resolved Hide resolved
src/puya/context.py Outdated Show resolved Hide resolved
@daniel-makerx daniel-makerx merged commit 3d42df3 into main Mar 14, 2024
4 checks passed
@daniel-makerx daniel-makerx deleted the typed-c2c branch March 14, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants