Skip to content

Commit 0ec41f6

Browse files
authored
v0.9.0 (#124)
* Update readme * Remove unneeded deps and pin mypy * Add python 3.9 to build matrix & remove pypi deploy key * Update changelog and version * Update global docs
1 parent 315d00c commit 0ec41f6

File tree

7 files changed

+55
-31
lines changed

7 files changed

+55
-31
lines changed

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
python: "3.7"
1818
- name: Python 3.8
1919
python: "3.8"
20+
- name: Python 3.9
21+
python: "3.9"
2022
- stage: Release
2123
name: PyPi release
22-
python: "3.8"
24+
python: "3.9"
2325
script: skip
2426
if: tag IS present AND type = push
2527
deploy:
2628
provider: pypi
2729
username: __token__
28-
password:
29-
secure: W0VZ1e3uo6+fVbJgrXsAdQc0WQCxuWVEX2DT4oOFhsX3GgTxi7I1phPmtZkl2gacuhfAQKN4XC04eZmgdYd3SrERWqae4/Fa9C/RvGwmhFCBpBYcr9c3CthUCIkgpRQVgTbmFzoWAX2/2YyzrWhjAv+CadrcP4KXcylOtdBEEYRZYz3LzhcNOJrDE/e9OQeziTiTUVs63iJniUvFDQxcbMfccpF1CGTsdTPqRllC7UfpE5CS/pVdHzyRVRmxw5Y3l53sqKi5uX4OWFwyIaqN37m0f4z+I6+L9oZ+FL8NCjTRfV8Lc9wT/PzSFBHcPhItyTg5/qbegm2TNx+zUeRWaRpG0HNHSHqF2QlaAvOcxufGb+QC/gvUYZfFEUXjhyCgb7W2QmB94Nwsm1S+35Vpjit7hJ9AXIaIfcJTa3KZR02gAuan9AS5mhDTR3TPZp4E4DWhC941/7zzACJOHoqU7u3lAd/0zuoIvUm0SmJfx1+wpSoxs4kf0c3LaitzCkXubj64PxtK3mJHVkJW9mRvmaGP7Akxd3BgW+3bZrbi/3/DBoWvth569xAoAFqI6bRdoritpDlBcVK8P1FzbwfZrTLNqyAAJ00StfHzttKYuSHB9TJdhdHhFbT2GLeWZ+8+dOqaw7D9jNyNyYAjbDKdCeo4y2aPclD1svrTs+jfHtw=
3030
on:
3131
tags: true
3232
branch: master

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# 0.9.0
2+
3+
## Added
4+
* Support for new TEAL 5 features:
5+
* `AppParam` expressions ([#107](https://github.com/algorand/pyteal/pull/107), [#123](https://github.com/algorand/pyteal/pull/123))
6+
* New `nonparticipation` transaction field ([#106](https://github.com/algorand/pyteal/pull/106))
7+
* Inner transactions, zero-element `Seq` expressions, dynamic transaction array access ([#115](https://github.com/algorand/pyteal/pull/115))
8+
* Logs, dynamic LogicSig argument indexes, single-element `NaryExpr`s, and creating `Bytes` from `bytes` and `bytearray` ([#117](https://github.com/algorand/pyteal/pull/117))
9+
* Extract expressions ([#118](https://github.com/algorand/pyteal/pull/118))
10+
* More efficient implementation of recursive subroutines in TEAL 5+ ([#114](https://github.com/algorand/pyteal/pull/114))
11+
* Add `WideRatio`, an expression which exposes `mulw` and `divmodw` ([#121](https://github.com/algorand/pyteal/pull/121), [#122](https://github.com/algorand/pyteal/pull/122))
12+
13+
## Changed
14+
* **WARNING**: Due to code generation improvements, programs compiled with this version will likely
15+
produce different TEAL code than previous versions, but their functionality will be the same. Be
16+
aware that even small differences in generated TEAL code will change the address associated with
17+
escrow LogicSig contracts.
18+
* Some unnecessary branch conditions have been removed ([#120](https://github.com/algorand/pyteal/pull/120))
19+
120
# 0.8.0
221

322
## Added

README.md

+14-9
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,40 @@ PyTeal provides high level, functional programming style abstractions over TEAL
1818

1919
### Install
2020

21-
PyTeal requires Python version >= 3.6
21+
PyTeal requires Python version >= 3.6.
2222

23-
* `pip3 install pyteal`
23+
#### Recommended: Install from PyPi
2424

25-
### Documentation
25+
Install the latest official release from PyPi:
2626

27-
[PyTeal Docs](https://pyteal.readthedocs.io/)
27+
* `pip install pyteal`
28+
29+
#### Install Latest Commit
30+
31+
If needed, it's possible to install directly from the latest commit on master to use unreleased features:
2832

29-
### Run Demo
33+
> **WARNING:** Unreleased code is experimental and may not be backwards compatible or function properly. Use extreme caution when installing PyTeal this way.
3034
31-
In PyTeal root directory:
35+
* `pip install git+https://github.com/algorand/pyteal`
3236

33-
* `jupyter notebook demo/Pyteal\ Demonstration.ipynb`
37+
### Documentation
3438

39+
[PyTeal Docs](https://pyteal.readthedocs.io/)
3540

3641
### Development Setup
3742

3843
Setup venv (one time):
3944
* `python3 -m venv venv`
4045

4146
Active venv:
42-
* `. venv/bin/activate.fish` (if your shell is fish)
4347
* `. venv/bin/activate` (if your shell is bash/zsh)
48+
* `. venv/bin/activate.fish` (if your shell is fish)
4449

4550
Pip install PyTeal in editable state
4651
* `pip install -e .`
4752

4853
Install dependencies:
49-
* `pip3 install -r requirements.txt`
54+
* `pip install -r requirements.txt`
5055

5156
Type checking using mypy:
5257
* `mypy pyteal`

docs/accessing_transaction_field.rst

+16-14
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,19 @@ Global Parameters
168168
Information about the current state of the blockchain can be obtained using the following
169169
:any:`Global` expressions:
170170

171-
======================================= ======================= ============================================================
172-
Operator Type Notes
173-
======================================= ======================= ============================================================
174-
:any:`Global.min_txn_fee()` :code:`TealType.uint64` in microAlgos
175-
:any:`Global.min_balance()` :code:`TealType.uint64` in mircoAlgos
176-
:any:`Global.max_txn_life()` :code:`TealType.uint64` number of rounds
177-
:any:`Global.zero_address()` :code:`TealType.bytes` 32 byte address of all zero bytes
178-
:any:`Global.group_size()` :code:`TealType.uint64` number of txns in this atomic transaction group, at least 1
179-
:any:`Global.logic_sig_version()` :code:`TealType.uint64` the maximum supported TEAL version
180-
:any:`Global.round()` :code:`TealType.uint64` the current round number
181-
:any:`Global.latest_timestamp()` :code:`TealType.uint64` the latest confirmed block UNIX timestamp
182-
:any:`Global.current_application_id()` :code:`TealType.uint64` the ID of the current application executing
183-
:any:`Global.creator_address()` :code:`TealType.bytes` 32 byte address of the creator of the current application
184-
======================================= ======================= ============================================================
171+
=========================================== ======================= ================ =============================================================
172+
Operator Type Min TEAL Version Notes
173+
=========================================== ======================= ================ =============================================================
174+
:any:`Global.min_txn_fee()` :code:`TealType.uint64` 2 in microAlgos
175+
:any:`Global.min_balance()` :code:`TealType.uint64` 2 in mircoAlgos
176+
:any:`Global.max_txn_life()` :code:`TealType.uint64` 2 number of rounds
177+
:any:`Global.zero_address()` :code:`TealType.bytes` 2 32 byte address of all zero bytes
178+
:any:`Global.group_size()` :code:`TealType.uint64` 2 number of txns in this atomic transaction group, at least 1
179+
:any:`Global.logic_sig_version()` :code:`TealType.uint64` 2 the maximum supported TEAL version
180+
:any:`Global.round()` :code:`TealType.uint64` 2 the current round number
181+
:any:`Global.latest_timestamp()` :code:`TealType.uint64` 2 the latest confirmed block UNIX timestamp
182+
:any:`Global.current_application_id()` :code:`TealType.uint64` 2 the ID of the current application executing
183+
:any:`Global.creator_address()` :code:`TealType.bytes` 3 32 byte address of the creator of the current application
184+
:any:`Global.current_application_address()` :code:`TealType.bytes` 5 32 byte address of the current application controlled account
185+
:any:`Global.group_id()` :code:`TealType.bytes` 5 32 byte ID of the current transaction group
186+
=========================================== ======================= ================ =============================================================

pyteal/ast/global_.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def latest_timestamp(cls) -> "Global":
105105
def current_application_id(cls) -> "Global":
106106
"""Get the ID of the current application executing.
107107
108-
Fails if no application is executing."""
108+
Fails during Signature mode."""
109109
return cls(GlobalField.current_app_id)
110110

111111
@classmethod

requirements.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
black==21.7b0
2-
ipython
3-
jupyter
4-
mypy
2+
mypy==0.910
53
pytest
64
pytest-timeout
75
py-algorand-sdk

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setuptools.setup(
99
name="pyteal",
10-
version="0.9.0.dev.1",
10+
version="0.9.0",
1111
author="Algorand",
1212
author_email="[email protected]",
1313
description="Algorand Smart Contracts in Python",

0 commit comments

Comments
 (0)