Closed armaniferrante closed 3 years ago
Since this includes some stuff with associated accounts and seed maybe its good idea to also add versioning https://github.com/project-serum/anchor/issues/233 IMO super important for upgradable projects.
Versioning is mostly unrelated. The task here will just change the way the macro interprets the keywords. It's not implementing any new functionality.
Addressed by #318.
The existing
#[account(associated)]
api should just check the seeds provided indeed result in the correct associated address. It shouldn't create the PDA account, as it currently does.Instead, we should force the user to explicitly pass in
init
, e.g.,#[account(init, associated)]
to run the account creation flow. Thereafter, one can use#[account(associated)]
to perform checks to ensure the correct account and seeds are passed in.Discussed with @Henry-E.