Created
April 9, 2022 03:14
-
-
Save alecchendev/e1960236a8b78a04e48c835fc11d6e46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// validating token program id | |
// imports | |
use solana_program::program_error::ProgramError; | |
use spl_token; | |
// code inside of `process_instruction` | |
// [get accounts] - token_program_account | |
if *token_program_account.key != spl_token::id() { | |
return Err(ProgramError::IncorrectProgramId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment