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

MultiValue expression implemented to support opcodes that return multiple values #196

Merged
merged 8 commits into from
Feb 17, 2022
12 changes: 6 additions & 6 deletions pyteal/ast/acct_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def test_acct_param_balance_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.acct_params_get, "AcctBalance"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -44,8 +44,8 @@ def test_acct_param_min_balance_valid():
[
TealOp(arg, Op.int, 0),
TealOp(expr, Op.acct_params_get, "AcctMinBalance"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -67,8 +67,8 @@ def test_acct_param_auth_addr_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.acct_params_get, "AcctAuthAddr"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand Down
52 changes: 26 additions & 26 deletions pyteal/ast/app_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ def test_local_get_ex():
TealOp(args[1], Op.int, 6),
TealOp(args[2], Op.byte, '"key"'),
TealOp(expr, Op.app_local_get_ex),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -179,8 +179,8 @@ def test_local_get_ex_direct_ref():
TealOp(args[1], Op.int, 6),
TealOp(args[2], Op.byte, '"key"'),
TealOp(expr, Op.app_local_get_ex),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand Down Expand Up @@ -232,8 +232,8 @@ def test_global_get_ex():
TealOp(args[0], Op.int, 6),
TealOp(args[1], Op.byte, '"key"'),
TealOp(expr, Op.app_global_get_ex),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -256,8 +256,8 @@ def test_global_get_ex_direct_ref():
TealOp(args[0], Op.txna, "Applications", 0),
TealOp(args[1], Op.byte, '"key"'),
TealOp(expr, Op.app_global_get_ex),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand Down Expand Up @@ -437,8 +437,8 @@ def test_app_param_approval_program_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.app_params_get, "AppApprovalProgram"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -465,8 +465,8 @@ def test_app_param_clear_state_program_valid():
[
TealOp(arg, Op.int, 0),
TealOp(expr, Op.app_params_get, "AppClearStateProgram"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -493,8 +493,8 @@ def test_app_param_global_num_unit_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.app_params_get, "AppGlobalNumUnit"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -521,8 +521,8 @@ def test_app_param_global_num_byte_slice_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.app_params_get, "AppGlobalNumByteSlice"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -549,8 +549,8 @@ def test_app_param_local_num_unit_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.app_params_get, "AppLocalNumUnit"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -577,8 +577,8 @@ def test_app_param_local_num_byte_slice_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.app_params_get, "AppLocalNumByteSlice"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -605,8 +605,8 @@ def test_app_param_extra_programs_page_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.app_params_get, "AppExtraProgramPages"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -633,8 +633,8 @@ def test_app_param_creator_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.app_params_get, "AppCreator"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand All @@ -661,8 +661,8 @@ def test_app_param_address_valid():
[
TealOp(arg, Op.int, 1),
TealOp(expr, Op.app_params_get, "AppAddress"),
TealOp(None, Op.store, expr.output_slots[0]),
TealOp(None, Op.store, expr.output_slots[1]),
TealOp(None, Op.store, expr.slotOk),
TealOp(None, Op.store, expr.slotValue),
]
)

Expand Down
Loading