You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When handling the on-create method, by checking if the application index is 0, how do you access the application arguments to initialize things dynamically? There's no such property on transaction. It would make sense to expose these app args as a list of byte[] as with PyTeal.
Another alternative, which would be neater than if logic that catches the common lifecycle stages of a contract like create/update/delete, is to handle these stages by linting functions with attributes like the following that will take care of initialization:
This linting approach would be ideal. It is very important you don't sacrifice too much flexibility in what can be made, otherwise it becomes very limiting and many applications aren't possible. So it's a kind of balancing act.
Kind regards.
The text was updated successfully, but these errors were encountered:
mangoplane
changed the title
Approval Application Create: Accessing Application Arguments
Approval Application On Create: Accessing Application Arguments. Not possible?
Jun 8, 2023
Hi,
When handling the on-create method, by checking if the application index is 0, how do you access the application arguments to initialize things dynamically? There's no such property on transaction. It would make sense to expose these app args as a list of byte[] as with PyTeal.
Another alternative, which would be neater than if logic that catches the common lifecycle stages of a contract like create/update/delete, is to handle these stages by linting functions with attributes like the following that will take care of initialization:
This linting approach would be ideal. It is very important you don't sacrifice too much flexibility in what can be made, otherwise it becomes very limiting and many applications aren't possible. So it's a kind of balancing act.
Kind regards.
The text was updated successfully, but these errors were encountered: