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: provide more helpful error when system_program is missing for init #1242

Closed
paul-schaaf opened this issue Jan 6, 2022 · 0 comments · Fixed by #1257
Closed

lang: provide more helpful error when system_program is missing for init #1242

paul-schaaf opened this issue Jan 6, 2022 · 0 comments · Fixed by #1257
Labels

Comments

@paul-schaaf
Copy link
Contributor

currently:

Compiling token-omnibus v0.1.0 (/Users/aeyakovenko/token-omnibus/programs/token-omnibus)
error[E0425]: cannot find value `system_program` in this scope
  --> programs/token-omnibus/src/lib.rs:20:10
   |
20 | #[derive(Accounts)]
   |          ^^^^^^^^ not found in this scope

should be:

the init constraint requires the system_program to exist in the account validation struct. add the following to your struct: pub system_program: Program <'info, System>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant