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

Local/GlobalState custom keys & descriptions #111

Merged
merged 40 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
feb8c14
scratch_slots reservation:
achidlow Feb 22, 2024
c9bc9e8
two-phase module AST conversion - note this should also solve the con…
achidlow Feb 26, 2024
8cb8241
refactor
achidlow Feb 26, 2024
07f4f01
wip
achidlow Feb 27, 2024
f99bccc
awst node fixups
achidlow Feb 27, 2024
d3504f1
wip
achidlow Feb 27, 2024
2cc0f01
refactor
achidlow Feb 27, 2024
38d6316
fix & update error message
achidlow Feb 27, 2024
cf801cb
refactors:
achidlow Feb 29, 2024
0450619
avoid isinstance checks on ValueExpressionBuilder
achidlow Feb 29, 2024
bc77414
fix issue with TemporaryAssignmentExpressionBuilder not being picked …
achidlow Feb 29, 2024
6b6f325
wip
achidlow Feb 29, 2024
1f2055b
wip
achidlow Feb 29, 2024
0b0e224
wip
achidlow Feb 29, 2024
89d1cad
wip
achidlow Feb 29, 2024
28bf030
re-run compile-all
achidlow Feb 29, 2024
d96ad13
fix tests
achidlow Feb 29, 2024
99bdb74
add "unknown" bytes encoding for raw bytes. default to hex output, bu…
achidlow Feb 29, 2024
404d840
wip
achidlow Feb 29, 2024
e410fce
wip
achidlow Feb 29, 2024
c309e67
wip
achidlow Feb 29, 2024
2fdca1c
wip
achidlow Feb 29, 2024
a023221
skip empty init functions
achidlow Feb 29, 2024
afe81d1
improve optimisation of state.get()
achidlow Feb 29, 2024
7fb7ea2
minor changes
achidlow Mar 1, 2024
c7743bc
minor changes
achidlow Mar 1, 2024
9f6e655
- address usage of non-utf8 file encodings - turns out it's somewhat …
achidlow Mar 1, 2024
bd8c129
wip
achidlow Mar 1, 2024
1457412
wip
achidlow Mar 1, 2024
0fe45f4
wip
achidlow Mar 1, 2024
d52b93a
wip
achidlow Mar 1, 2024
aa0727a
linting
achidlow Mar 1, 2024
3826e16
fix doc generation issue
achidlow Mar 1, 2024
2466ea9
use auction contract as a test case for state with custom key/descrip…
achidlow Mar 1, 2024
41b13e5
add test case that exercises all the custom key/description options
achidlow Mar 1, 2024
d1141af
- replace TODO comment with REFACTOR
achidlow Mar 5, 2024
6e63cda
ensure utils in ir/builder remains internal
achidlow Mar 5, 2024
dbb8f7d
refactoring
achidlow Mar 5, 2024
096bbf6
refactoring of checked_maybe IR implementation
achidlow Mar 5, 2024
63f3e6b
refactoring _build_field
achidlow Mar 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions examples/amm/out/ConstantProductAMM.approval.mir

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions examples/amm/out/ConstantProductAMM.approval.teal
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ _check_is_governor:
int 0
byte "governor"
app_global_get_ex
assert // check value exists
assert // check governor exists
achidlow marked this conversation as resolved.
Show resolved Hide resolved
==
// amm/contract.py:266-268
// assert (
Expand All @@ -275,7 +275,7 @@ bootstrap:
int 0
byte "pool_token"
app_global_get_ex
assert // check value exists
assert // check pool_token exists
!
assert // application has already been bootstrapped
// amm/contract.py:69
Expand Down Expand Up @@ -328,21 +328,21 @@ bootstrap:
int 0
byte "asset_a"
app_global_get_ex
assert // check value exists
assert // check asset_a exists
callsub _do_opt_in
// amm/contract.py:80
// self._do_opt_in(self.asset_b)
int 0
byte "asset_b"
app_global_get_ex
assert // check value exists
assert // check asset_b exists
callsub _do_opt_in
// amm/contract.py:81
// return arc4.UInt64(self.pool_token.asset_id)
int 0
byte "pool_token"
app_global_get_ex
assert // check value exists
assert // check pool_token exists
itob
retsub

