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

Support inner transactions #115

Merged
merged 12 commits into from
Sep 16, 2021
Merged

Support inner transactions #115

merged 12 commits into from
Sep 16, 2021

Conversation

jasonpaulos
Copy link
Contributor

@jasonpaulos jasonpaulos commented Sep 15, 2021

Closes #112

In addition to supporting inner transactions, this PR also:

  • Adds all TEAL 5 opcodes to the Op enum
  • Adds new global and txn fields from TEAL 5
  • Allows zero element Seq expressions (this is a no-op, but it's needed to support InnerTxnBuilder.SetFields({}))
  • Enables dynamic array access, closes Dynamic Array Reference #109
  • Consolidates all txn opcode tests (txn, gtxn, itxn)

@jasonpaulos jasonpaulos marked this pull request as ready for review September 16, 2021 00:07
Copy link
Contributor

@shiqizng shiqizng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me. adding descriptions to the new classes, such as InnerTxnActionExpr, would be helpful. and what happened to the tests for gtxn/gtxnas?

@jasonpaulos
Copy link
Contributor Author

I've just added documentation for inner transactions -- thank you for reminding me!

The existing tests for txn/gtxn were very repetitive, so instead of repeating them again for itxn, I got rid of all the handwritten tests in favor of the new method test_txn_fields in txn_test.py. This methods iterates through all possible fields and all the different txn objects to make sure they get converted properly into the IR layer.

Copy link
Contributor

@shiqizng shiqizng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@jasonpaulos jasonpaulos merged commit 81275c5 into master Sep 16, 2021
@jasonpaulos jasonpaulos deleted the inner-txns branch September 16, 2021 21:18
@jasonpaulos jasonpaulos mentioned this pull request Sep 27, 2021
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.

Support for creating inner transactions Dynamic Array Reference
3 participants