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: add check that declared id == program id #1451

Merged
merged 7 commits into from Feb 15, 2022

Conversation

paul-schaaf
Copy link
Contributor

No description provided.

@paul-schaaf paul-schaaf marked this pull request as ready for review February 15, 2022 17:17
@paul-schaaf
Copy link
Contributor Author

wasnt quite sure which category to put the error under. used miscellaneous for now

// Miscellaneous
/// 50 - The declared program id does not match actual program id
#[msg("The declared program id does not match the actual program id")]
DeclaredProgramIdMismatch = 50,
Copy link
Member

Choose a reason for hiding this comment

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

Will this collide with solana_program error codes? Probably not?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

probably not but no reason to take that risk. we can move the misc errors to 4500

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to 4100

@@ -0,0 +1,16 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

file to be removed

@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
Copy link
Member

Choose a reason for hiding this comment

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

file to be removed

@paul-schaaf
Copy link
Contributor Author

implemented review

@armaniferrante armaniferrante merged commit 1f56a62 into coral-xyz:master Feb 15, 2022
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