Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dynamic Gtxn indexes #53

Merged
merged 1 commit into from
Apr 2, 2021
Merged

Add support for dynamic Gtxn indexes #53

merged 1 commit into from
Apr 2, 2021

Conversation

jasonpaulos
Copy link
Member

This PR allows dynamic values to be used as Gtxn indexes when targeting TEAL 3.

For example, the following code would have been invalid before this PR because an PyTeal expression, not an int, is used to index Gtxn:

nextTxnAmount = Gtxn[Txn.group_index() + Int(1)].amount()

With this PR, the above is allowed when compiling for TEAL 3.

Closes #52.

@jasonpaulos jasonpaulos merged commit a75c20d into master Apr 2, 2021
@jasonpaulos jasonpaulos deleted the dynamic_gtxn branch April 2, 2021 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for dynamic gtxn indexes from TEAL 3
1 participant