instruction.rs 544 B

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