lib.rs 475 B

123456789101112131415161718192021
  1. mod create_account;
  2. use create_account::*;
  3. use rent_example_api::prelude::*;
  4. use steel::*;
  5. pub fn process_instruction(
  6. program_id: &Pubkey,
  7. accounts: &[AccountInfo],
  8. data: &[u8],
  9. ) -> ProgramResult {
  10. let (ix, data) = parse_instruction::<RentInstruction>(&rent_example_api::ID, program_id, data)?;
  11. match ix {
  12. RentInstruction::CreateSystemAccount => process_create_account(accounts, data)?,
  13. }
  14. Ok(())
  15. }
  16. entrypoint!(process_instruction);