-
Notifications
You must be signed in to change notification settings - Fork 524
Fix OnCompletion flag for goal app method
#3228
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
Merged
jannotti
merged 3 commits into
algorand:master
from
jasonpaulos:on-complete-goal-app-method
Nov 19, 2021
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
159 changes: 118 additions & 41 deletions
159
test/scripts/e2e_subs/tealprogs/app-abi-add-example.teal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,87 +1,164 @@ | ||
| // generated from https://gist.github.com/jasonpaulos/99e4f8a75f2fc2ec9b8073c064530359 | ||
| #pragma version 5 | ||
| intcblock 1 0 | ||
| bytecblock 0x151f7c75 | ||
| txn ApplicationID | ||
| intc_1 // 0 | ||
| int 0 | ||
| == | ||
| bnz main_l12 | ||
| bnz main_l14 | ||
| txn OnCompletion | ||
| intc_0 // OptIn | ||
| int OptIn | ||
| == | ||
| bnz main_l11 | ||
| txna ApplicationArgs 0 | ||
| byte 0xcfa68e36 | ||
| == | ||
| && | ||
| bnz main_l13 | ||
| txn OnCompletion | ||
| pushint 5 // DeleteApplication | ||
| int CloseOut | ||
| == | ||
| bnz main_l10 | ||
| txna ApplicationArgs 0 | ||
| byte 0xa9f42b3d | ||
| == | ||
| && | ||
| bnz main_l12 | ||
| txn OnCompletion | ||
| intc_1 // NoOp | ||
| int DeleteApplication | ||
| == | ||
| txna ApplicationArgs 0 | ||
| pushbytes 0xfe6bdf69 // 0xfe6bdf69 | ||
| byte 0x24378d3c | ||
| == | ||
| && | ||
| bnz main_l9 | ||
| bnz main_l11 | ||
| txn OnCompletion | ||
| intc_1 // NoOp | ||
| int NoOp | ||
| == | ||
| txna ApplicationArgs 0 | ||
| pushbytes 0xa88c26a5 // 0xa88c26a5 | ||
| byte 0xfe6bdf69 | ||
| == | ||
| && | ||
| bnz main_l8 | ||
| bnz main_l10 | ||
| txn OnCompletion | ||
| intc_1 // NoOp | ||
| int NoOp | ||
| == | ||
| txna ApplicationArgs 0 | ||
| pushbytes 0x535a47ba // 0x535a47ba | ||
| byte 0xa88c26a5 | ||
| == | ||
| && | ||
| bnz main_l7 | ||
| intc_1 // 0 | ||
| return | ||
| main_l7: | ||
| txna ApplicationArgs 1 | ||
| callsub sub2 | ||
| intc_0 // 1 | ||
| bnz main_l9 | ||
| txn OnCompletion | ||
| int NoOp | ||
| == | ||
| txna ApplicationArgs 0 | ||
| byte 0x535a47ba | ||
| == | ||
| && | ||
| bnz main_l8 | ||
| int 0 | ||
| return | ||
| main_l8: | ||
| callsub sub1 | ||
| intc_0 // 1 | ||
| txna ApplicationArgs 1 | ||
| callsub sub5 | ||
| int 1 | ||
| return | ||
| main_l9: | ||
| txna ApplicationArgs 1 | ||
| txna ApplicationArgs 2 | ||
| callsub sub0 | ||
| intc_0 // 1 | ||
| callsub sub4 | ||
| int 1 | ||
| return | ||
| main_l10: | ||
| intc_0 // 1 | ||
| txna ApplicationArgs 1 | ||
| txna ApplicationArgs 2 | ||
| callsub sub3 | ||
| int 1 | ||
| return | ||
| main_l11: | ||
| intc_0 // 1 | ||
| callsub sub2 | ||
| int 1 | ||
| return | ||
| main_l12: | ||
| intc_0 // 1 | ||
| callsub sub1 | ||
| int 1 | ||
| return | ||
| sub0: // add | ||
| store 1 | ||
| main_l13: | ||
| txna ApplicationArgs 1 | ||
| callsub sub0 | ||
| int 1 | ||
| return | ||
| main_l14: | ||
| int 1 | ||
| return | ||
| sub0: // optIn | ||
| store 0 | ||
| bytec_0 // 0x151f7c75 | ||
| int 0 | ||
| byte "name" | ||
| load 0 | ||
| btoi | ||
| extract 2 0 | ||
| app_local_put | ||
| byte "hello " | ||
| int 0 | ||
| byte "name" | ||
| app_local_get | ||
| concat | ||
| store 1 | ||
| byte 0x151f7c75 | ||
| load 1 | ||
| len | ||
| itob | ||
| extract 6 2 | ||
| concat | ||
| load 1 | ||
| concat | ||
| log | ||
| retsub | ||
| sub1: // closeOut | ||
| byte "goodbye " | ||
| int 0 | ||
| byte "name" | ||
| app_local_get | ||
| concat | ||
| store 2 | ||
| byte 0x151f7c75 | ||
| load 2 | ||
| len | ||
| itob | ||
| extract 6 2 | ||
| concat | ||
| load 2 | ||
| concat | ||
| log | ||
| retsub | ||
| sub2: // deleteApp | ||
| txn Sender | ||
| global CreatorAddress | ||
| == | ||
| assert | ||
| retsub | ||
| sub3: // add | ||
| store 4 | ||
| store 3 | ||
| byte 0x151f7c75 | ||
| load 3 | ||
| btoi | ||
| load 4 | ||
| btoi | ||
| + | ||
| itob | ||
| concat | ||
| log | ||
| retsub | ||
| sub1: // empty | ||
| bytec_0 // 0x151f7c75 | ||
| sub4: // empty | ||
| byte "random inconsequential log" | ||
| log | ||
| retsub | ||
| sub2: // payment | ||
| store 2 | ||
| pushbytes 0x151f7c7580 // 0x151f7c7580 | ||
| sub5: // payment | ||
| store 5 | ||
| txn GroupIndex | ||
| int 1 | ||
| - | ||
| gtxns TypeEnum | ||
| int pay | ||
| == | ||
| assert | ||
| byte 0x151f7c75 | ||
| byte 0x80 | ||
| concat | ||
| log | ||
| retsub |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.