Skip to content
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 pyteal/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
)
from .constants import createConstantBlocks

MAX_TEAL_VERSION = 5
MAX_TEAL_VERSION = 6
MIN_TEAL_VERSION = 2
DEFAULT_TEAL_VERSION = MIN_TEAL_VERSION

Expand Down
13 changes: 12 additions & 1 deletion pyteal/compiler/compiler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_compile_version_invalid():
compileTeal(expr, Mode.Signature, version=1) # too small

with pytest.raises(TealInputError):
compileTeal(expr, Mode.Signature, version=6) # too large
compileTeal(expr, Mode.Signature, version=7) # too large

with pytest.raises(TealInputError):
compileTeal(expr, Mode.Signature, version=2.0) # decimal
Expand Down Expand Up @@ -195,6 +195,17 @@ def test_compile_version_5():
assert actual == expected


def test_compile_version_6():
expr = Int(1)
expected = """
#pragma version 6
int 1
return
""".strip()
actual = compileTeal(expr, Mode.Signature, version=6)
assert actual == expected


def test_slot_load_before_store():

program = AssetHolding.balance(Int(0), Int(0)).value()
Expand Down