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
The Account trait verifies that the account exists, the UncheckedAccount does not let you retrieve account data when initialized within the instruction.
I suggest having either an annotation on the context that specifies that the account requires creation or a lazy context that lets the program dev manage when to create the account. The former could make the code more compact but requires more contexts, the latter could be more efficient by allowing the dev to make some checks before allocating the account.
The text was updated successfully, but these errors were encountered:
The
Account
trait verifies that the account exists, theUncheckedAccount
does not let you retrieve account data when initialized within the instruction.I suggest having either an annotation on the context that specifies that the account requires creation or a lazy context that lets the program dev manage when to create the account. The former could make the code more compact but requires more contexts, the latter could be more efficient by allowing the dev to make some checks before allocating the account.
The text was updated successfully, but these errors were encountered: