So I want to be able to create a new local state value if one already exists, like using some kind of for loop.
So if LocalState Key1 already exists, write data on a key named Key2
Thanks, I’m using pyteal
So I want to be able to create a new local state value if one already exists, like using some kind of for loop.
So if LocalState Key1 already exists, write data on a key named Key2
Thanks, I’m using pyteal
You can use App.localGetEx to check if its set already using app idx of 0 to reference your current app id. This method returns a MaybeValue so it is handled a little differently than the non Ex version