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

lang: Consistent init constraints #641

Merged
merged 19 commits into from Aug 29, 2021
Merged

lang: Consistent init constraints #641

merged 19 commits into from Aug 29, 2021

Conversation

armaniferrante
Copy link
Member

@armaniferrante armaniferrante commented Aug 25, 2021

Completes the work started by #513. Also addresses #614.

@armaniferrante armaniferrante marked this pull request as ready for review August 29, 2021 20:43
#[account(init, seeds = [b"my-seed".as_ref(), &[bump]], payer = my_payer)]
#[account(
init,
seeds = [b"my-seed".as_ref()],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's probably more readable to use that

pub const SEED: &str = "some-string-here";

   (...)
    seeds = [SEED.as_bytes()],

it's already supported by the framework, so why not use it in a couple of examples?

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

Successfully merging this pull request may close these issues.

None yet

2 participants