Repository navigation
Add seeds::program constraint for PDAs. - #1197
Conversation
| }; | ||
| ConstraintToken::Bump(Context::new(ident.span(), ConstraintTokenBump { bump })) | ||
| } | ||
| "program_id" => { |
There was a problem hiding this comment.
I think the other name that the solana sdk uses for this is base. I don't have a preference though.
|
Build failing due to clippy warnings. |
|
pls also add a line to the changelog |
| }; | ||
| ConstraintToken::Bump(Context::new(ident.span(), ConstraintTokenBump { bump })) | ||
| } | ||
| "program_seed" => { |
There was a problem hiding this comment.
Is there any place in the existing solana sdk that uses the term "program_seed"?
There was a problem hiding this comment.
Tag @jstarry. Any ideas for an accurate keyword to refer to the base program id for PDAs?
There was a problem hiding this comment.
Yeah tbh I also find that term a little odd
There was a problem hiding this comment.
other words mentioned in discord: seeds::program, program, derive_from, seed_program
There was a problem hiding this comment.
Discussed offline. Let's do seeds::program.
ee911d0 to
676b934
Compare
|
|
||
| ### Features | ||
|
|
||
| *lang: Improved error msgs when required programs are missing when using the `init` constraint([#1257](https://github.com/project-serum/anchor/pull/1257)) |
There was a problem hiding this comment.
used the opportunity to move this into feature section (wasnt really a bug fix)
|
took over with alan's permission |
|
closes #1131 |
| /// #[account( | ||
| /// seeds = [b"other_seed], | ||
| /// bump = second_bump, | ||
| /// seeds::program = other_program.key() |
There was a problem hiding this comment.
A bit ugly now that I look at this next to seeds, bump. We'll want to rethink this in the future. Potentially just solved by the constraint grouping work, though.
There was a problem hiding this comment.
yea once we group them it can just be program cause it will be clear which constraint it belongs to
This addresses #1131
@paul-schaaf I should have double-checked about the desired name for the attribute—happy to change from
program_idto something else, just wanted to hurry up and get a PR started.