lib.rs 605 B

12345678910111213141516171819202122232425262728
  1. mod go_to_the_park;
  2. use go_to_the_park::*;
  3. use processing_instructions_api::prelude::*;
  4. use solana_program::msg;
  5. use steel::*;
  6. pub fn process_instruction(
  7. program_id: &Pubkey,
  8. accounts: &[AccountInfo],
  9. instruction_data: &[u8],
  10. ) -> ProgramResult {
  11. msg!("Processing instruction");
  12. let (ix, data) = parse_instruction(
  13. &processing_instructions_api::ID,
  14. program_id,
  15. instruction_data,
  16. )?;
  17. match ix {
  18. ProcessingInstructionsInstruction::GoToThePark => process_go_to_the_park(accounts, data)?,
  19. }
  20. Ok(())
  21. }
  22. entrypoint!(process_instruction);