Skip to content

Commit df82d8a

Browse files
authored
Increment PyTeal version and remove AlgoExplorer (#241)
* use pyteal 0.25 * remove algoexplorer apis * pyteal 0.26.1 * passing tests * update black (pip-audit) * run black
1 parent dcf9c79 commit df82d8a

File tree

119 files changed

+869
-1237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+869
-1237
lines changed

beaker/application.py

Lines changed: 60 additions & 95 deletions
Large diffs are not rendered by default.

beaker/consts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#: Used for runtime algo calculations `Txn.fee()==MilliAlgo`
1515
MilliAlgo: Final[Int] = Int(milli_algo)
1616

17+
1718
#: Used for shorthand for Int(10*algo) like Algos(10)
1819
def Algos(v: int | float) -> Int: # noqa: N802
1920
return Int(int(v * algo))

beaker/lib/storage/blob.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,16 @@ def _offset_for_idx(idx: Expr) -> Expr:
5252
return idx % BLOB_PAGE_SIZE
5353

5454
@abstractmethod
55-
def zero(self) -> Expr:
56-
...
55+
def zero(self) -> Expr: ...
5756

5857
@abstractmethod
59-
def get_byte(self, idx: Int) -> Expr:
60-
...
58+
def get_byte(self, idx: Int) -> Expr: ...
6159

6260
@abstractmethod
63-
def set_byte(self, idx: Int, byte: Expr) -> Expr:
64-
...
61+
def set_byte(self, idx: Int, byte: Expr) -> Expr: ...
6562

6663
@abstractmethod
67-
def read(self, bstart: Expr, bstop: Expr) -> Expr:
68-
...
64+
def read(self, bstart: Expr, bstop: Expr) -> Expr: ...
6965

7066
@abstractmethod
71-
def write(self, bstart: Expr, buff: Expr) -> Expr:
72-
...
67+
def write(self, bstart: Expr, buff: Expr) -> Expr: ...

beaker/precompile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,11 @@ def populate_template_expr(self, **kwargs: Expr) -> Expr:
199199
arg = kwargs[name]
200200
require_type(arg, TealType.bytes if tv.is_bytes else TealType.uint64)
201201
populate_program += [
202-
curr_val.store(Concat(EncodeUVarInt(Len(arg)), arg))
203-
if tv.is_bytes
204-
else curr_val.store(EncodeUVarInt(arg)),
202+
(
203+
curr_val.store(Concat(EncodeUVarInt(Len(arg)), arg))
204+
if tv.is_bytes
205+
else curr_val.store(EncodeUVarInt(arg))
206+
),
205207
buff.store(
206208
Concat(
207209
buff.load(),

beaker/state/_abc.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,23 @@ class AppSpecSchemaFragment(NamedTuple):
1111

1212
class StateStorage(ABC):
1313
@abstractmethod
14-
def app_spec_json(self) -> AppSpecSchemaFragment | None:
15-
...
14+
def app_spec_json(self) -> AppSpecSchemaFragment | None: ...
1615

1716
@abstractmethod
18-
def num_keys(self) -> int:
19-
...
17+
def num_keys(self) -> int: ...
2018

2119
@abstractmethod
22-
def value_type(self) -> Literal[TealType.bytes, TealType.uint64]:
23-
...
20+
def value_type(self) -> Literal[TealType.bytes, TealType.uint64]: ...
2421

2522

2623
class GlobalStateStorage(StateStorage):
2724
@abstractmethod
28-
def initialize(self) -> Expr | None:
29-
...
25+
def initialize(self) -> Expr | None: ...
3026

3127

3228
class LocalStateStorage(StateStorage):
3329
@abstractmethod
34-
def initialize(self, acct: Expr) -> Expr | None:
35-
...
30+
def initialize(self, acct: Expr) -> Expr | None: ...
3631

3732

3833
# class BoxStorage(ABC):

beaker/state/primitive.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ def __teal__(self, options: CompileOptions) -> tuple[TealBlock, TealSimpleBlock]
111111
return self.get().__teal__(options)
112112

113113
@abstractmethod
114-
def __str__(self) -> str:
115-
...
114+
def __str__(self) -> str: ...
116115

117116
def str_key(self) -> str:
118117
"""returns the string held by the key Bytes object"""

beaker/state/reserved.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ def __getitem__(self, key_seed: Expr | abi.BaseType) -> ST:
9494
return self._get_state_for_key(key)
9595

9696
@abstractmethod
97-
def _get_state_for_key(self, key: Expr) -> ST:
98-
...
97+
def _get_state_for_key(self, key: Expr) -> ST: ...
9998

10099
def num_keys(self) -> int:
101100
return self.max_keys

examples/account_storage/disk_hungry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
build_options=beaker.BuildOptions(avm_version=8),
1313
)
1414

15+
1516
# App that needs lots of storage so we use the local storage of
1617
# unique lsig accounts that have been rekeyed to the app address.
1718
# This allows us to use the local storage of the unique accounts

examples/amm/ConstantProductAMM.artifacts/application.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

examples/amm/ConstantProductAMM.artifacts/approval.teal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#pragma version 8
1+
#pragma version 10
22
intcblock 0 1 1000 4 10000000000
33
bytecblock 0x61 0x62 0x70 0x67 0x72
44
txn NumAppArgs

0 commit comments

Comments
 (0)