Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

#[account(associated)] should not initialize #290

Closed
armaniferrante opened this issue May 18, 2021 · 3 comments
Closed

#[account(associated)] should not initialize #290

armaniferrante opened this issue May 18, 2021 · 3 comments
Assignees

Comments

@armaniferrante
Copy link
Member

armaniferrante commented May 18, 2021

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.

@NorbertBodziony
Copy link
Contributor

Since this includes some stuff with associated accounts and seed maybe its good idea to also add versioning #233 IMO super important for upgradable projects.

@armaniferrante
Copy link
Member Author

Versioning is mostly unrelated. The task here will just change the way the macro interprets the keywords. It's not implementing any new functionality.

@armaniferrante
Copy link
Member Author

Addressed by #318.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants