use steel::*; #[repr(u8)] #[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)] pub enum OreInstruction { // User Bet = 0, Bury = 1, Close = 2, Payout = 3, Reset = 4, // Admin Initialize = 100, } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Bet { pub amount: [u8; 8], pub seed: [u8; 32], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Bury {} #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Close {} #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Reset {} #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Payout {} #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Initialize {} instruction!(OreInstruction, Bet); instruction!(OreInstruction, Bury); instruction!(OreInstruction, Close); instruction!(OreInstruction, Payout); instruction!(OreInstruction, Reset); instruction!(OreInstruction, Initialize);