lib.rs 565 B

123456789101112131415161718192021222324
  1. mod initialize;
  2. use create_account_api::prelude::*;
  3. use initialize::*;
  4. use steel::*;
  5. /// Process the input before sending it over
  6. /// to our main program to use.
  7. pub fn process_instruction(
  8. program_id: &Pubkey,
  9. accounts: &[AccountInfo],
  10. data: &[u8],
  11. ) -> ProgramResult {
  12. let (ix, _data) = parse_instruction(&create_account_api::ID, program_id, data)?;
  13. match ix {
  14. CreateAccountInstruction::InitializeAccount => process_initialize(accounts)?,
  15. }
  16. Ok(())
  17. }
  18. // Declare entrypoint for our program
  19. entrypoint!(process_instruction);