Skip to content

Commit

Permalink
v0.9.0 (#124)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jasonpaulos authored Sep 29, 2021
1 parent 315d00c commit 0ec41f6
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
python: "3.7"
- name: Python 3.8
python: "3.8"
- name: Python 3.9
python: "3.9"
- stage: Release
name: PyPi release
python: "3.8"
python: "3.9"
script: skip
if: tag IS present AND type = push
deploy:
provider: pypi
username: __token__
password:
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=
on:
tags: true
branch: master
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# 0.9.0

## Added
* Support for new TEAL 5 features:
* `AppParam` expressions ([#107](https://github.com/algorand/pyteal/pull/107), [#123](https://github.com/algorand/pyteal/pull/123))
* New `nonparticipation` transaction field ([#106](https://github.com/algorand/pyteal/pull/106))
* Inner transactions, zero-element `Seq` expressions, dynamic transaction array access ([#115](https://github.com/algorand/pyteal/pull/115))
* Logs, dynamic LogicSig argument indexes, single-element `NaryExpr`s, and creating `Bytes` from `bytes` and `bytearray` ([#117](https://github.com/algorand/pyteal/pull/117))
* Extract expressions ([#118](https://github.com/algorand/pyteal/pull/118))
* More efficient implementation of recursive subroutines in TEAL 5+ ([#114](https://github.com/algorand/pyteal/pull/114))
* 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))

## Changed
* **WARNING**: Due to code generation improvements, programs compiled with this version will likely
produce different TEAL code than previous versions, but their functionality will be the same. Be
aware that even small differences in generated TEAL code will change the address associated with
escrow LogicSig contracts.
* Some unnecessary branch conditions have been removed ([#120](https://github.com/algorand/pyteal/pull/120))

# 0.8.0

## Added
Expand Down
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,40 @@ PyTeal provides high level, functional programming style abstractions over TEAL

### Install

PyTeal requires Python version >= 3.6
PyTeal requires Python version >= 3.6.

* `pip3 install pyteal`
#### Recommended: Install from PyPi

### Documentation
Install the latest official release from PyPi:

[PyTeal Docs](https://pyteal.readthedocs.io/)
* `pip install pyteal`

#### Install Latest Commit

If needed, it's possible to install directly from the latest commit on master to use unreleased features:

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

* `jupyter notebook demo/Pyteal\ Demonstration.ipynb`
### Documentation

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

### Development Setup

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

Active venv:
* `. venv/bin/activate.fish` (if your shell is fish)
* `. venv/bin/activate` (if your shell is bash/zsh)
* `. venv/bin/activate.fish` (if your shell is fish)

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

Install dependencies:
* `pip3 install -r requirements.txt`
* `pip install -r requirements.txt`

Type checking using mypy:
* `mypy pyteal`
Expand Down
30 changes: 16 additions & 14 deletions docs/accessing_transaction_field.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,19 @@ Global Parameters
Information about the current state of the blockchain can be obtained using the following
:any:`Global` expressions:

======================================= ======================= ============================================================
Operator Type Notes
======================================= ======================= ============================================================
:any:`Global.min_txn_fee()` :code:`TealType.uint64` in microAlgos
:any:`Global.min_balance()` :code:`TealType.uint64` in mircoAlgos
:any:`Global.max_txn_life()` :code:`TealType.uint64` number of rounds
:any:`Global.zero_address()` :code:`TealType.bytes` 32 byte address of all zero bytes
:any:`Global.group_size()` :code:`TealType.uint64` number of txns in this atomic transaction group, at least 1
:any:`Global.logic_sig_version()` :code:`TealType.uint64` the maximum supported TEAL version
:any:`Global.round()` :code:`TealType.uint64` the current round number
:any:`Global.latest_timestamp()` :code:`TealType.uint64` the latest confirmed block UNIX timestamp
:any:`Global.current_application_id()` :code:`TealType.uint64` the ID of the current application executing
:any:`Global.creator_address()` :code:`TealType.bytes` 32 byte address of the creator of the current application
======================================= ======================= ============================================================
=========================================== ======================= ================ =============================================================
Operator Type Min TEAL Version Notes
=========================================== ======================= ================ =============================================================
:any:`Global.min_txn_fee()` :code:`TealType.uint64` 2 in microAlgos
:any:`Global.min_balance()` :code:`TealType.uint64` 2 in mircoAlgos
:any:`Global.max_txn_life()` :code:`TealType.uint64` 2 number of rounds
:any:`Global.zero_address()` :code:`TealType.bytes` 2 32 byte address of all zero bytes
:any:`Global.group_size()` :code:`TealType.uint64` 2 number of txns in this atomic transaction group, at least 1
:any:`Global.logic_sig_version()` :code:`TealType.uint64` 2 the maximum supported TEAL version
:any:`Global.round()` :code:`TealType.uint64` 2 the current round number
:any:`Global.latest_timestamp()` :code:`TealType.uint64` 2 the latest confirmed block UNIX timestamp
:any:`Global.current_application_id()` :code:`TealType.uint64` 2 the ID of the current application executing
:any:`Global.creator_address()` :code:`TealType.bytes` 3 32 byte address of the creator of the current application
:any:`Global.current_application_address()` :code:`TealType.bytes` 5 32 byte address of the current application controlled account
:any:`Global.group_id()` :code:`TealType.bytes` 5 32 byte ID of the current transaction group
=========================================== ======================= ================ =============================================================
2 changes: 1 addition & 1 deletion pyteal/ast/global_.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def latest_timestamp(cls) -> "Global":
def current_application_id(cls) -> "Global":
"""Get the ID of the current application executing.
Fails if no application is executing."""
Fails during Signature mode."""
return cls(GlobalField.current_app_id)

@classmethod
Expand Down
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
black==21.7b0
ipython
jupyter
mypy
mypy==0.910
pytest
pytest-timeout
py-algorand-sdk
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="pyteal",
version="0.9.0.dev.1",
version="0.9.0",
author="Algorand",
author_email="[email protected]",
description="Algorand Smart Contracts in Python",
Expand Down

0 comments on commit 0ec41f6

Please sign in to comment.