Skip to content

Instantly share code, notes, and snippets.

@mattm
Created December 9, 2021 15:46
Show Gist options
  • Save mattm/1e2e42f5ea15c43002403fa10f2177ae to your computer and use it in GitHub Desktop.
Save mattm/1e2e42f5ea15c43002403fa10f2177ae to your computer and use it in GitHub Desktop.
Solana Ownership Check
if account.owner != program_id {
msg!("Greeted account does not have the correct program id");
return Err(ProgramError::IncorrectProgramId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment