diff --git a/pyproject.toml b/pyproject.toml index c48f600..7593a55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -246,6 +246,9 @@ unfixable = [ "src/**" = [ "PT", # no pytest rules ] +"tests/**" = [ + "FBT003", # allow boolean positional arguments +] "src/algopy_testing/models/logicsig.py" = ["ARG002"] "scripts/**/*.py" = ["T201"] "scripts/refresh_test_artifacts.py" = ["S603"] diff --git a/src/algopy_testing/_context_helpers/context_storage.py b/src/algopy_testing/_context_helpers/context_storage.py index 2251b22..ceec217 100644 --- a/src/algopy_testing/_context_helpers/context_storage.py +++ b/src/algopy_testing/_context_helpers/context_storage.py @@ -113,7 +113,7 @@ def get_account_data(self, account_public_key: str) -> AccountContextData: @contextmanager def algopy_testing_context( *, - default_sender: algopy.Account | None = None, + default_sender: str | None = None, ) -> Generator[AlgopyTestContext, None, None]: from algopy_testing.context import AlgopyTestContext diff --git a/src/algopy_testing/context.py b/src/algopy_testing/context.py index e74a097..e694fd6 100644 --- a/src/algopy_testing/context.py +++ b/src/algopy_testing/context.py @@ -32,14 +32,14 @@ class AlgopyTestContext: def __init__( self, *, - default_sender: algopy.Account | None = None, + default_sender: str | None = None, template_vars: dict[str, typing.Any] | None = None, ) -> None: import algopy # TODO: remove direct reads of data mappings outside of context_storage - self._default_sender = default_sender or algopy.Account( - algosdk.account.generate_account()[1] + self._default_sender = algopy.Account( + default_sender or algosdk.account.generate_account()[1] ) self._template_vars: dict[str, typing.Any] = template_vars or {} diff --git a/tests/arc4/test_emit.py b/tests/arc4/test_emit.py index 8e3334d..18e0740 100644 --- a/tests/arc4/test_emit.py +++ b/tests/arc4/test_emit.py @@ -68,7 +68,7 @@ def test_emit(get_avm_result: AVMInvoker, context: AlgopyTestContext) -> None: MAX_UINT64, algopy.Bytes(b"world"), 16, - False, # noqa: FBT003 + False, b"test", "greetings", ) @@ -78,7 +78,7 @@ def test_emit(get_avm_result: AVMInvoker, context: AlgopyTestContext) -> None: arc4.BigUIntN[typing.Literal[256]](512), arc4.UFixedNxM[typing.Literal[32], typing.Literal[8]]("42.94967295"), arc4.BigUFixedNxM[typing.Literal[256], typing.Literal[16]]("25.5"), - arc4.Bool(True), # noqa: FBT003 + arc4.Bool(True), arc4.StaticArray(arc4.UInt8(1), arc4.UInt8(2), arc4.UInt8(3)), arc4.DynamicArray(arc4.UInt16(1), arc4.UInt16(2), arc4.UInt16(3)), arc4.Tuple((arc4.UInt32(1), arc4.UInt64(2), arc4.String("hello"))), diff --git a/tests/arc4/test_struct.py b/tests/arc4/test_struct.py index 5461000..496ba86 100644 --- a/tests/arc4/test_struct.py +++ b/tests/arc4/test_struct.py @@ -13,7 +13,7 @@ _arc4_string = arc4.String("hello") _arc4_uint64 = arc4.UInt64(42) -_arc4_bool = arc4.Bool(True) # noqa: FBT003 +_arc4_bool = arc4.Bool(True) class Swapped(arc4.Struct): diff --git a/tests/arc4/test_tuple.py b/tests/arc4/test_tuple.py index b8f8487..6ca6edc 100644 --- a/tests/arc4/test_tuple.py +++ b/tests/arc4/test_tuple.py @@ -13,7 +13,7 @@ _arc4_string = arc4.String("hello") _arc4_uint8 = arc4.UInt8(42) -_arc4_bool = arc4.Bool(True) # noqa: FBT003 +_arc4_bool = arc4.Bool(True) _test_data = [ ( diff --git a/tests/artifacts/StateOps/contract.py b/tests/artifacts/StateOps/contract.py index a398f79..012d812 100644 --- a/tests/artifacts/StateOps/contract.py +++ b/tests/artifacts/StateOps/contract.py @@ -361,11 +361,29 @@ def verify_itxn_ops(self) -> None: class GlobalStateContract(ARC4Contract): def __init__(self) -> None: + # Implicit key state variables self.implicit_key_arc4_uint = GlobalState(arc4.UInt64(1337)) self.implicit_key_arc4_string = GlobalState(arc4.String("Hello")) + self.implicit_key_arc4_byte = GlobalState(arc4.Byte(0)) + self.implicit_key_arc4_bool = GlobalState(arc4.Bool(True)) + self.implicit_key_arc4_address = GlobalState(arc4.Address(Global.creator_address)) + self.implicit_key_arc4_uint128 = GlobalState(arc4.UInt128(2**100)) + self.implicit_key_arc4_dynamic_bytes = GlobalState(arc4.DynamicBytes(b"dynamic bytes")) + + # Explicit key state variables self.arc4_uint = GlobalState(arc4.UInt64(1337), key="explicit_key_arc4_uint") self.arc4_string = GlobalState(arc4.String("Hello"), key="explicit_key_arc4_string") + self.arc4_byte = GlobalState(arc4.Byte(0), key="explicit_key_arc4_byte") + self.arc4_bool = GlobalState(arc4.Bool(True), key="explicit_key_arc4_bool") + self.arc4_address = GlobalState( + arc4.Address(Global.creator_address), key="explicit_key_arc4_address" + ) + self.arc4_uint128 = GlobalState(arc4.UInt128(2**100), key="explicit_key_arc4_uint128") + self.arc4_dynamic_bytes = GlobalState( + arc4.DynamicBytes(b"dynamic bytes"), key="explicit_key_arc4_dynamic_bytes" + ) + # Getter methods for implicit key state variables @arc4.abimethod() def get_implicit_key_arc4_uint(self) -> arc4.UInt64: return self.implicit_key_arc4_uint.value @@ -374,6 +392,27 @@ def get_implicit_key_arc4_uint(self) -> arc4.UInt64: def get_implicit_key_arc4_string(self) -> arc4.String: return self.implicit_key_arc4_string.value + @arc4.abimethod() + def get_implicit_key_arc4_byte(self) -> arc4.Byte: + return self.implicit_key_arc4_byte.value + + @arc4.abimethod() + def get_implicit_key_arc4_bool(self) -> arc4.Bool: + return self.implicit_key_arc4_bool.value + + @arc4.abimethod() + def get_implicit_key_arc4_address(self) -> arc4.Address: + return self.implicit_key_arc4_address.value + + @arc4.abimethod() + def get_implicit_key_arc4_uint128(self) -> arc4.UInt128: + return self.implicit_key_arc4_uint128.value + + @arc4.abimethod() + def get_implicit_key_arc4_dynamic_bytes(self) -> arc4.DynamicBytes: + return self.implicit_key_arc4_dynamic_bytes.value + + # Getter methods for explicit key state variables @arc4.abimethod() def get_arc4_uint(self) -> arc4.UInt64: return self.arc4_uint.value @@ -382,25 +421,130 @@ def get_arc4_uint(self) -> arc4.UInt64: def get_arc4_string(self) -> arc4.String: return self.arc4_string.value + @arc4.abimethod() + def get_arc4_byte(self) -> arc4.Byte: + return self.arc4_byte.value + + @arc4.abimethod() + def get_arc4_bool(self) -> arc4.Bool: + return self.arc4_bool.value + + @arc4.abimethod() + def get_arc4_address(self) -> arc4.Address: + return self.arc4_address.value + + @arc4.abimethod() + def get_arc4_uint128(self) -> arc4.UInt128: + return self.arc4_uint128.value + + @arc4.abimethod() + def get_arc4_dynamic_bytes(self) -> arc4.DynamicBytes: + return self.arc4_dynamic_bytes.value + + # Setter methods for implicit key state variables + @arc4.abimethod() + def set_implicit_key_arc4_uint(self, value: arc4.UInt64) -> None: + self.implicit_key_arc4_uint.value = value + + @arc4.abimethod() + def set_implicit_key_arc4_string(self, value: arc4.String) -> None: + self.implicit_key_arc4_string.value = value + + @arc4.abimethod() + def set_implicit_key_arc4_byte(self, value: arc4.Byte) -> None: + self.implicit_key_arc4_byte.value = value + + @arc4.abimethod() + def set_implicit_key_arc4_bool(self, value: arc4.Bool) -> None: + self.implicit_key_arc4_bool.value = value + + @arc4.abimethod() + def set_implicit_key_arc4_address(self, value: arc4.Address) -> None: + self.implicit_key_arc4_address.value = value + + @arc4.abimethod() + def set_implicit_key_arc4_uint128(self, value: arc4.UInt128) -> None: + self.implicit_key_arc4_uint128.value = value + + @arc4.abimethod() + def set_implicit_key_arc4_dynamic_bytes(self, value: arc4.DynamicBytes) -> None: + self.implicit_key_arc4_dynamic_bytes.value = value.copy() + + # Setter methods for explicit key state variables + @arc4.abimethod() + def set_arc4_uint(self, value: arc4.UInt64) -> None: + self.arc4_uint.value = value + + @arc4.abimethod() + def set_arc4_string(self, value: arc4.String) -> None: + self.arc4_string.value = value + + @arc4.abimethod() + def set_arc4_byte(self, value: arc4.Byte) -> None: + self.arc4_byte.value = value + + @arc4.abimethod() + def set_arc4_bool(self, value: arc4.Bool) -> None: + self.arc4_bool.value = value + + @arc4.abimethod() + def set_arc4_address(self, value: arc4.Address) -> None: + self.arc4_address.value = value + + @arc4.abimethod() + def set_arc4_uint128(self, value: arc4.UInt128) -> None: + self.arc4_uint128.value = value + + @arc4.abimethod() + def set_arc4_dynamic_bytes(self, value: arc4.DynamicBytes) -> None: + self.arc4_dynamic_bytes.value = value.copy() + class LocalStateContract(ARC4Contract): def __init__(self) -> None: - self.implicit_key_arc4_uint = LocalState( - arc4.UInt64, - ) - self.implicit_key_arc4_string = LocalState( - arc4.String, - ) + # Implicit key state variables + self.implicit_key_arc4_uint = LocalState(arc4.UInt64) + self.implicit_key_arc4_string = LocalState(arc4.String) + self.implicit_key_arc4_byte = LocalState(arc4.Byte) + self.implicit_key_arc4_bool = LocalState(arc4.Bool) + self.implicit_key_arc4_address = LocalState(arc4.Address) + self.implicit_key_arc4_uint128 = LocalState(arc4.UInt128) + self.implicit_key_arc4_dynamic_bytes = LocalState(arc4.DynamicBytes) + + # Explicit key state variables self.arc4_uint = LocalState(arc4.UInt64, key="explicit_key_arc4_uint") self.arc4_string = LocalState(arc4.String, key="explicit_key_arc4_string") + self.arc4_byte = LocalState(arc4.Byte, key="explicit_key_arc4_byte") + self.arc4_bool = LocalState(arc4.Bool, key="explicit_key_arc4_bool") + self.arc4_address = LocalState(arc4.Address, key="explicit_key_arc4_address") + self.arc4_uint128 = LocalState(arc4.UInt128, key="explicit_key_arc4_uint128") + self.arc4_dynamic_bytes = LocalState( + arc4.DynamicBytes, key="explicit_key_arc4_dynamic_bytes" + ) @arc4.abimethod(allow_actions=["OptIn"]) def opt_in(self) -> None: self.implicit_key_arc4_uint[Global.creator_address] = arc4.UInt64(1337) self.implicit_key_arc4_string[Global.creator_address] = arc4.String("Hello") + self.implicit_key_arc4_byte[Global.creator_address] = arc4.Byte(0) + self.implicit_key_arc4_bool[Global.creator_address] = arc4.Bool(True) + self.implicit_key_arc4_address[Global.creator_address] = arc4.Address( + Global.creator_address + ) + self.implicit_key_arc4_uint128[Global.creator_address] = arc4.UInt128(2**100) + self.implicit_key_arc4_dynamic_bytes[Global.creator_address] = arc4.DynamicBytes( + b"dynamic bytes" + ) + self.arc4_uint[Global.creator_address] = arc4.UInt64(1337) self.arc4_string[Global.creator_address] = arc4.String("Hello") + self.arc4_byte[Global.creator_address] = arc4.Byte(0) + self.arc4_bool[Global.creator_address] = arc4.Bool(True) + self.arc4_address[Global.creator_address] = arc4.Address(Global.creator_address) + self.arc4_uint128[Global.creator_address] = arc4.UInt128(2**100) + self.arc4_dynamic_bytes[Global.creator_address] = arc4.DynamicBytes(b"dynamic bytes") + # Getter methods for implicit key state variables @arc4.abimethod() def get_implicit_key_arc4_uint(self, a: Account) -> arc4.UInt64: return self.implicit_key_arc4_uint[a] @@ -409,6 +553,27 @@ def get_implicit_key_arc4_uint(self, a: Account) -> arc4.UInt64: def get_implicit_key_arc4_string(self, a: Account) -> arc4.String: return self.implicit_key_arc4_string[a] + @arc4.abimethod() + def get_implicit_key_arc4_byte(self, a: Account) -> arc4.Byte: + return self.implicit_key_arc4_byte[a] + + @arc4.abimethod() + def get_implicit_key_arc4_bool(self, a: Account) -> arc4.Bool: + return self.implicit_key_arc4_bool[a] + + @arc4.abimethod() + def get_implicit_key_arc4_address(self, a: Account) -> arc4.Address: + return self.implicit_key_arc4_address[a] + + @arc4.abimethod() + def get_implicit_key_arc4_uint128(self, a: Account) -> arc4.UInt128: + return self.implicit_key_arc4_uint128[a] + + @arc4.abimethod() + def get_implicit_key_arc4_dynamic_bytes(self, a: Account) -> arc4.DynamicBytes: + return self.implicit_key_arc4_dynamic_bytes[a] + + # Getter methods for explicit key state variables @arc4.abimethod() def get_arc4_uint(self, a: Account) -> arc4.UInt64: return self.arc4_uint[a] @@ -416,3 +581,23 @@ def get_arc4_uint(self, a: Account) -> arc4.UInt64: @arc4.abimethod() def get_arc4_string(self, a: Account) -> arc4.String: return self.arc4_string[a] + + @arc4.abimethod() + def get_arc4_byte(self, a: Account) -> arc4.Byte: + return self.arc4_byte[a] + + @arc4.abimethod() + def get_arc4_bool(self, a: Account) -> arc4.Bool: + return self.arc4_bool[a] + + @arc4.abimethod() + def get_arc4_address(self, a: Account) -> arc4.Address: + return self.arc4_address[a] + + @arc4.abimethod() + def get_arc4_uint128(self, a: Account) -> arc4.UInt128: + return self.arc4_uint128[a] + + @arc4.abimethod() + def get_arc4_dynamic_bytes(self, a: Account) -> arc4.DynamicBytes: + return self.arc4_dynamic_bytes[a] diff --git a/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal b/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal index 0feed79..6b313e8 100644 --- a/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal +++ b/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal @@ -9,17 +9,42 @@ main_entrypoint@2: // tests/artifacts/StateOps/contract.py:362 // class GlobalStateContract(ARC4Contract): txn NumAppArgs - bz main_bare_routing@10 + bz main_bare_routing@34 method "get_implicit_key_arc4_uint()uint64" method "get_implicit_key_arc4_string()string" + method "get_implicit_key_arc4_byte()byte" + method "get_implicit_key_arc4_bool()bool" + method "get_implicit_key_arc4_address()address" + method "get_implicit_key_arc4_uint128()uint128" + method "get_implicit_key_arc4_dynamic_bytes()byte[]" method "get_arc4_uint()uint64" method "get_arc4_string()string" + method "get_arc4_byte()byte" + method "get_arc4_bool()bool" + method "get_arc4_address()address" + method "get_arc4_uint128()uint128" + method "get_arc4_dynamic_bytes()byte[]" + method "set_implicit_key_arc4_uint(uint64)void" + method "set_implicit_key_arc4_string(string)void" + method "set_implicit_key_arc4_byte(byte)void" + method "set_implicit_key_arc4_bool(bool)void" + method "set_implicit_key_arc4_address(address)void" + method "set_implicit_key_arc4_uint128(uint128)void" + method "set_implicit_key_arc4_dynamic_bytes(byte[])void" + method "set_arc4_uint(uint64)void" + method "set_arc4_string(string)void" + method "set_arc4_byte(byte)void" + method "set_arc4_bool(bool)void" + method "set_arc4_address(address)void" + method "set_arc4_uint128(uint128)void" + method "set_arc4_dynamic_bytes(byte[])void" txna ApplicationArgs 0 - match main_get_implicit_key_arc4_uint_route@4 main_get_implicit_key_arc4_string_route@5 main_get_arc4_uint_route@6 main_get_arc4_string_route@7 + match main_get_implicit_key_arc4_uint_route@4 main_get_implicit_key_arc4_string_route@5 main_get_implicit_key_arc4_byte_route@6 main_get_implicit_key_arc4_bool_route@7 main_get_implicit_key_arc4_address_route@8 main_get_implicit_key_arc4_uint128_route@9 main_get_implicit_key_arc4_dynamic_bytes_route@10 main_get_arc4_uint_route@11 main_get_arc4_string_route@12 main_get_arc4_byte_route@13 main_get_arc4_bool_route@14 main_get_arc4_address_route@15 main_get_arc4_uint128_route@16 main_get_arc4_dynamic_bytes_route@17 main_set_implicit_key_arc4_uint_route@18 main_set_implicit_key_arc4_string_route@19 main_set_implicit_key_arc4_byte_route@20 main_set_implicit_key_arc4_bool_route@21 main_set_implicit_key_arc4_address_route@22 main_set_implicit_key_arc4_uint128_route@23 main_set_implicit_key_arc4_dynamic_bytes_route@24 main_set_arc4_uint_route@25 main_set_arc4_string_route@26 main_set_arc4_byte_route@27 main_set_arc4_bool_route@28 main_set_arc4_address_route@29 main_set_arc4_uint128_route@30 main_set_arc4_dynamic_bytes_route@31 err // reject transaction main_get_implicit_key_arc4_uint_route@4: - // tests/artifacts/StateOps/contract.py:369 + // tests/artifacts/StateOps/contract.py:386-387 + // # Getter methods for implicit key state variables // @arc4.abimethod() txn OnCompletion ! @@ -35,7 +60,7 @@ main_get_implicit_key_arc4_uint_route@4: return main_get_implicit_key_arc4_string_route@5: - // tests/artifacts/StateOps/contract.py:373 + // tests/artifacts/StateOps/contract.py:391 // @arc4.abimethod() txn OnCompletion ! @@ -50,8 +75,89 @@ main_get_implicit_key_arc4_string_route@5: int 1 return -main_get_arc4_uint_route@6: - // tests/artifacts/StateOps/contract.py:377 +main_get_implicit_key_arc4_byte_route@6: + // tests/artifacts/StateOps/contract.py:395 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_implicit_key_arc4_byte + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_implicit_key_arc4_bool_route@7: + // tests/artifacts/StateOps/contract.py:399 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_implicit_key_arc4_bool + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_implicit_key_arc4_address_route@8: + // tests/artifacts/StateOps/contract.py:403 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_implicit_key_arc4_address + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_implicit_key_arc4_uint128_route@9: + // tests/artifacts/StateOps/contract.py:407 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_implicit_key_arc4_uint128 + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_implicit_key_arc4_dynamic_bytes_route@10: + // tests/artifacts/StateOps/contract.py:411 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_implicit_key_arc4_dynamic_bytes + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_uint_route@11: + // tests/artifacts/StateOps/contract.py:415-416 + // # Getter methods for explicit key state variables // @arc4.abimethod() txn OnCompletion ! @@ -66,8 +172,8 @@ main_get_arc4_uint_route@6: int 1 return -main_get_arc4_string_route@7: - // tests/artifacts/StateOps/contract.py:381 +main_get_arc4_string_route@12: + // tests/artifacts/StateOps/contract.py:420 // @arc4.abimethod() txn OnCompletion ! @@ -82,7 +188,329 @@ main_get_arc4_string_route@7: int 1 return -main_bare_routing@10: +main_get_arc4_byte_route@13: + // tests/artifacts/StateOps/contract.py:424 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_arc4_byte + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_bool_route@14: + // tests/artifacts/StateOps/contract.py:428 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_arc4_bool + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_address_route@15: + // tests/artifacts/StateOps/contract.py:432 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_arc4_address + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_uint128_route@16: + // tests/artifacts/StateOps/contract.py:436 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_arc4_uint128 + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_dynamic_bytes_route@17: + // tests/artifacts/StateOps/contract.py:440 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub get_arc4_dynamic_bytes + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_set_implicit_key_arc4_uint_route@18: + // tests/artifacts/StateOps/contract.py:444-445 + // # Setter methods for implicit key state variables + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:444-445 + // # Setter methods for implicit key state variables + // @arc4.abimethod() + callsub set_implicit_key_arc4_uint + int 1 + return + +main_set_implicit_key_arc4_string_route@19: + // tests/artifacts/StateOps/contract.py:449 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:449 + // @arc4.abimethod() + callsub set_implicit_key_arc4_string + int 1 + return + +main_set_implicit_key_arc4_byte_route@20: + // tests/artifacts/StateOps/contract.py:453 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:453 + // @arc4.abimethod() + callsub set_implicit_key_arc4_byte + int 1 + return + +main_set_implicit_key_arc4_bool_route@21: + // tests/artifacts/StateOps/contract.py:457 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:457 + // @arc4.abimethod() + callsub set_implicit_key_arc4_bool + int 1 + return + +main_set_implicit_key_arc4_address_route@22: + // tests/artifacts/StateOps/contract.py:461 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:461 + // @arc4.abimethod() + callsub set_implicit_key_arc4_address + int 1 + return + +main_set_implicit_key_arc4_uint128_route@23: + // tests/artifacts/StateOps/contract.py:465 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:465 + // @arc4.abimethod() + callsub set_implicit_key_arc4_uint128 + int 1 + return + +main_set_implicit_key_arc4_dynamic_bytes_route@24: + // tests/artifacts/StateOps/contract.py:469 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:469 + // @arc4.abimethod() + callsub set_implicit_key_arc4_dynamic_bytes + int 1 + return + +main_set_arc4_uint_route@25: + // tests/artifacts/StateOps/contract.py:473-474 + // # Setter methods for explicit key state variables + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:473-474 + // # Setter methods for explicit key state variables + // @arc4.abimethod() + callsub set_arc4_uint + int 1 + return + +main_set_arc4_string_route@26: + // tests/artifacts/StateOps/contract.py:478 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:478 + // @arc4.abimethod() + callsub set_arc4_string + int 1 + return + +main_set_arc4_byte_route@27: + // tests/artifacts/StateOps/contract.py:482 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:482 + // @arc4.abimethod() + callsub set_arc4_byte + int 1 + return + +main_set_arc4_bool_route@28: + // tests/artifacts/StateOps/contract.py:486 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:486 + // @arc4.abimethod() + callsub set_arc4_bool + int 1 + return + +main_set_arc4_address_route@29: + // tests/artifacts/StateOps/contract.py:490 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:490 + // @arc4.abimethod() + callsub set_arc4_address + int 1 + return + +main_set_arc4_uint128_route@30: + // tests/artifacts/StateOps/contract.py:494 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:494 + // @arc4.abimethod() + callsub set_arc4_uint128 + int 1 + return + +main_set_arc4_dynamic_bytes_route@31: + // tests/artifacts/StateOps/contract.py:498 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:362 + // class GlobalStateContract(ARC4Contract): + txna ApplicationArgs 1 + // tests/artifacts/StateOps/contract.py:498 + // @arc4.abimethod() + callsub set_arc4_dynamic_bytes + int 1 + return + +main_bare_routing@34: // tests/artifacts/StateOps/contract.py:362 // class GlobalStateContract(ARC4Contract): txn OnCompletion @@ -97,17 +525,19 @@ main_bare_routing@10: // tests.artifacts.StateOps.contract.GlobalStateContract.get_implicit_key_arc4_uint() -> bytes: get_implicit_key_arc4_uint: - // tests/artifacts/StateOps/contract.py:369-370 + // tests/artifacts/StateOps/contract.py:386-388 + // # Getter methods for implicit key state variables // @arc4.abimethod() // def get_implicit_key_arc4_uint(self) -> arc4.UInt64: proto 0 1 - // tests/artifacts/StateOps/contract.py:371 + // tests/artifacts/StateOps/contract.py:389 // return self.implicit_key_arc4_uint.value int 0 - // tests/artifacts/StateOps/contract.py:364 + // tests/artifacts/StateOps/contract.py:364-365 + // # Implicit key state variables // self.implicit_key_arc4_uint = GlobalState(arc4.UInt64(1337)) byte "implicit_key_arc4_uint" - // tests/artifacts/StateOps/contract.py:371 + // tests/artifacts/StateOps/contract.py:389 // return self.implicit_key_arc4_uint.value app_global_get_ex assert // check self.implicit_key_arc4_uint exists @@ -116,36 +546,133 @@ get_implicit_key_arc4_uint: // tests.artifacts.StateOps.contract.GlobalStateContract.get_implicit_key_arc4_string() -> bytes: get_implicit_key_arc4_string: - // tests/artifacts/StateOps/contract.py:373-374 + // tests/artifacts/StateOps/contract.py:391-392 // @arc4.abimethod() // def get_implicit_key_arc4_string(self) -> arc4.String: proto 0 1 - // tests/artifacts/StateOps/contract.py:375 + // tests/artifacts/StateOps/contract.py:393 // return self.implicit_key_arc4_string.value int 0 - // tests/artifacts/StateOps/contract.py:365 + // tests/artifacts/StateOps/contract.py:366 // self.implicit_key_arc4_string = GlobalState(arc4.String("Hello")) byte "implicit_key_arc4_string" - // tests/artifacts/StateOps/contract.py:375 + // tests/artifacts/StateOps/contract.py:393 // return self.implicit_key_arc4_string.value app_global_get_ex assert // check self.implicit_key_arc4_string exists retsub +// tests.artifacts.StateOps.contract.GlobalStateContract.get_implicit_key_arc4_byte() -> bytes: +get_implicit_key_arc4_byte: + // tests/artifacts/StateOps/contract.py:395-396 + // @arc4.abimethod() + // def get_implicit_key_arc4_byte(self) -> arc4.Byte: + proto 0 1 + // tests/artifacts/StateOps/contract.py:397 + // return self.implicit_key_arc4_byte.value + int 0 + // tests/artifacts/StateOps/contract.py:367 + // self.implicit_key_arc4_byte = GlobalState(arc4.Byte(0)) + byte "implicit_key_arc4_byte" + // tests/artifacts/StateOps/contract.py:397 + // return self.implicit_key_arc4_byte.value + app_global_get_ex + assert // check self.implicit_key_arc4_byte exists + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.get_implicit_key_arc4_bool() -> bytes: +get_implicit_key_arc4_bool: + // tests/artifacts/StateOps/contract.py:399-400 + // @arc4.abimethod() + // def get_implicit_key_arc4_bool(self) -> arc4.Bool: + proto 0 1 + // tests/artifacts/StateOps/contract.py:401 + // return self.implicit_key_arc4_bool.value + int 0 + // tests/artifacts/StateOps/contract.py:368 + // self.implicit_key_arc4_bool = GlobalState(arc4.Bool(True)) + byte "implicit_key_arc4_bool" + // tests/artifacts/StateOps/contract.py:401 + // return self.implicit_key_arc4_bool.value + app_global_get_ex + assert // check self.implicit_key_arc4_bool exists + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.get_implicit_key_arc4_address() -> bytes: +get_implicit_key_arc4_address: + // tests/artifacts/StateOps/contract.py:403-404 + // @arc4.abimethod() + // def get_implicit_key_arc4_address(self) -> arc4.Address: + proto 0 1 + // tests/artifacts/StateOps/contract.py:405 + // return self.implicit_key_arc4_address.value + int 0 + // tests/artifacts/StateOps/contract.py:369 + // self.implicit_key_arc4_address = GlobalState(arc4.Address(Global.creator_address)) + byte "implicit_key_arc4_address" + // tests/artifacts/StateOps/contract.py:405 + // return self.implicit_key_arc4_address.value + app_global_get_ex + assert // check self.implicit_key_arc4_address exists + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.get_implicit_key_arc4_uint128() -> bytes: +get_implicit_key_arc4_uint128: + // tests/artifacts/StateOps/contract.py:407-408 + // @arc4.abimethod() + // def get_implicit_key_arc4_uint128(self) -> arc4.UInt128: + proto 0 1 + // tests/artifacts/StateOps/contract.py:409 + // return self.implicit_key_arc4_uint128.value + int 0 + // tests/artifacts/StateOps/contract.py:370 + // self.implicit_key_arc4_uint128 = GlobalState(arc4.UInt128(2**100)) + byte "implicit_key_arc4_uint128" + // tests/artifacts/StateOps/contract.py:409 + // return self.implicit_key_arc4_uint128.value + app_global_get_ex + assert // check self.implicit_key_arc4_uint128 exists + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.get_implicit_key_arc4_dynamic_bytes() -> bytes: +get_implicit_key_arc4_dynamic_bytes: + // tests/artifacts/StateOps/contract.py:411-412 + // @arc4.abimethod() + // def get_implicit_key_arc4_dynamic_bytes(self) -> arc4.DynamicBytes: + proto 0 1 + // tests/artifacts/StateOps/contract.py:413 + // return self.implicit_key_arc4_dynamic_bytes.value + int 0 + // tests/artifacts/StateOps/contract.py:371 + // self.implicit_key_arc4_dynamic_bytes = GlobalState(arc4.DynamicBytes(b"dynamic bytes")) + byte "implicit_key_arc4_dynamic_bytes" + // tests/artifacts/StateOps/contract.py:413 + // return self.implicit_key_arc4_dynamic_bytes.value + app_global_get_ex + assert // check self.implicit_key_arc4_dynamic_bytes exists + retsub + + // tests.artifacts.StateOps.contract.GlobalStateContract.get_arc4_uint() -> bytes: get_arc4_uint: - // tests/artifacts/StateOps/contract.py:377-378 + // tests/artifacts/StateOps/contract.py:415-417 + // # Getter methods for explicit key state variables // @arc4.abimethod() // def get_arc4_uint(self) -> arc4.UInt64: proto 0 1 - // tests/artifacts/StateOps/contract.py:379 + // tests/artifacts/StateOps/contract.py:418 // return self.arc4_uint.value int 0 - // tests/artifacts/StateOps/contract.py:366 + // tests/artifacts/StateOps/contract.py:373-374 + // # Explicit key state variables // self.arc4_uint = GlobalState(arc4.UInt64(1337), key="explicit_key_arc4_uint") byte "explicit_key_arc4_uint" - // tests/artifacts/StateOps/contract.py:379 + // tests/artifacts/StateOps/contract.py:418 // return self.arc4_uint.value app_global_get_ex assert // check self.arc4_uint exists @@ -154,46 +681,429 @@ get_arc4_uint: // tests.artifacts.StateOps.contract.GlobalStateContract.get_arc4_string() -> bytes: get_arc4_string: - // tests/artifacts/StateOps/contract.py:381-382 + // tests/artifacts/StateOps/contract.py:420-421 // @arc4.abimethod() // def get_arc4_string(self) -> arc4.String: proto 0 1 - // tests/artifacts/StateOps/contract.py:383 + // tests/artifacts/StateOps/contract.py:422 // return self.arc4_string.value int 0 - // tests/artifacts/StateOps/contract.py:367 + // tests/artifacts/StateOps/contract.py:375 // self.arc4_string = GlobalState(arc4.String("Hello"), key="explicit_key_arc4_string") byte "explicit_key_arc4_string" - // tests/artifacts/StateOps/contract.py:383 + // tests/artifacts/StateOps/contract.py:422 // return self.arc4_string.value app_global_get_ex assert // check self.arc4_string exists retsub +// tests.artifacts.StateOps.contract.GlobalStateContract.get_arc4_byte() -> bytes: +get_arc4_byte: + // tests/artifacts/StateOps/contract.py:424-425 + // @arc4.abimethod() + // def get_arc4_byte(self) -> arc4.Byte: + proto 0 1 + // tests/artifacts/StateOps/contract.py:426 + // return self.arc4_byte.value + int 0 + // tests/artifacts/StateOps/contract.py:376 + // self.arc4_byte = GlobalState(arc4.Byte(0), key="explicit_key_arc4_byte") + byte "explicit_key_arc4_byte" + // tests/artifacts/StateOps/contract.py:426 + // return self.arc4_byte.value + app_global_get_ex + assert // check self.arc4_byte exists + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.get_arc4_bool() -> bytes: +get_arc4_bool: + // tests/artifacts/StateOps/contract.py:428-429 + // @arc4.abimethod() + // def get_arc4_bool(self) -> arc4.Bool: + proto 0 1 + // tests/artifacts/StateOps/contract.py:430 + // return self.arc4_bool.value + int 0 + // tests/artifacts/StateOps/contract.py:377 + // self.arc4_bool = GlobalState(arc4.Bool(True), key="explicit_key_arc4_bool") + byte "explicit_key_arc4_bool" + // tests/artifacts/StateOps/contract.py:430 + // return self.arc4_bool.value + app_global_get_ex + assert // check self.arc4_bool exists + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.get_arc4_address() -> bytes: +get_arc4_address: + // tests/artifacts/StateOps/contract.py:432-433 + // @arc4.abimethod() + // def get_arc4_address(self) -> arc4.Address: + proto 0 1 + // tests/artifacts/StateOps/contract.py:434 + // return self.arc4_address.value + int 0 + // tests/artifacts/StateOps/contract.py:379 + // arc4.Address(Global.creator_address), key="explicit_key_arc4_address" + byte "explicit_key_arc4_address" + // tests/artifacts/StateOps/contract.py:434 + // return self.arc4_address.value + app_global_get_ex + assert // check self.arc4_address exists + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.get_arc4_uint128() -> bytes: +get_arc4_uint128: + // tests/artifacts/StateOps/contract.py:436-437 + // @arc4.abimethod() + // def get_arc4_uint128(self) -> arc4.UInt128: + proto 0 1 + // tests/artifacts/StateOps/contract.py:438 + // return self.arc4_uint128.value + int 0 + // tests/artifacts/StateOps/contract.py:381 + // self.arc4_uint128 = GlobalState(arc4.UInt128(2**100), key="explicit_key_arc4_uint128") + byte "explicit_key_arc4_uint128" + // tests/artifacts/StateOps/contract.py:438 + // return self.arc4_uint128.value + app_global_get_ex + assert // check self.arc4_uint128 exists + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.get_arc4_dynamic_bytes() -> bytes: +get_arc4_dynamic_bytes: + // tests/artifacts/StateOps/contract.py:440-441 + // @arc4.abimethod() + // def get_arc4_dynamic_bytes(self) -> arc4.DynamicBytes: + proto 0 1 + // tests/artifacts/StateOps/contract.py:442 + // return self.arc4_dynamic_bytes.value + int 0 + // tests/artifacts/StateOps/contract.py:383 + // arc4.DynamicBytes(b"dynamic bytes"), key="explicit_key_arc4_dynamic_bytes" + byte "explicit_key_arc4_dynamic_bytes" + // tests/artifacts/StateOps/contract.py:442 + // return self.arc4_dynamic_bytes.value + app_global_get_ex + assert // check self.arc4_dynamic_bytes exists + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_implicit_key_arc4_uint(value: bytes) -> void: +set_implicit_key_arc4_uint: + // tests/artifacts/StateOps/contract.py:444-446 + // # Setter methods for implicit key state variables + // @arc4.abimethod() + // def set_implicit_key_arc4_uint(self, value: arc4.UInt64) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:364-365 + // # Implicit key state variables + // self.implicit_key_arc4_uint = GlobalState(arc4.UInt64(1337)) + byte "implicit_key_arc4_uint" + // tests/artifacts/StateOps/contract.py:447 + // self.implicit_key_arc4_uint.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_implicit_key_arc4_string(value: bytes) -> void: +set_implicit_key_arc4_string: + // tests/artifacts/StateOps/contract.py:449-450 + // @arc4.abimethod() + // def set_implicit_key_arc4_string(self, value: arc4.String) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:366 + // self.implicit_key_arc4_string = GlobalState(arc4.String("Hello")) + byte "implicit_key_arc4_string" + // tests/artifacts/StateOps/contract.py:451 + // self.implicit_key_arc4_string.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_implicit_key_arc4_byte(value: bytes) -> void: +set_implicit_key_arc4_byte: + // tests/artifacts/StateOps/contract.py:453-454 + // @arc4.abimethod() + // def set_implicit_key_arc4_byte(self, value: arc4.Byte) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:367 + // self.implicit_key_arc4_byte = GlobalState(arc4.Byte(0)) + byte "implicit_key_arc4_byte" + // tests/artifacts/StateOps/contract.py:455 + // self.implicit_key_arc4_byte.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_implicit_key_arc4_bool(value: bytes) -> void: +set_implicit_key_arc4_bool: + // tests/artifacts/StateOps/contract.py:457-458 + // @arc4.abimethod() + // def set_implicit_key_arc4_bool(self, value: arc4.Bool) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:368 + // self.implicit_key_arc4_bool = GlobalState(arc4.Bool(True)) + byte "implicit_key_arc4_bool" + // tests/artifacts/StateOps/contract.py:459 + // self.implicit_key_arc4_bool.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_implicit_key_arc4_address(value: bytes) -> void: +set_implicit_key_arc4_address: + // tests/artifacts/StateOps/contract.py:461-462 + // @arc4.abimethod() + // def set_implicit_key_arc4_address(self, value: arc4.Address) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:369 + // self.implicit_key_arc4_address = GlobalState(arc4.Address(Global.creator_address)) + byte "implicit_key_arc4_address" + // tests/artifacts/StateOps/contract.py:463 + // self.implicit_key_arc4_address.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_implicit_key_arc4_uint128(value: bytes) -> void: +set_implicit_key_arc4_uint128: + // tests/artifacts/StateOps/contract.py:465-466 + // @arc4.abimethod() + // def set_implicit_key_arc4_uint128(self, value: arc4.UInt128) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:370 + // self.implicit_key_arc4_uint128 = GlobalState(arc4.UInt128(2**100)) + byte "implicit_key_arc4_uint128" + // tests/artifacts/StateOps/contract.py:467 + // self.implicit_key_arc4_uint128.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_implicit_key_arc4_dynamic_bytes(value: bytes) -> void: +set_implicit_key_arc4_dynamic_bytes: + // tests/artifacts/StateOps/contract.py:469-470 + // @arc4.abimethod() + // def set_implicit_key_arc4_dynamic_bytes(self, value: arc4.DynamicBytes) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:371 + // self.implicit_key_arc4_dynamic_bytes = GlobalState(arc4.DynamicBytes(b"dynamic bytes")) + byte "implicit_key_arc4_dynamic_bytes" + // tests/artifacts/StateOps/contract.py:471 + // self.implicit_key_arc4_dynamic_bytes.value = value.copy() + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_arc4_uint(value: bytes) -> void: +set_arc4_uint: + // tests/artifacts/StateOps/contract.py:473-475 + // # Setter methods for explicit key state variables + // @arc4.abimethod() + // def set_arc4_uint(self, value: arc4.UInt64) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:373-374 + // # Explicit key state variables + // self.arc4_uint = GlobalState(arc4.UInt64(1337), key="explicit_key_arc4_uint") + byte "explicit_key_arc4_uint" + // tests/artifacts/StateOps/contract.py:476 + // self.arc4_uint.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_arc4_string(value: bytes) -> void: +set_arc4_string: + // tests/artifacts/StateOps/contract.py:478-479 + // @arc4.abimethod() + // def set_arc4_string(self, value: arc4.String) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:375 + // self.arc4_string = GlobalState(arc4.String("Hello"), key="explicit_key_arc4_string") + byte "explicit_key_arc4_string" + // tests/artifacts/StateOps/contract.py:480 + // self.arc4_string.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_arc4_byte(value: bytes) -> void: +set_arc4_byte: + // tests/artifacts/StateOps/contract.py:482-483 + // @arc4.abimethod() + // def set_arc4_byte(self, value: arc4.Byte) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:376 + // self.arc4_byte = GlobalState(arc4.Byte(0), key="explicit_key_arc4_byte") + byte "explicit_key_arc4_byte" + // tests/artifacts/StateOps/contract.py:484 + // self.arc4_byte.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_arc4_bool(value: bytes) -> void: +set_arc4_bool: + // tests/artifacts/StateOps/contract.py:486-487 + // @arc4.abimethod() + // def set_arc4_bool(self, value: arc4.Bool) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:377 + // self.arc4_bool = GlobalState(arc4.Bool(True), key="explicit_key_arc4_bool") + byte "explicit_key_arc4_bool" + // tests/artifacts/StateOps/contract.py:488 + // self.arc4_bool.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_arc4_address(value: bytes) -> void: +set_arc4_address: + // tests/artifacts/StateOps/contract.py:490-491 + // @arc4.abimethod() + // def set_arc4_address(self, value: arc4.Address) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:379 + // arc4.Address(Global.creator_address), key="explicit_key_arc4_address" + byte "explicit_key_arc4_address" + // tests/artifacts/StateOps/contract.py:492 + // self.arc4_address.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_arc4_uint128(value: bytes) -> void: +set_arc4_uint128: + // tests/artifacts/StateOps/contract.py:494-495 + // @arc4.abimethod() + // def set_arc4_uint128(self, value: arc4.UInt128) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:381 + // self.arc4_uint128 = GlobalState(arc4.UInt128(2**100), key="explicit_key_arc4_uint128") + byte "explicit_key_arc4_uint128" + // tests/artifacts/StateOps/contract.py:496 + // self.arc4_uint128.value = value + frame_dig -1 + app_global_put + retsub + + +// tests.artifacts.StateOps.contract.GlobalStateContract.set_arc4_dynamic_bytes(value: bytes) -> void: +set_arc4_dynamic_bytes: + // tests/artifacts/StateOps/contract.py:498-499 + // @arc4.abimethod() + // def set_arc4_dynamic_bytes(self, value: arc4.DynamicBytes) -> None: + proto 1 0 + // tests/artifacts/StateOps/contract.py:383 + // arc4.DynamicBytes(b"dynamic bytes"), key="explicit_key_arc4_dynamic_bytes" + byte "explicit_key_arc4_dynamic_bytes" + // tests/artifacts/StateOps/contract.py:500 + // self.arc4_dynamic_bytes.value = value.copy() + frame_dig -1 + app_global_put + retsub + + // tests.artifacts.StateOps.contract.GlobalStateContract.__init__() -> void: __init__: // tests/artifacts/StateOps/contract.py:363 // def __init__(self) -> None: proto 0 0 - // tests/artifacts/StateOps/contract.py:364 + // tests/artifacts/StateOps/contract.py:364-365 + // # Implicit key state variables // self.implicit_key_arc4_uint = GlobalState(arc4.UInt64(1337)) byte "implicit_key_arc4_uint" byte 0x0000000000000539 app_global_put - // tests/artifacts/StateOps/contract.py:365 + // tests/artifacts/StateOps/contract.py:366 // self.implicit_key_arc4_string = GlobalState(arc4.String("Hello")) byte "implicit_key_arc4_string" byte 0x000548656c6c6f app_global_put - // tests/artifacts/StateOps/contract.py:366 + // tests/artifacts/StateOps/contract.py:367 + // self.implicit_key_arc4_byte = GlobalState(arc4.Byte(0)) + byte "implicit_key_arc4_byte" + byte 0x00 + app_global_put + // tests/artifacts/StateOps/contract.py:368 + // self.implicit_key_arc4_bool = GlobalState(arc4.Bool(True)) + byte "implicit_key_arc4_bool" + byte 0x80 + app_global_put + // tests/artifacts/StateOps/contract.py:369 + // self.implicit_key_arc4_address = GlobalState(arc4.Address(Global.creator_address)) + byte "implicit_key_arc4_address" + global CreatorAddress + app_global_put + // tests/artifacts/StateOps/contract.py:370 + // self.implicit_key_arc4_uint128 = GlobalState(arc4.UInt128(2**100)) + byte "implicit_key_arc4_uint128" + byte 0x00000010000000000000000000000000 + app_global_put + // tests/artifacts/StateOps/contract.py:371 + // self.implicit_key_arc4_dynamic_bytes = GlobalState(arc4.DynamicBytes(b"dynamic bytes")) + byte "implicit_key_arc4_dynamic_bytes" + byte 0x000d64796e616d6963206279746573 + app_global_put + // tests/artifacts/StateOps/contract.py:373-374 + // # Explicit key state variables // self.arc4_uint = GlobalState(arc4.UInt64(1337), key="explicit_key_arc4_uint") byte "explicit_key_arc4_uint" byte 0x0000000000000539 app_global_put - // tests/artifacts/StateOps/contract.py:367 + // tests/artifacts/StateOps/contract.py:375 // self.arc4_string = GlobalState(arc4.String("Hello"), key="explicit_key_arc4_string") byte "explicit_key_arc4_string" byte 0x000548656c6c6f app_global_put + // tests/artifacts/StateOps/contract.py:376 + // self.arc4_byte = GlobalState(arc4.Byte(0), key="explicit_key_arc4_byte") + byte "explicit_key_arc4_byte" + byte 0x00 + app_global_put + // tests/artifacts/StateOps/contract.py:377 + // self.arc4_bool = GlobalState(arc4.Bool(True), key="explicit_key_arc4_bool") + byte "explicit_key_arc4_bool" + byte 0x80 + app_global_put + // tests/artifacts/StateOps/contract.py:379 + // arc4.Address(Global.creator_address), key="explicit_key_arc4_address" + byte "explicit_key_arc4_address" + global CreatorAddress + // tests/artifacts/StateOps/contract.py:378-380 + // self.arc4_address = GlobalState( + // arc4.Address(Global.creator_address), key="explicit_key_arc4_address" + // ) + app_global_put + // tests/artifacts/StateOps/contract.py:381 + // self.arc4_uint128 = GlobalState(arc4.UInt128(2**100), key="explicit_key_arc4_uint128") + byte "explicit_key_arc4_uint128" + byte 0x00000010000000000000000000000000 + app_global_put + // tests/artifacts/StateOps/contract.py:383 + // arc4.DynamicBytes(b"dynamic bytes"), key="explicit_key_arc4_dynamic_bytes" + byte "explicit_key_arc4_dynamic_bytes" + byte 0x000d64796e616d6963206279746573 + // tests/artifacts/StateOps/contract.py:382-384 + // self.arc4_dynamic_bytes = GlobalState( + // arc4.DynamicBytes(b"dynamic bytes"), key="explicit_key_arc4_dynamic_bytes" + // ) + app_global_put retsub diff --git a/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json b/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json index 1f8370a..a6880d7 100644 --- a/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json +++ b/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json @@ -10,6 +10,31 @@ "no_op": "CALL" } }, + "get_implicit_key_arc4_byte()byte": { + "call_config": { + "no_op": "CALL" + } + }, + "get_implicit_key_arc4_bool()bool": { + "call_config": { + "no_op": "CALL" + } + }, + "get_implicit_key_arc4_address()address": { + "call_config": { + "no_op": "CALL" + } + }, + "get_implicit_key_arc4_uint128()uint128": { + "call_config": { + "no_op": "CALL" + } + }, + "get_implicit_key_arc4_dynamic_bytes()byte[]": { + "call_config": { + "no_op": "CALL" + } + }, "get_arc4_uint()uint64": { "call_config": { "no_op": "CALL" @@ -19,15 +44,110 @@ "call_config": { "no_op": "CALL" } + }, + "get_arc4_byte()byte": { + "call_config": { + "no_op": "CALL" + } + }, + "get_arc4_bool()bool": { + "call_config": { + "no_op": "CALL" + } + }, + "get_arc4_address()address": { + "call_config": { + "no_op": "CALL" + } + }, + "get_arc4_uint128()uint128": { + "call_config": { + "no_op": "CALL" + } + }, + "get_arc4_dynamic_bytes()byte[]": { + "call_config": { + "no_op": "CALL" + } + }, + "set_implicit_key_arc4_uint(uint64)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_implicit_key_arc4_string(string)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_implicit_key_arc4_byte(byte)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_implicit_key_arc4_bool(bool)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_implicit_key_arc4_address(address)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_implicit_key_arc4_uint128(uint128)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_implicit_key_arc4_dynamic_bytes(byte[])void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_arc4_uint(uint64)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_arc4_string(string)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_arc4_byte(byte)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_arc4_bool(bool)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_arc4_address(address)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_arc4_uint128(uint128)void": { + "call_config": { + "no_op": "CALL" + } + }, + "set_arc4_dynamic_bytes(byte[])void": { + "call_config": { + "no_op": "CALL" + } } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy5hcnRpZmFjdHMuU3RhdGVPcHMuY29udHJhY3QuR2xvYmFsU3RhdGVDb250cmFjdC5hcHByb3ZhbF9wcm9ncmFtOgogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2VudHJ5cG9pbnRAMgogICAgY2FsbHN1YiBfX2luaXRfXwoKbWFpbl9lbnRyeXBvaW50QDI6CiAgICAvLyB0ZXN0cy9hcnRpZmFjdHMvU3RhdGVPcHMvY29udHJhY3QucHk6MzYyCiAgICAvLyBjbGFzcyBHbG9iYWxTdGF0ZUNvbnRyYWN0KEFSQzRDb250cmFjdCk6CiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogbWFpbl9iYXJlX3JvdXRpbmdAMTAKICAgIG1ldGhvZCAiZ2V0X2ltcGxpY2l0X2tleV9hcmM0X3VpbnQoKXVpbnQ2NCIKICAgIG1ldGhvZCAiZ2V0X2ltcGxpY2l0X2tleV9hcmM0X3N0cmluZygpc3RyaW5nIgogICAgbWV0aG9kICJnZXRfYXJjNF91aW50KCl1aW50NjQiCiAgICBtZXRob2QgImdldF9hcmM0X3N0cmluZygpc3RyaW5nIgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMAogICAgbWF0Y2ggbWFpbl9nZXRfaW1wbGljaXRfa2V5X2FyYzRfdWludF9yb3V0ZUA0IG1haW5fZ2V0X2ltcGxpY2l0X2tleV9hcmM0X3N0cmluZ19yb3V0ZUA1IG1haW5fZ2V0X2FyYzRfdWludF9yb3V0ZUA2IG1haW5fZ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ApCiAgICBhcHBfZ2xvYmFsX3B1dAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy5hcnRpZmFjdHMuU3RhdGVPcHMuY29udHJhY3QuR2xvYmFsU3RhdGVDb250cmFjdC5jbGVhcl9zdGF0ZV9wcm9ncmFtOgogICAgLy8gdGVzdHMvYXJ0aWZhY3RzL1N0YXRlT3BzL2NvbnRyYWN0LnB5OjM2MgogICAgLy8gY2xhc3MgR2xvYmFsU3RhdGVDb250cmFjdChBUkM0Q29udHJhY3QpOgogICAgaW50IDEKICAgIHJldHVybgo=" }, "state": { "global": { - "num_byte_slices": 4, + "num_byte_slices": 14, "num_uints": 0 }, "local": { @@ -38,6 +158,22 @@ "schema": { "global": { "declared": { + "arc4_address": { + "type": "bytes", + "key": "explicit_key_arc4_address" + }, + "arc4_bool": { + "type": "bytes", + "key": "explicit_key_arc4_bool" + }, + "arc4_byte": { + "type": "bytes", + "key": "explicit_key_arc4_byte" + }, + "arc4_dynamic_bytes": { + "type": "bytes", + "key": "explicit_key_arc4_dynamic_bytes" + }, "arc4_string": { "type": "bytes", "key": "explicit_key_arc4_string" @@ -46,6 +182,26 @@ "type": "bytes", "key": "explicit_key_arc4_uint" }, + "arc4_uint128": { + "type": "bytes", + "key": "explicit_key_arc4_uint128" + }, + "implicit_key_arc4_address": { + "type": "bytes", + "key": "implicit_key_arc4_address" + }, + "implicit_key_arc4_bool": { + "type": "bytes", + "key": "implicit_key_arc4_bool" + }, + "implicit_key_arc4_byte": { + "type": "bytes", + "key": "implicit_key_arc4_byte" + }, + "implicit_key_arc4_dynamic_bytes": { + "type": "bytes", + "key": "implicit_key_arc4_dynamic_bytes" + }, "implicit_key_arc4_string": { "type": "bytes", "key": "implicit_key_arc4_string" @@ -53,6 +209,10 @@ "implicit_key_arc4_uint": { "type": "bytes", "key": "implicit_key_arc4_uint" + }, + "implicit_key_arc4_uint128": { + "type": "bytes", + "key": "implicit_key_arc4_uint128" } }, "reserved": {} @@ -81,6 +241,46 @@ "type": "string" } }, + { + "name": "get_implicit_key_arc4_byte", + "args": [], + "readonly": false, + "returns": { + "type": "byte" + } + }, + { + "name": "get_implicit_key_arc4_bool", + "args": [], + "readonly": false, + "returns": { + "type": "bool" + } + }, + { + "name": "get_implicit_key_arc4_address", + "args": [], + "readonly": false, + "returns": { + "type": "address" + } + }, + { + "name": "get_implicit_key_arc4_uint128", + "args": [], + "readonly": false, + "returns": { + "type": "uint128" + } + }, + { + "name": "get_implicit_key_arc4_dynamic_bytes", + "args": [], + "readonly": false, + "returns": { + "type": "byte[]" + } + }, { "name": "get_arc4_uint", "args": [], @@ -96,6 +296,228 @@ "returns": { "type": "string" } + }, + { + "name": "get_arc4_byte", + "args": [], + "readonly": false, + "returns": { + "type": "byte" + } + }, + { + "name": "get_arc4_bool", + "args": [], + "readonly": false, + "returns": { + "type": "bool" + } + }, + { + "name": "get_arc4_address", + "args": [], + "readonly": false, + "returns": { + "type": "address" + } + }, + { + "name": "get_arc4_uint128", + "args": [], + "readonly": false, + "returns": { + "type": "uint128" + } + }, + { + "name": "get_arc4_dynamic_bytes", + "args": [], + "readonly": false, + "returns": { + "type": "byte[]" + } + }, + { + "name": "set_implicit_key_arc4_uint", + "args": [ + { + "type": "uint64", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_implicit_key_arc4_string", + "args": [ + { + "type": "string", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_implicit_key_arc4_byte", + "args": [ + { + "type": "byte", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_implicit_key_arc4_bool", + "args": [ + { + "type": "bool", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_implicit_key_arc4_address", + "args": [ + { + "type": "address", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_implicit_key_arc4_uint128", + "args": [ + { + "type": "uint128", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_implicit_key_arc4_dynamic_bytes", + "args": [ + { + "type": "byte[]", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_arc4_uint", + "args": [ + { + "type": "uint64", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_arc4_string", + "args": [ + { + "type": "string", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_arc4_byte", + "args": [ + { + "type": "byte", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_arc4_bool", + "args": [ + { + "type": "bool", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_arc4_address", + "args": [ + { + "type": "address", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_arc4_uint128", + "args": [ + { + "type": "uint128", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "set_arc4_dynamic_bytes", + "args": [ + { + "type": "byte[]", + "name": "value" + } + ], + "readonly": false, + "returns": { + "type": "void" + } } ], "networks": {} diff --git a/tests/artifacts/StateOps/data/LocalStateContract.approval.teal b/tests/artifacts/StateOps/data/LocalStateContract.approval.teal index 07c31c3..ca1764e 100644 --- a/tests/artifacts/StateOps/data/LocalStateContract.approval.teal +++ b/tests/artifacts/StateOps/data/LocalStateContract.approval.teal @@ -1,21 +1,31 @@ #pragma version 10 tests.artifacts.StateOps.contract.LocalStateContract.approval_program: - // tests/artifacts/StateOps/contract.py:386 + // tests/artifacts/StateOps/contract.py:503 // class LocalStateContract(ARC4Contract): txn NumAppArgs - bz main_bare_routing@9 + bz main_bare_routing@19 method "opt_in()void" method "get_implicit_key_arc4_uint(account)uint64" method "get_implicit_key_arc4_string(account)string" + method "get_implicit_key_arc4_byte(account)byte" + method "get_implicit_key_arc4_bool(account)bool" + method "get_implicit_key_arc4_address(account)address" + method "get_implicit_key_arc4_uint128(account)uint128" + method "get_implicit_key_arc4_dynamic_bytes(account)byte[]" method "get_arc4_uint(account)uint64" method "get_arc4_string(account)string" + method "get_arc4_byte(account)byte" + method "get_arc4_bool(account)bool" + method "get_arc4_address(account)address" + method "get_arc4_uint128(account)uint128" + method "get_arc4_dynamic_bytes(account)byte[]" txna ApplicationArgs 0 - match main_opt_in_route@2 main_get_implicit_key_arc4_uint_route@3 main_get_implicit_key_arc4_string_route@4 main_get_arc4_uint_route@5 main_get_arc4_string_route@6 + match main_opt_in_route@2 main_get_implicit_key_arc4_uint_route@3 main_get_implicit_key_arc4_string_route@4 main_get_implicit_key_arc4_byte_route@5 main_get_implicit_key_arc4_bool_route@6 main_get_implicit_key_arc4_address_route@7 main_get_implicit_key_arc4_uint128_route@8 main_get_implicit_key_arc4_dynamic_bytes_route@9 main_get_arc4_uint_route@10 main_get_arc4_string_route@11 main_get_arc4_byte_route@12 main_get_arc4_bool_route@13 main_get_arc4_address_route@14 main_get_arc4_uint128_route@15 main_get_arc4_dynamic_bytes_route@16 err // reject transaction main_opt_in_route@2: - // tests/artifacts/StateOps/contract.py:397 + // tests/artifacts/StateOps/contract.py:525 // @arc4.abimethod(allow_actions=["OptIn"]) txn OnCompletion int OptIn @@ -28,19 +38,21 @@ main_opt_in_route@2: return main_get_implicit_key_arc4_uint_route@3: - // tests/artifacts/StateOps/contract.py:404 + // tests/artifacts/StateOps/contract.py:547-548 + // # Getter methods for implicit key state variables // @arc4.abimethod() txn OnCompletion ! assert // OnCompletion is NoOp txn ApplicationID assert // is not creating - // tests/artifacts/StateOps/contract.py:386 + // tests/artifacts/StateOps/contract.py:503 // class LocalStateContract(ARC4Contract): txna ApplicationArgs 1 btoi txnas Accounts - // tests/artifacts/StateOps/contract.py:404 + // tests/artifacts/StateOps/contract.py:547-548 + // # Getter methods for implicit key state variables // @arc4.abimethod() callsub get_implicit_key_arc4_uint byte 0x151f7c75 @@ -51,19 +63,19 @@ main_get_implicit_key_arc4_uint_route@3: return main_get_implicit_key_arc4_string_route@4: - // tests/artifacts/StateOps/contract.py:408 + // tests/artifacts/StateOps/contract.py:552 // @arc4.abimethod() txn OnCompletion ! assert // OnCompletion is NoOp txn ApplicationID assert // is not creating - // tests/artifacts/StateOps/contract.py:386 + // tests/artifacts/StateOps/contract.py:503 // class LocalStateContract(ARC4Contract): txna ApplicationArgs 1 btoi txnas Accounts - // tests/artifacts/StateOps/contract.py:408 + // tests/artifacts/StateOps/contract.py:552 // @arc4.abimethod() callsub get_implicit_key_arc4_string byte 0x151f7c75 @@ -73,20 +85,137 @@ main_get_implicit_key_arc4_string_route@4: int 1 return -main_get_arc4_uint_route@5: - // tests/artifacts/StateOps/contract.py:412 +main_get_implicit_key_arc4_byte_route@5: + // tests/artifacts/StateOps/contract.py:556 // @arc4.abimethod() txn OnCompletion ! assert // OnCompletion is NoOp txn ApplicationID assert // is not creating - // tests/artifacts/StateOps/contract.py:386 + // tests/artifacts/StateOps/contract.py:503 // class LocalStateContract(ARC4Contract): txna ApplicationArgs 1 btoi txnas Accounts - // tests/artifacts/StateOps/contract.py:412 + // tests/artifacts/StateOps/contract.py:556 + // @arc4.abimethod() + callsub get_implicit_key_arc4_byte + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_implicit_key_arc4_bool_route@6: + // tests/artifacts/StateOps/contract.py:560 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:560 + // @arc4.abimethod() + callsub get_implicit_key_arc4_bool + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_implicit_key_arc4_address_route@7: + // tests/artifacts/StateOps/contract.py:564 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:564 + // @arc4.abimethod() + callsub get_implicit_key_arc4_address + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_implicit_key_arc4_uint128_route@8: + // tests/artifacts/StateOps/contract.py:568 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:568 + // @arc4.abimethod() + callsub get_implicit_key_arc4_uint128 + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_implicit_key_arc4_dynamic_bytes_route@9: + // tests/artifacts/StateOps/contract.py:572 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:572 + // @arc4.abimethod() + callsub get_implicit_key_arc4_dynamic_bytes + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_uint_route@10: + // tests/artifacts/StateOps/contract.py:576-577 + // # Getter methods for explicit key state variables + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:576-577 + // # Getter methods for explicit key state variables // @arc4.abimethod() callsub get_arc4_uint byte 0x151f7c75 @@ -96,20 +225,20 @@ main_get_arc4_uint_route@5: int 1 return -main_get_arc4_string_route@6: - // tests/artifacts/StateOps/contract.py:416 +main_get_arc4_string_route@11: + // tests/artifacts/StateOps/contract.py:581 // @arc4.abimethod() txn OnCompletion ! assert // OnCompletion is NoOp txn ApplicationID assert // is not creating - // tests/artifacts/StateOps/contract.py:386 + // tests/artifacts/StateOps/contract.py:503 // class LocalStateContract(ARC4Contract): txna ApplicationArgs 1 btoi txnas Accounts - // tests/artifacts/StateOps/contract.py:416 + // tests/artifacts/StateOps/contract.py:581 // @arc4.abimethod() callsub get_arc4_string byte 0x151f7c75 @@ -119,8 +248,123 @@ main_get_arc4_string_route@6: int 1 return -main_bare_routing@9: - // tests/artifacts/StateOps/contract.py:386 +main_get_arc4_byte_route@12: + // tests/artifacts/StateOps/contract.py:585 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:585 + // @arc4.abimethod() + callsub get_arc4_byte + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_bool_route@13: + // tests/artifacts/StateOps/contract.py:589 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:589 + // @arc4.abimethod() + callsub get_arc4_bool + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_address_route@14: + // tests/artifacts/StateOps/contract.py:593 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:593 + // @arc4.abimethod() + callsub get_arc4_address + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_uint128_route@15: + // tests/artifacts/StateOps/contract.py:597 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:597 + // @arc4.abimethod() + callsub get_arc4_uint128 + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_get_arc4_dynamic_bytes_route@16: + // tests/artifacts/StateOps/contract.py:601 + // @arc4.abimethod() + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/artifacts/StateOps/contract.py:503 + // class LocalStateContract(ARC4Contract): + txna ApplicationArgs 1 + btoi + txnas Accounts + // tests/artifacts/StateOps/contract.py:601 + // @arc4.abimethod() + callsub get_arc4_dynamic_bytes + byte 0x151f7c75 + swap + concat + log + int 1 + return + +main_bare_routing@19: + // tests/artifacts/StateOps/contract.py:503 // class LocalStateContract(ARC4Contract): txn OnCompletion ! @@ -134,67 +378,177 @@ main_bare_routing@9: // tests.artifacts.StateOps.contract.LocalStateContract.opt_in() -> void: opt_in: - // tests/artifacts/StateOps/contract.py:397-398 + // tests/artifacts/StateOps/contract.py:525-526 // @arc4.abimethod(allow_actions=["OptIn"]) // def opt_in(self) -> None: proto 0 0 - // tests/artifacts/StateOps/contract.py:399 + // tests/artifacts/StateOps/contract.py:527 // self.implicit_key_arc4_uint[Global.creator_address] = arc4.UInt64(1337) global CreatorAddress - // tests/artifacts/StateOps/contract.py:388 - // self.implicit_key_arc4_uint = LocalState( + // tests/artifacts/StateOps/contract.py:505-506 + // # Implicit key state variables + // self.implicit_key_arc4_uint = LocalState(arc4.UInt64) byte "implicit_key_arc4_uint" - // tests/artifacts/StateOps/contract.py:399 + // tests/artifacts/StateOps/contract.py:527 // self.implicit_key_arc4_uint[Global.creator_address] = arc4.UInt64(1337) byte 0x0000000000000539 app_local_put - // tests/artifacts/StateOps/contract.py:400 + // tests/artifacts/StateOps/contract.py:528 // self.implicit_key_arc4_string[Global.creator_address] = arc4.String("Hello") global CreatorAddress - // tests/artifacts/StateOps/contract.py:391 - // self.implicit_key_arc4_string = LocalState( + // tests/artifacts/StateOps/contract.py:507 + // self.implicit_key_arc4_string = LocalState(arc4.String) byte "implicit_key_arc4_string" - // tests/artifacts/StateOps/contract.py:400 + // tests/artifacts/StateOps/contract.py:528 // self.implicit_key_arc4_string[Global.creator_address] = arc4.String("Hello") byte 0x000548656c6c6f app_local_put - // tests/artifacts/StateOps/contract.py:401 + // tests/artifacts/StateOps/contract.py:529 + // self.implicit_key_arc4_byte[Global.creator_address] = arc4.Byte(0) + global CreatorAddress + // tests/artifacts/StateOps/contract.py:508 + // self.implicit_key_arc4_byte = LocalState(arc4.Byte) + byte "implicit_key_arc4_byte" + // tests/artifacts/StateOps/contract.py:529 + // self.implicit_key_arc4_byte[Global.creator_address] = arc4.Byte(0) + byte 0x00 + app_local_put + // tests/artifacts/StateOps/contract.py:530 + // self.implicit_key_arc4_bool[Global.creator_address] = arc4.Bool(True) + global CreatorAddress + // tests/artifacts/StateOps/contract.py:509 + // self.implicit_key_arc4_bool = LocalState(arc4.Bool) + byte "implicit_key_arc4_bool" + // tests/artifacts/StateOps/contract.py:530 + // self.implicit_key_arc4_bool[Global.creator_address] = arc4.Bool(True) + byte 0x80 + app_local_put + // tests/artifacts/StateOps/contract.py:531 + // self.implicit_key_arc4_address[Global.creator_address] = arc4.Address( + global CreatorAddress + // tests/artifacts/StateOps/contract.py:510 + // self.implicit_key_arc4_address = LocalState(arc4.Address) + byte "implicit_key_arc4_address" + // tests/artifacts/StateOps/contract.py:532 + // Global.creator_address + global CreatorAddress + // tests/artifacts/StateOps/contract.py:531-533 + // self.implicit_key_arc4_address[Global.creator_address] = arc4.Address( + // Global.creator_address + // ) + app_local_put + // tests/artifacts/StateOps/contract.py:534 + // self.implicit_key_arc4_uint128[Global.creator_address] = arc4.UInt128(2**100) + global CreatorAddress + // tests/artifacts/StateOps/contract.py:511 + // self.implicit_key_arc4_uint128 = LocalState(arc4.UInt128) + byte "implicit_key_arc4_uint128" + // tests/artifacts/StateOps/contract.py:534 + // self.implicit_key_arc4_uint128[Global.creator_address] = arc4.UInt128(2**100) + byte 0x00000010000000000000000000000000 + app_local_put + // tests/artifacts/StateOps/contract.py:535 + // self.implicit_key_arc4_dynamic_bytes[Global.creator_address] = arc4.DynamicBytes( + global CreatorAddress + // tests/artifacts/StateOps/contract.py:512 + // self.implicit_key_arc4_dynamic_bytes = LocalState(arc4.DynamicBytes) + byte "implicit_key_arc4_dynamic_bytes" + // tests/artifacts/StateOps/contract.py:535-537 + // self.implicit_key_arc4_dynamic_bytes[Global.creator_address] = arc4.DynamicBytes( + // b"dynamic bytes" + // ) + byte 0x000d64796e616d6963206279746573 + app_local_put + // tests/artifacts/StateOps/contract.py:539 // self.arc4_uint[Global.creator_address] = arc4.UInt64(1337) global CreatorAddress - // tests/artifacts/StateOps/contract.py:394 + // tests/artifacts/StateOps/contract.py:514-515 + // # Explicit key state variables // self.arc4_uint = LocalState(arc4.UInt64, key="explicit_key_arc4_uint") byte "explicit_key_arc4_uint" - // tests/artifacts/StateOps/contract.py:401 + // tests/artifacts/StateOps/contract.py:539 // self.arc4_uint[Global.creator_address] = arc4.UInt64(1337) byte 0x0000000000000539 app_local_put - // tests/artifacts/StateOps/contract.py:402 + // tests/artifacts/StateOps/contract.py:540 // self.arc4_string[Global.creator_address] = arc4.String("Hello") global CreatorAddress - // tests/artifacts/StateOps/contract.py:395 + // tests/artifacts/StateOps/contract.py:516 // self.arc4_string = LocalState(arc4.String, key="explicit_key_arc4_string") byte "explicit_key_arc4_string" - // tests/artifacts/StateOps/contract.py:402 + // tests/artifacts/StateOps/contract.py:540 // self.arc4_string[Global.creator_address] = arc4.String("Hello") byte 0x000548656c6c6f app_local_put + // tests/artifacts/StateOps/contract.py:541 + // self.arc4_byte[Global.creator_address] = arc4.Byte(0) + global CreatorAddress + // tests/artifacts/StateOps/contract.py:517 + // self.arc4_byte = LocalState(arc4.Byte, key="explicit_key_arc4_byte") + byte "explicit_key_arc4_byte" + // tests/artifacts/StateOps/contract.py:541 + // self.arc4_byte[Global.creator_address] = arc4.Byte(0) + byte 0x00 + app_local_put + // tests/artifacts/StateOps/contract.py:542 + // self.arc4_bool[Global.creator_address] = arc4.Bool(True) + global CreatorAddress + // tests/artifacts/StateOps/contract.py:518 + // self.arc4_bool = LocalState(arc4.Bool, key="explicit_key_arc4_bool") + byte "explicit_key_arc4_bool" + // tests/artifacts/StateOps/contract.py:542 + // self.arc4_bool[Global.creator_address] = arc4.Bool(True) + byte 0x80 + app_local_put + // tests/artifacts/StateOps/contract.py:543 + // self.arc4_address[Global.creator_address] = arc4.Address(Global.creator_address) + global CreatorAddress + // tests/artifacts/StateOps/contract.py:519 + // self.arc4_address = LocalState(arc4.Address, key="explicit_key_arc4_address") + byte "explicit_key_arc4_address" + // tests/artifacts/StateOps/contract.py:543 + // self.arc4_address[Global.creator_address] = arc4.Address(Global.creator_address) + global CreatorAddress + app_local_put + // tests/artifacts/StateOps/contract.py:544 + // self.arc4_uint128[Global.creator_address] = arc4.UInt128(2**100) + global CreatorAddress + // tests/artifacts/StateOps/contract.py:520 + // self.arc4_uint128 = LocalState(arc4.UInt128, key="explicit_key_arc4_uint128") + byte "explicit_key_arc4_uint128" + // tests/artifacts/StateOps/contract.py:544 + // self.arc4_uint128[Global.creator_address] = arc4.UInt128(2**100) + byte 0x00000010000000000000000000000000 + app_local_put + // tests/artifacts/StateOps/contract.py:545 + // self.arc4_dynamic_bytes[Global.creator_address] = arc4.DynamicBytes(b"dynamic bytes") + global CreatorAddress + // tests/artifacts/StateOps/contract.py:522 + // arc4.DynamicBytes, key="explicit_key_arc4_dynamic_bytes" + byte "explicit_key_arc4_dynamic_bytes" + // tests/artifacts/StateOps/contract.py:545 + // self.arc4_dynamic_bytes[Global.creator_address] = arc4.DynamicBytes(b"dynamic bytes") + byte 0x000d64796e616d6963206279746573 + app_local_put retsub // tests.artifacts.StateOps.contract.LocalStateContract.get_implicit_key_arc4_uint(a: bytes) -> bytes: get_implicit_key_arc4_uint: - // tests/artifacts/StateOps/contract.py:404-405 + // tests/artifacts/StateOps/contract.py:547-549 + // # Getter methods for implicit key state variables // @arc4.abimethod() // def get_implicit_key_arc4_uint(self, a: Account) -> arc4.UInt64: proto 1 1 - // tests/artifacts/StateOps/contract.py:406 + // tests/artifacts/StateOps/contract.py:550 // return self.implicit_key_arc4_uint[a] frame_dig -1 int 0 - // tests/artifacts/StateOps/contract.py:388 - // self.implicit_key_arc4_uint = LocalState( + // tests/artifacts/StateOps/contract.py:505-506 + // # Implicit key state variables + // self.implicit_key_arc4_uint = LocalState(arc4.UInt64) byte "implicit_key_arc4_uint" - // tests/artifacts/StateOps/contract.py:406 + // tests/artifacts/StateOps/contract.py:550 // return self.implicit_key_arc4_uint[a] app_local_get_ex assert // check self.implicit_key_arc4_uint exists for account @@ -203,38 +557,140 @@ get_implicit_key_arc4_uint: // tests.artifacts.StateOps.contract.LocalStateContract.get_implicit_key_arc4_string(a: bytes) -> bytes: get_implicit_key_arc4_string: - // tests/artifacts/StateOps/contract.py:408-409 + // tests/artifacts/StateOps/contract.py:552-553 // @arc4.abimethod() // def get_implicit_key_arc4_string(self, a: Account) -> arc4.String: proto 1 1 - // tests/artifacts/StateOps/contract.py:410 + // tests/artifacts/StateOps/contract.py:554 // return self.implicit_key_arc4_string[a] frame_dig -1 int 0 - // tests/artifacts/StateOps/contract.py:391 - // self.implicit_key_arc4_string = LocalState( + // tests/artifacts/StateOps/contract.py:507 + // self.implicit_key_arc4_string = LocalState(arc4.String) byte "implicit_key_arc4_string" - // tests/artifacts/StateOps/contract.py:410 + // tests/artifacts/StateOps/contract.py:554 // return self.implicit_key_arc4_string[a] app_local_get_ex assert // check self.implicit_key_arc4_string exists for account retsub +// tests.artifacts.StateOps.contract.LocalStateContract.get_implicit_key_arc4_byte(a: bytes) -> bytes: +get_implicit_key_arc4_byte: + // tests/artifacts/StateOps/contract.py:556-557 + // @arc4.abimethod() + // def get_implicit_key_arc4_byte(self, a: Account) -> arc4.Byte: + proto 1 1 + // tests/artifacts/StateOps/contract.py:558 + // return self.implicit_key_arc4_byte[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:508 + // self.implicit_key_arc4_byte = LocalState(arc4.Byte) + byte "implicit_key_arc4_byte" + // tests/artifacts/StateOps/contract.py:558 + // return self.implicit_key_arc4_byte[a] + app_local_get_ex + assert // check self.implicit_key_arc4_byte exists for account + retsub + + +// tests.artifacts.StateOps.contract.LocalStateContract.get_implicit_key_arc4_bool(a: bytes) -> bytes: +get_implicit_key_arc4_bool: + // tests/artifacts/StateOps/contract.py:560-561 + // @arc4.abimethod() + // def get_implicit_key_arc4_bool(self, a: Account) -> arc4.Bool: + proto 1 1 + // tests/artifacts/StateOps/contract.py:562 + // return self.implicit_key_arc4_bool[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:509 + // self.implicit_key_arc4_bool = LocalState(arc4.Bool) + byte "implicit_key_arc4_bool" + // tests/artifacts/StateOps/contract.py:562 + // return self.implicit_key_arc4_bool[a] + app_local_get_ex + assert // check self.implicit_key_arc4_bool exists for account + retsub + + +// tests.artifacts.StateOps.contract.LocalStateContract.get_implicit_key_arc4_address(a: bytes) -> bytes: +get_implicit_key_arc4_address: + // tests/artifacts/StateOps/contract.py:564-565 + // @arc4.abimethod() + // def get_implicit_key_arc4_address(self, a: Account) -> arc4.Address: + proto 1 1 + // tests/artifacts/StateOps/contract.py:566 + // return self.implicit_key_arc4_address[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:510 + // self.implicit_key_arc4_address = LocalState(arc4.Address) + byte "implicit_key_arc4_address" + // tests/artifacts/StateOps/contract.py:566 + // return self.implicit_key_arc4_address[a] + app_local_get_ex + assert // check self.implicit_key_arc4_address exists for account + retsub + + +// tests.artifacts.StateOps.contract.LocalStateContract.get_implicit_key_arc4_uint128(a: bytes) -> bytes: +get_implicit_key_arc4_uint128: + // tests/artifacts/StateOps/contract.py:568-569 + // @arc4.abimethod() + // def get_implicit_key_arc4_uint128(self, a: Account) -> arc4.UInt128: + proto 1 1 + // tests/artifacts/StateOps/contract.py:570 + // return self.implicit_key_arc4_uint128[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:511 + // self.implicit_key_arc4_uint128 = LocalState(arc4.UInt128) + byte "implicit_key_arc4_uint128" + // tests/artifacts/StateOps/contract.py:570 + // return self.implicit_key_arc4_uint128[a] + app_local_get_ex + assert // check self.implicit_key_arc4_uint128 exists for account + retsub + + +// tests.artifacts.StateOps.contract.LocalStateContract.get_implicit_key_arc4_dynamic_bytes(a: bytes) -> bytes: +get_implicit_key_arc4_dynamic_bytes: + // tests/artifacts/StateOps/contract.py:572-573 + // @arc4.abimethod() + // def get_implicit_key_arc4_dynamic_bytes(self, a: Account) -> arc4.DynamicBytes: + proto 1 1 + // tests/artifacts/StateOps/contract.py:574 + // return self.implicit_key_arc4_dynamic_bytes[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:512 + // self.implicit_key_arc4_dynamic_bytes = LocalState(arc4.DynamicBytes) + byte "implicit_key_arc4_dynamic_bytes" + // tests/artifacts/StateOps/contract.py:574 + // return self.implicit_key_arc4_dynamic_bytes[a] + app_local_get_ex + assert // check self.implicit_key_arc4_dynamic_bytes exists for account + retsub + + // tests.artifacts.StateOps.contract.LocalStateContract.get_arc4_uint(a: bytes) -> bytes: get_arc4_uint: - // tests/artifacts/StateOps/contract.py:412-413 + // tests/artifacts/StateOps/contract.py:576-578 + // # Getter methods for explicit key state variables // @arc4.abimethod() // def get_arc4_uint(self, a: Account) -> arc4.UInt64: proto 1 1 - // tests/artifacts/StateOps/contract.py:414 + // tests/artifacts/StateOps/contract.py:579 // return self.arc4_uint[a] frame_dig -1 int 0 - // tests/artifacts/StateOps/contract.py:394 + // tests/artifacts/StateOps/contract.py:514-515 + // # Explicit key state variables // self.arc4_uint = LocalState(arc4.UInt64, key="explicit_key_arc4_uint") byte "explicit_key_arc4_uint" - // tests/artifacts/StateOps/contract.py:414 + // tests/artifacts/StateOps/contract.py:579 // return self.arc4_uint[a] app_local_get_ex assert // check self.arc4_uint exists for account @@ -243,19 +699,119 @@ get_arc4_uint: // tests.artifacts.StateOps.contract.LocalStateContract.get_arc4_string(a: bytes) -> bytes: get_arc4_string: - // tests/artifacts/StateOps/contract.py:416-417 + // tests/artifacts/StateOps/contract.py:581-582 // @arc4.abimethod() // def get_arc4_string(self, a: Account) -> arc4.String: proto 1 1 - // tests/artifacts/StateOps/contract.py:418 + // tests/artifacts/StateOps/contract.py:583 // return self.arc4_string[a] frame_dig -1 int 0 - // tests/artifacts/StateOps/contract.py:395 + // tests/artifacts/StateOps/contract.py:516 // self.arc4_string = LocalState(arc4.String, key="explicit_key_arc4_string") byte "explicit_key_arc4_string" - // tests/artifacts/StateOps/contract.py:418 + // tests/artifacts/StateOps/contract.py:583 // return self.arc4_string[a] app_local_get_ex assert // check self.arc4_string exists for account retsub + + +// tests.artifacts.StateOps.contract.LocalStateContract.get_arc4_byte(a: bytes) -> bytes: +get_arc4_byte: + // tests/artifacts/StateOps/contract.py:585-586 + // @arc4.abimethod() + // def get_arc4_byte(self, a: Account) -> arc4.Byte: + proto 1 1 + // tests/artifacts/StateOps/contract.py:587 + // return self.arc4_byte[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:517 + // self.arc4_byte = LocalState(arc4.Byte, key="explicit_key_arc4_byte") + byte "explicit_key_arc4_byte" + // tests/artifacts/StateOps/contract.py:587 + // return self.arc4_byte[a] + app_local_get_ex + assert // check self.arc4_byte exists for account + retsub + + +// tests.artifacts.StateOps.contract.LocalStateContract.get_arc4_bool(a: bytes) -> bytes: +get_arc4_bool: + // tests/artifacts/StateOps/contract.py:589-590 + // @arc4.abimethod() + // def get_arc4_bool(self, a: Account) -> arc4.Bool: + proto 1 1 + // tests/artifacts/StateOps/contract.py:591 + // return self.arc4_bool[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:518 + // self.arc4_bool = LocalState(arc4.Bool, key="explicit_key_arc4_bool") + byte "explicit_key_arc4_bool" + // tests/artifacts/StateOps/contract.py:591 + // return self.arc4_bool[a] + app_local_get_ex + assert // check self.arc4_bool exists for account + retsub + + +// tests.artifacts.StateOps.contract.LocalStateContract.get_arc4_address(a: bytes) -> bytes: +get_arc4_address: + // tests/artifacts/StateOps/contract.py:593-594 + // @arc4.abimethod() + // def get_arc4_address(self, a: Account) -> arc4.Address: + proto 1 1 + // tests/artifacts/StateOps/contract.py:595 + // return self.arc4_address[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:519 + // self.arc4_address = LocalState(arc4.Address, key="explicit_key_arc4_address") + byte "explicit_key_arc4_address" + // tests/artifacts/StateOps/contract.py:595 + // return self.arc4_address[a] + app_local_get_ex + assert // check self.arc4_address exists for account + retsub + + +// tests.artifacts.StateOps.contract.LocalStateContract.get_arc4_uint128(a: bytes) -> bytes: +get_arc4_uint128: + // tests/artifacts/StateOps/contract.py:597-598 + // @arc4.abimethod() + // def get_arc4_uint128(self, a: Account) -> arc4.UInt128: + proto 1 1 + // tests/artifacts/StateOps/contract.py:599 + // return self.arc4_uint128[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:520 + // self.arc4_uint128 = LocalState(arc4.UInt128, key="explicit_key_arc4_uint128") + byte "explicit_key_arc4_uint128" + // tests/artifacts/StateOps/contract.py:599 + // return self.arc4_uint128[a] + app_local_get_ex + assert // check self.arc4_uint128 exists for account + retsub + + +// tests.artifacts.StateOps.contract.LocalStateContract.get_arc4_dynamic_bytes(a: bytes) -> bytes: +get_arc4_dynamic_bytes: + // tests/artifacts/StateOps/contract.py:601-602 + // @arc4.abimethod() + // def get_arc4_dynamic_bytes(self, a: Account) -> arc4.DynamicBytes: + proto 1 1 + // tests/artifacts/StateOps/contract.py:603 + // return self.arc4_dynamic_bytes[a] + frame_dig -1 + int 0 + // tests/artifacts/StateOps/contract.py:522 + // arc4.DynamicBytes, key="explicit_key_arc4_dynamic_bytes" + byte "explicit_key_arc4_dynamic_bytes" + // tests/artifacts/StateOps/contract.py:603 + // return self.arc4_dynamic_bytes[a] + app_local_get_ex + assert // check self.arc4_dynamic_bytes exists for account + retsub diff --git a/tests/artifacts/StateOps/data/LocalStateContract.arc32.json b/tests/artifacts/StateOps/data/LocalStateContract.arc32.json index 1866ed6..ec169de 100644 --- a/tests/artifacts/StateOps/data/LocalStateContract.arc32.json +++ b/tests/artifacts/StateOps/data/LocalStateContract.arc32.json @@ -15,6 +15,31 @@ "no_op": "CALL" } }, + "get_implicit_key_arc4_byte(account)byte": { + "call_config": { + "no_op": "CALL" + } + }, + "get_implicit_key_arc4_bool(account)bool": { + "call_config": { + "no_op": "CALL" + } + }, + "get_implicit_key_arc4_address(account)address": { + "call_config": { + "no_op": "CALL" + } + }, + "get_implicit_key_arc4_uint128(account)uint128": { + "call_config": { + "no_op": "CALL" + } + }, + "get_implicit_key_arc4_dynamic_bytes(account)byte[]": { + "call_config": { + "no_op": "CALL" + } + }, "get_arc4_uint(account)uint64": { "call_config": { "no_op": "CALL" @@ -24,11 +49,36 @@ "call_config": { "no_op": "CALL" } + }, + "get_arc4_byte(account)byte": { + "call_config": { + "no_op": "CALL" + } + }, + "get_arc4_bool(account)bool": { + "call_config": { + "no_op": "CALL" + } + }, + "get_arc4_address(account)address": { + "call_config": { + "no_op": "CALL" + } + }, + "get_arc4_uint128(account)uint128": { + "call_config": { + "no_op": "CALL" + } + }, + "get_arc4_dynamic_bytes(account)byte[]": { + "call_config": { + "no_op": "CALL" + } } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy5hcnRpZmFjdHMuU3RhdGVPcHMuY29udHJhY3QuTG9jYWxTdGF0ZUNvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICAvLyB0ZXN0cy9hcnRpZmFjdHMvU3RhdGVPcHMvY29udHJhY3QucHk6Mzg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VzKHNlbGYsIGE6IEFjY291bnQpIC0+IGFyYzQuRHluYW1pY0J5dGVzOgogICAgcHJvdG8gMSAxCiAgICAvLyB0ZXN0cy9hcnRpZmFjdHMvU3RhdGVPcHMvY29udHJhY3QucHk6NjAzCiAgICAvLyByZXR1cm4gc2VsZi5hcmM0X2R5bmFtaWNfYnl0ZXNbYV0KICAgIGZyYW1lX2RpZyAtMQogICAgaW50IDAKICAgIC8vIHRlc3RzL2FydGlmYWN0cy9TdGF0ZU9wcy9jb250cmFjdC5weTo1MjIKICAgIC8vIGFyYzQuRHluYW1pY0J5dGVzLCBrZXk9ImV4cGxpY2l0X2tleV9hcmM0X2R5bmFtaWNfYnl0ZXMiCiAgICBieXRlICJleHBsaWNpdF9rZXlfYXJjNF9keW5hbWljX2J5dGVzIgogICAgLy8gdGVzdHMvYXJ0aWZhY3RzL1N0YXRlT3BzL2NvbnRyYWN0LnB5OjYwMwogICAgLy8gcmV0dXJuIHNlbGYuYXJjNF9keW5hbWljX2J5dGVzW2FdCiAgICBhcHBfbG9jYWxfZ2V0X2V4CiAgICBhc3NlcnQgLy8gY2hlY2sgc2VsZi5hcmM0X2R5bmFtaWNfYnl0ZXMgZXhpc3RzIGZvciBhY2NvdW50CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy5hcnRpZmFjdHMuU3RhdGVPcHMuY29udHJhY3QuTG9jYWxTdGF0ZUNvbnRyYWN0LmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICAvLyB0ZXN0cy9hcnRpZmFjdHMvU3RhdGVPcHMvY29udHJhY3QucHk6NTAzCiAgICAvLyBjbGFzcyBMb2NhbFN0YXRlQ29udHJhY3QoQVJDNENvbnRyYWN0KToKICAgIGludCAxCiAgICByZXR1cm4K" }, "state": { "global": { @@ -36,7 +86,7 @@ "num_uints": 0 }, "local": { - "num_byte_slices": 4, + "num_byte_slices": 14, "num_uints": 0 } }, @@ -47,6 +97,22 @@ }, "local": { "declared": { + "arc4_address": { + "type": "bytes", + "key": "explicit_key_arc4_address" + }, + "arc4_bool": { + "type": "bytes", + "key": "explicit_key_arc4_bool" + }, + "arc4_byte": { + "type": "bytes", + "key": "explicit_key_arc4_byte" + }, + "arc4_dynamic_bytes": { + "type": "bytes", + "key": "explicit_key_arc4_dynamic_bytes" + }, "arc4_string": { "type": "bytes", "key": "explicit_key_arc4_string" @@ -55,6 +121,26 @@ "type": "bytes", "key": "explicit_key_arc4_uint" }, + "arc4_uint128": { + "type": "bytes", + "key": "explicit_key_arc4_uint128" + }, + "implicit_key_arc4_address": { + "type": "bytes", + "key": "implicit_key_arc4_address" + }, + "implicit_key_arc4_bool": { + "type": "bytes", + "key": "implicit_key_arc4_bool" + }, + "implicit_key_arc4_byte": { + "type": "bytes", + "key": "implicit_key_arc4_byte" + }, + "implicit_key_arc4_dynamic_bytes": { + "type": "bytes", + "key": "implicit_key_arc4_dynamic_bytes" + }, "implicit_key_arc4_string": { "type": "bytes", "key": "implicit_key_arc4_string" @@ -62,6 +148,10 @@ "implicit_key_arc4_uint": { "type": "bytes", "key": "implicit_key_arc4_uint" + }, + "implicit_key_arc4_uint128": { + "type": "bytes", + "key": "implicit_key_arc4_uint128" } }, "reserved": {} @@ -104,6 +194,71 @@ "type": "string" } }, + { + "name": "get_implicit_key_arc4_byte", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "byte" + } + }, + { + "name": "get_implicit_key_arc4_bool", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "bool" + } + }, + { + "name": "get_implicit_key_arc4_address", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "address" + } + }, + { + "name": "get_implicit_key_arc4_uint128", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "uint128" + } + }, + { + "name": "get_implicit_key_arc4_dynamic_bytes", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "byte[]" + } + }, { "name": "get_arc4_uint", "args": [ @@ -129,6 +284,71 @@ "returns": { "type": "string" } + }, + { + "name": "get_arc4_byte", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "byte" + } + }, + { + "name": "get_arc4_bool", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "bool" + } + }, + { + "name": "get_arc4_address", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "address" + } + }, + { + "name": "get_arc4_uint128", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "uint128" + } + }, + { + "name": "get_arc4_dynamic_bytes", + "args": [ + { + "type": "account", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "byte[]" + } } ], "networks": {} diff --git a/tests/artifacts/StateOps/data/LocalStateContract.clear.teal b/tests/artifacts/StateOps/data/LocalStateContract.clear.teal index 5002614..3006ab4 100644 --- a/tests/artifacts/StateOps/data/LocalStateContract.clear.teal +++ b/tests/artifacts/StateOps/data/LocalStateContract.clear.teal @@ -1,7 +1,7 @@ #pragma version 10 tests.artifacts.StateOps.contract.LocalStateContract.clear_state_program: - // tests/artifacts/StateOps/contract.py:386 + // tests/artifacts/StateOps/contract.py:503 // class LocalStateContract(ARC4Contract): int 1 return diff --git a/tests/conftest.py b/tests/conftest.py index c449d8b..74c6ea5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -27,5 +27,10 @@ def indexer_client() -> IndexerClient: @pytest.fixture() -def localnet_creator(algod_client: AlgodClient) -> algopy.Account: - return algopy.Account(get_localnet_default_account(algod_client).address) +def localnet_creator_address(algod_client: AlgodClient) -> str: + return get_localnet_default_account(algod_client).address + + +@pytest.fixture() +def localnet_creator(localnet_creator_address: str) -> algopy.Account: + return algopy.Account(localnet_creator_address) diff --git a/tests/state/test_global_state.py b/tests/state/test_global_state.py index f5e908d..46f9523 100644 --- a/tests/state/test_global_state.py +++ b/tests/state/test_global_state.py @@ -22,18 +22,33 @@ def context() -> Generator[AlgopyTestContext, None, None]: [ ("get_implicit_key_arc4_uint", algopy_testing.arc4.UInt64), ("get_implicit_key_arc4_string", algopy_testing.arc4.String), + ("get_implicit_key_arc4_byte", algopy_testing.arc4.Byte), + ("get_implicit_key_arc4_bool", algopy_testing.arc4.Bool), + ("get_implicit_key_arc4_address", algopy_testing.arc4.Address), + ("get_implicit_key_arc4_uint128", algopy_testing.arc4.UInt128), + ("get_implicit_key_arc4_dynamic_bytes", algopy_testing.arc4.DynamicBytes), ("get_arc4_uint", algopy_testing.arc4.UInt64), ("get_arc4_string", algopy_testing.arc4.String), + ("get_arc4_byte", algopy_testing.arc4.Byte), + ("get_arc4_bool", algopy_testing.arc4.Bool), + ("get_arc4_address", algopy_testing.arc4.Address), + ("get_arc4_uint128", algopy_testing.arc4.UInt128), + ("get_arc4_dynamic_bytes", algopy_testing.arc4.DynamicBytes), ], ) def test_get_global_arc4_value( get_global_state_avm_result: AVMInvoker, + localnet_creator_address: str, method_name: str, expected_type: type, ) -> None: avm_result = get_global_state_avm_result(method_name) - contract = GlobalStateContract() - test_result = getattr(contract, method_name)() - assert isinstance(test_result, expected_type) - assert test_result.native == avm_result # type: ignore[attr-defined] + with algopy_testing_context(default_sender=localnet_creator_address): + contract = GlobalStateContract() + test_result = getattr(contract, method_name)() + assert isinstance(test_result, expected_type) + if isinstance(test_result, algopy_testing.arc4.Address): + assert test_result.native.public_key == avm_result + else: + assert test_result.native == avm_result # type: ignore[attr-defined] diff --git a/tests/state/test_local_state.py b/tests/state/test_local_state.py index 5fcdbb1..2ef6b6c 100644 --- a/tests/state/test_local_state.py +++ b/tests/state/test_local_state.py @@ -1,37 +1,36 @@ import contextlib -from collections.abc import Generator import algopy_testing import algosdk import pytest -from algokit_utils import Account from algopy_testing._context_helpers.context_storage import algopy_testing_context -from algopy_testing.context import AlgopyTestContext from tests.artifacts.StateOps.contract import LocalStateContract from tests.common import AVMInvoker -@pytest.fixture() -def context() -> Generator[AlgopyTestContext, None, None]: - with algopy_testing_context() as ctx: - yield ctx - ctx.reset() - - @pytest.mark.parametrize( ("method_name", "expected_type"), [ ("get_implicit_key_arc4_uint", algopy_testing.arc4.UInt64), ("get_implicit_key_arc4_string", algopy_testing.arc4.String), + ("get_implicit_key_arc4_byte", algopy_testing.arc4.Byte), + ("get_implicit_key_arc4_bool", algopy_testing.arc4.Bool), + ("get_implicit_key_arc4_address", algopy_testing.arc4.Address), + ("get_implicit_key_arc4_uint128", algopy_testing.arc4.UInt128), + ("get_implicit_key_arc4_dynamic_bytes", algopy_testing.arc4.DynamicBytes), ("get_arc4_uint", algopy_testing.arc4.UInt64), ("get_arc4_string", algopy_testing.arc4.String), + ("get_arc4_byte", algopy_testing.arc4.Byte), + ("get_arc4_bool", algopy_testing.arc4.Bool), + ("get_arc4_address", algopy_testing.arc4.Address), + ("get_arc4_uint128", algopy_testing.arc4.UInt128), + ("get_arc4_dynamic_bytes", algopy_testing.arc4.DynamicBytes), ], ) def test_get_local_arc4_value( get_local_state_avm_result: AVMInvoker, - context: AlgopyTestContext, - localnet_creator: Account, + localnet_creator_address: str, method_name: str, expected_type: type, ) -> None: @@ -39,13 +38,18 @@ def test_get_local_arc4_value( with contextlib.suppress(algosdk.error.AlgodHTTPError): get_local_state_avm_result("opt_in", on_complete=algosdk.transaction.OnComplete.OptInOC) - avm_result = get_local_state_avm_result(method_name, a=localnet_creator.public_key) - contract = LocalStateContract() - - with context.txn.scoped_execution( - txn_op_fields={"on_completion": algopy.OnCompleteAction.OptIn} - ): - contract.opt_in() - test_result = getattr(contract, method_name)(context.default_sender) - assert isinstance(test_result, expected_type) - assert test_result.native == avm_result # type: ignore[attr-defined] + avm_result = get_local_state_avm_result(method_name, a=localnet_creator_address) + + with algopy_testing_context(default_sender=localnet_creator_address) as ctx: + contract = LocalStateContract() + + with ctx.txn.scoped_execution( + txn_op_fields={"on_completion": algopy.OnCompleteAction.OptIn} + ): + contract.opt_in() + test_result = getattr(contract, method_name)(ctx.default_sender) + assert isinstance(test_result, expected_type) + if isinstance(test_result, algopy_testing.arc4.Address): + assert test_result.native.public_key == avm_result + else: + assert test_result.native == avm_result # type: ignore[attr-defined] diff --git a/tests/utilities/test_log.py b/tests/utilities/test_log.py index b75fc1f..2673678 100644 --- a/tests/utilities/test_log.py +++ b/tests/utilities/test_log.py @@ -23,7 +23,7 @@ def test_log(get_avm_result: AVMInvoker, context: AlgopyTestContext) -> None: b = algopy.UInt64(MAX_UINT64) c = algopy.Bytes(b"world") d = algopy.BigUInt(MAX_UINT512) - e = arc4.Bool(True) # noqa: FBT003 + e = arc4.Bool(True) f = arc4.String("greetings") g: arc4.UIntN[typing.Literal[64]] = arc4.UIntN[typing.Literal[64]](42) h: arc4.BigUIntN[typing.Literal[256]] = arc4.BigUIntN[typing.Literal[256]](512)