From fc53b0fda5f0d22b6dbb99abf1ba024284fa52a4 Mon Sep 17 00:00:00 2001 From: Daniel McGregor Date: Fri, 14 Feb 2025 17:26:48 +0800 Subject: [PATCH] feat: add `avm_version` to `algopy.Contract` class options --- src/_algopy_testing/models/contract.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/_algopy_testing/models/contract.py b/src/_algopy_testing/models/contract.py index 328f164..61744a8 100644 --- a/src/_algopy_testing/models/contract.py +++ b/src/_algopy_testing/models/contract.py @@ -36,6 +36,7 @@ class _ContractMeta(type): _name: str _scratch_slots: typing.Any _state_totals: StateTotals | None + _avm_version: int def __init__(cls, *args: typing.Any, **kwargs: typing.Any) -> None: super().__init__(*args, **kwargs) @@ -93,10 +94,12 @@ def __init_subclass__( algopy.urange | tuple[int | algopy.urange, ...] | list[int | algopy.urange] | None ) = None, state_totals: StateTotals | None = None, + avm_version: int = 10, ): cls._name = name or cls.__name__ cls._scratch_slots = scratch_slots cls._state_totals = state_totals + cls._avm_version = avm_version def approval_program(self) -> algopy.UInt64 | bool: raise NotImplementedError("`approval_program` is not implemented.")