instruction.rs 582 B

12345678910111213141516171819202122
  1. use borsh::{BorshDeserialize, BorshSerialize};
  2. use steel::*;
  3. #[repr(u8)]
  4. #[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
  5. pub enum PdaRentPayerInstruction {
  6. InitializeRentVault = 0,
  7. CreateNewAccount = 1,
  8. }
  9. #[repr(C)]
  10. #[derive(BorshSerialize, BorshDeserialize, Clone, Copy, Debug, Pod, Zeroable)]
  11. pub struct InitializeRentVault {
  12. pub amount: u64,
  13. }
  14. #[repr(C)]
  15. #[derive(Clone, Copy, Debug, Pod, Zeroable)]
  16. pub struct CreateNewAccount {}
  17. instruction!(PdaRentPayerInstruction, InitializeRentVault);
  18. instruction!(PdaRentPayerInstruction, CreateNewAccount);