Skip to content
New issue

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

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

Already on GitHub? # to your account

[TEAL] Extra documentation #12

Open
mcalancea opened this issue Nov 8, 2021 · 3 comments
Open

[TEAL] Extra documentation #12

mcalancea opened this issue Nov 8, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@mcalancea
Copy link

mcalancea commented Nov 8, 2021

This issue is for documenting TEAL behavior which is insufficiently explained in the official docs. The proper place for this is the wiki, but this implies a larger refactoring of it, which we will do in-between audits. My recommendation is that we tag items with source and timestamp where possible.

@mcalancea mcalancea changed the title [TEAL] Extra documentation. [TEAL] Extra documentation Nov 8, 2021
@geo2a
Copy link
Contributor

geo2a commented Nov 9, 2021

gtxns ApplicationArgs 0 silently compiles to gtxnsa ApplicationArgs 0

The gtxns f opcode is used to access a scalar filed of a transaction in the group. For accessing the array fields, like ApplicationArgs, the gtxnsa f i opcode is supposed to be used. However, the TEAL assembler of go-algorand compiles the uses of gtxns with two immediate arguments into gtxnsa, see the implementation of the assembleGtxns function.

For additional context, see this comment by @jannotti: algorand/go-algorand#2847 (review)

Using gtxns f like that should be considered invalid syntax, and that's what our TEAL semantics in K does. Anyway, this behavior must be documented in the TEAL docs.

@geo2a geo2a transferred this issue from another repository Mar 4, 2022
@geo2a geo2a added the documentation Improvements or additions to documentation label Mar 4, 2022
@geo2a
Copy link
Contributor

geo2a commented Sep 30, 2022

When creating an application, the creator can opt-in straight away

@nwatson22 has discovered the fact that when an ApplicationCall transaction with ApplicationID == 0 is submitted (app creation), the creator account can specify OnCompletion == OptIn and become opted-in upon acceptance of the creation transaction.

This behavior is not documented in Algrorand Developer Documentation, but that's what go-algorand does.

@jannotti
Copy link

jannotti commented Oct 11, 2022 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants