Skip to content

Commit

Permalink
chore: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Kim (Hyunggun) committed Nov 22, 2024
1 parent 264209a commit 85c9fc2
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ __puya_arc4_router___after_if_else@9:
get_day:
proto 1 1
frame_dig -1
switch get_day_switch_case_default@8 get_day_switch_case_0@1 get_day_switch_case_1@2 get_day_switch_case_2@3 get_day_switch_case_3@4 get_day_switch_case_4@5 get_day_switch_case_5@6 get_day_switch_case_6@7
switch get_day_switch_case_0@1 get_day_switch_case_1@2 get_day_switch_case_2@3 get_day_switch_case_3@4 get_day_switch_case_4@5 get_day_switch_case_5@6 get_day_switch_case_6@7
byte "Invalid day"
retsub

Expand Down Expand Up @@ -87,7 +87,3 @@ get_day_switch_case_5@6:
get_day_switch_case_6@7:
byte "Sunday"
retsub

get_day_switch_case_default@8:
byte "Invalid day"
retsub
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
},
"source": {
"approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpzbWFydF9jb250cmFjdHMuY29udHJvbF9mbG93LmNvbnRyYWN0Lk1hdGNoU3RhdGVtZW50cy5hcHByb3ZhbF9wcm9ncmFtOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gc21hcnRfY29udHJhY3RzLmNvbnRyb2xfZmxvdy5jb250cmFjdC5NYXRjaFN0YXRlbWVudHMuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYmFyZV9yb3V0aW5nQDUKICAgIG1ldGhvZCAiZ2V0X2RheSh1aW50NjQpc3RyaW5nIgogICAg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N1bmRheSIKICAgIHJldHN1Ygo=",
"clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpzbWFydF9jb250cmFjdHMuY29udHJvbF9mbG93LmNvbnRyYWN0Lk1hdGNoU3RhdGVtZW50cy5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgaW50IDEKICAgIHJldHVybgo="
},
"state": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
},
"source": {
"approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpzbWFydF9jb250cmFjdHMuY29udHJvbF9mbG93LmNvbnRyYWN0Lk1hdGNoU3RhdGVtZW50cy5hcHByb3ZhbF9wcm9ncmFtOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gc21hcnRfY29udHJhY3RzLmNvbnRyb2xfZmxvdy5jb250cmFjdC5NYXRjaFN0YXRlbWVudHMuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYmFyZV9yb3V0aW5nQDUKICAgIG1ldGhvZCAiZ2V0X2RheSh1aW50NjQpc3RyaW5nIgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMAogICAgbWF0Y2ggX19wdXlhX2FyYzRfcm91dGVyX19fZ2V0X2RheV9yb3V0ZUAyCiAgICBpbnQgMAogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19nZXRfZGF5X3JvdXRlQDI6CiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBhc3NlcnQgLy8gaXMgbm90IGNyZWF0aW5nCiAgICB0eG5hIEFwcGx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lfc3dpdGNoX2Nhc2VfMUAyIGdldF9kYXlfc3dpdGNoX2Nhc2VfMkAzIGdldF9kYXlfc3dpdGNoX2Nhc2VfM0A0IGdldF9kYXlfc3dpdGNoX2Nhc2VfNEA1IGdldF9kYXlfc3dpdGNoX2Nhc2VfNUA2IGdldF9kYXlfc3dpdGNoX2Nhc2VfNkA3CiAgICBieXRlICJJbnZhbGlkIGRheSIKICAgIHJldHN1YgoKZ2V0X2RheV9zd2l0Y2hfY2FzZV8wQDE6CiAgICBieXRlICJNb25kYXkiCiAgICByZXRzdWIKCmdldF9kYXlfc3dpdGNoX2Nhc2VfMUAyOgogICAgYnl0ZSAiVHVlc2RheSIKICAgIHJldHN1YgoKZ2V0X2RheV9zd2l0Y2hfY2FzZV8yQDM6CiAgICBieXRlICJXZWRuZXNkYXkiCiAgICByZXRzdWIKCmdldF9kYXlfc3dpdGNoX2Nhc2VfM0A0OgogICAgYnl0ZSAiVGh1cnNkYXkiCiAgICByZXRzdWIKCmdldF9kYXlfc3dpdGNoX2Nhc2VfNEA1OgogICAgYnl0ZSAiRnJpZGF5IgogICAgcmV0c3ViCgpnZXRfZGF5X3N3aXRjaF9jYXNlXzVANjoKICAgIGJ5dGUgIlNhdHVyZGF5IgogICAgcmV0c3ViCgpnZXRfZGF5X3N3aXRjaF9jYXNlXzZANzoKICAgIGJ5dGUgIlN1bmRheSIKICAgIHJldHN1Ygo=",
"clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpzbWFydF9jb250cmFjdHMuY29udHJvbF9mbG93LmNvbnRyYWN0Lk1hdGNoU3RhdGVtZW50cy5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgaW50IDEKICAgIHJldHVybgo="
},
"state": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ class MatchStatements(ARC4Contract):
def get_day(self, date: UInt64) -> String:

match date:
case UInt64(1):
case UInt64(0):
return String("Monday")
case UInt64(2):
case UInt64(1):
return String("Tuesday")
case UInt64(3):
case UInt64(2):
return String("Wednesday")
case UInt64(4):
case UInt64(3):
return String("Thursday")
case UInt64(5):
case UInt64(4):
return String("Friday")
case UInt64(6):
case UInt64(5):
return String("Saturday")
case UInt64(7):
case UInt64(6):
return String("Sunday")
case _:
return String("Invalid day")
Expand All @@ -79,21 +79,21 @@ class WhileLoopExample(ARC4Contract):
def loop(self) -> UInt64:

num = UInt64(10)
loop_num = UInt64(0)
loop_count = UInt64(0)

while num > 0:
if num > 5:
num -= 1
loop_num += 1
loop_count += 1
continue

num -= 2
loop_num += 1
loop_count += 1

if num == 1:
break

return loop_num
return loop_count


# example: WHILE_LOOP
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ def test_match_statements(
) -> None:

inputs = [
(1, "Monday"),
(2, "Tuesday"),
(3, "Wednesday"),
(4, "Thursday"),
(5, "Friday"),
(6, "Saturday"),
(7, "Sunday"),
(0, "Invalid day"),
(0, "Monday"),
(1, "Tuesday"),
(2, "Wednesday"),
(3, "Thursday"),
(4, "Friday"),
(5, "Saturday"),
(6, "Sunday"),
(7, "Invalid day"),
]

for i in inputs:
Expand Down

0 comments on commit 85c9fc2

Please sign in to comment.