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

AVM: Consolidate TEAL and AVM versions #361

Merged
merged 2 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion algosdk/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def read_program(program, args=None):
# costs calculated dynamically starting in v4
if version < 4 and cost >= constants.logic_sig_max_cost:
raise error.InvalidProgram(
"program too costly for Teal version < 4. consider using v4."
"program too costly for version < 4. consider using v4."
)

return True, ints, bytearrays
Expand Down
20 changes: 10 additions & 10 deletions tests/unit_tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ def test_check_program(self):
programv = v + program
self.assertTrue(logic.check_program(programv, None))

def test_check_program_teal_2(self):
# check TEAL v2 opcodes
def test_check_program_avm_2(self):
# check AVM v2 opcodes
self.assertIsNotNone(
logic.spec, "Must be called after any of logic.check_program"
)
Expand All @@ -485,8 +485,8 @@ def test_check_program_teal_2(self):
program = b"\x02\x20\x01\x00\x22\x22\x70\x00" # int 0; int 0; asset_holding_get Balance
self.assertTrue(logic.check_program(program, None))

def test_check_program_teal_3(self):
# check TEAL v2 opcodes
def test_check_program_avm_3(self):
# check AVM v2 opcodes
self.assertIsNotNone(
logic.spec, "Must be called after any of logic.check_program"
)
Expand Down Expand Up @@ -533,8 +533,8 @@ def test_teal_sign(self):
res = verify_key.verify(msg, sig1)
self.assertIsNotNone(res)

def test_check_program_teal_4(self):
# check TEAL v4 opcodes
def test_check_program_avm_4(self):
# check AVM v4 opcodes
self.assertIsNotNone(
logic.spec, "Must be called after any of logic.check_program"
)
Expand Down Expand Up @@ -568,8 +568,8 @@ def test_check_program_teal_4(self):
program = b"\x04\x20\x04\x01\x02\x0a\x10\x22\x23\x0b\x49\x24\x0c\x40\xff\xf8\x25\x12" # int 1; loop: int 2; *; dup; int 10; <; bnz loop; int 16; ==
self.assertTrue(logic.check_program(program, None))

def test_check_program_teal_5(self):
# check TEAL v5 opcodes
def test_check_program_avm_5(self):
# check AVM v5 opcodes
self.assertIsNotNone(
logic.spec, "Must be called after any of logic.check_program"
)
Expand All @@ -592,8 +592,8 @@ def test_check_program_teal_5(self):
# byte "a"; byte "b"; byte "c"; cover 2; uncover 2; concat; concat; log; int 1
self.assertTrue(logic.check_program(program, None))

def test_check_program_teal_6(self):
# check TEAL v6 opcodes
def test_check_program_avm_6(self):
# check AVM v6 opcodes

self.assertIsNotNone(
logic.spec, "Must be called after any of logic.check_program"
Expand Down