Expand Down Expand Up @@ -370,7 +370,7 @@ _create_pool_token:
int 0
byte "asset_a"
app_global_get_ex
assert // check value exists
assert // check asset_a exists
asset_params_get AssetUnitName
assert // asset exists
byte "DPT-"
Expand All @@ -381,7 +381,7 @@ _create_pool_token:
int 0
byte "asset_b"
app_global_get_ex
assert // check value exists
assert // check asset_b exists
asset_params_get AssetUnitName
assert // asset exists
concat
Expand Down Expand Up @@ -540,7 +540,7 @@ mint:
int 0
byte "pool_token"
app_global_get_ex
assert // check value exists
assert // check pool_token exists
frame_dig -3
==
assert // asset pool incorrect
Expand All @@ -549,7 +549,7 @@ mint:
int 0
byte "asset_a"
app_global_get_ex
assert // check value exists
assert // check asset_a exists
frame_dig -2
==
assert // asset a incorrect
Expand All @@ -558,7 +558,7 @@ mint:
int 0
byte "asset_b"
app_global_get_ex
assert // check value exists
assert // check asset_b exists
frame_dig -1
==
assert // asset b incorrect
Expand Down Expand Up @@ -595,7 +595,7 @@ mint:
int 0
byte "asset_a"
app_global_get_ex
assert // check value exists
assert // check asset_a exists
==
assert // asset a incorrect
// amm/contract.py:127
Expand Down Expand Up @@ -625,7 +625,7 @@ mint:
int 0
byte "asset_b"
app_global_get_ex
assert // check value exists
assert // check asset_b exists
==
assert // asset b incorrect
// amm/contract.py:134
Expand Down Expand Up @@ -669,7 +669,7 @@ mint:
int 0
byte "pool_token"
app_global_get_ex
assert // check value exists
assert // check pool_token exists
uncover 2
callsub do_asset_transfer
// amm/contract.py:147
Expand All @@ -689,7 +689,7 @@ _check_bootstrapped:
int 0
byte "pool_token"
app_global_get_ex
assert // check value exists
assert // check pool_token exists
assert // bootstrap method needs to be called first
retsub

Expand All @@ -706,7 +706,7 @@ _current_pool_balance:
int 0
byte "pool_token"
app_global_get_ex
assert // check value exists
assert // check pool_token exists
asset_holding_get AssetBalance
assert // account opted into asset
retsub
Expand All @@ -724,7 +724,7 @@ _current_a_balance:
int 0
byte "asset_a"
app_global_get_ex
assert // check value exists
assert // check asset_a exists
asset_holding_get AssetBalance
assert // account opted into asset
retsub
Expand All @@ -742,7 +742,7 @@ _current_b_balance:
int 0
byte "asset_b"
app_global_get_ex
assert // check value exists
assert // check asset_b exists
asset_holding_get AssetBalance
assert // account opted into asset
retsub
Expand Down Expand Up @@ -897,7 +897,7 @@ burn:
int 0
byte "pool_token"
app_global_get_ex
assert // check value exists
assert // check pool_token exists
frame_dig -3
==
assert // asset pool incorrect
Expand All @@ -906,7 +906,7 @@ burn:
int 0
byte "asset_a"
app_global_get_ex
assert // check value exists
assert // check asset_a exists
frame_dig -2
==
assert // asset a incorrect
Expand All @@ -915,7 +915,7 @@ burn:
int 0
byte "asset_b"
app_global_get_ex
assert // check value exists
assert // check asset_b exists
frame_dig -1
==
assert // asset b incorrect
Expand Down Expand Up @@ -945,7 +945,7 @@ burn:
int 0
byte "pool_token"
app_global_get_ex
assert // check value exists
assert // check pool_token exists
==
assert // asset pool incorrect
// amm/contract.py:183
Expand Down Expand Up @@ -993,7 +993,7 @@ burn:
int 0
byte "asset_a"
app_global_get_ex
assert // check value exists
assert // check asset_a exists
uncover 2
callsub do_asset_transfer
// amm/contract.py:202-203
Expand All @@ -1003,7 +1003,7 @@ burn:
int 0
byte "asset_b"
app_global_get_ex
assert // check value exists
assert // check asset_b exists
uncover 2
callsub do_asset_transfer
// amm/contract.py:204
Expand Down Expand Up @@ -1061,7 +1061,7 @@ swap:
int 0
byte "asset_a"
app_global_get_ex
assert // check value exists
assert // check asset_a exists
frame_dig -2
==
assert // asset a incorrect
Expand All @@ -1070,7 +1070,7 @@ swap:
int 0
byte "asset_b"
app_global_get_ex
assert // check value exists
assert // check asset_b exists
frame_dig -1
==
assert // asset b incorrect
Expand All @@ -1094,13 +1094,13 @@ swap:
int 0
byte "asset_a"
app_global_get_ex
assert // check value exists
assert // check asset_a exists
// amm/contract.py:238
// case self.asset_b:
int 0
byte "asset_b"
app_global_get_ex
assert // check value exists
assert // check asset_b exists
// amm/contract.py:233
// match swap_xfer.xfer_asset:
frame_dig -3
Expand Down Expand Up @@ -1137,7 +1137,7 @@ swap_switch_case_0@1:
app_global_get_ex
swap
frame_bury 1
assert // check value exists
assert // check asset_a exists
b swap_switch_case_next@4

swap_switch_case_1@2:
Expand All @@ -1155,7 +1155,7 @@ swap_switch_case_1@2:
app_global_get_ex
swap
frame_bury 1
assert // check value exists
assert // check asset_b exists

swap_switch_case_next@4:
// amm/contract.py:245-247
Expand Down
2 changes: 1 addition & 1 deletion examples/amm/out/ConstantProductAMM.arc32.json

Large diffs are not rendered by default.

Loading
Loading