use steel::*; #[repr(u8)] #[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)] pub enum OreInstruction { // User Boost = 0, ClaimSOL = 1, ClaimORE = 2, Deploy = 3, Initialize = 4, Log = 5, Redeem = 6, Reset = 7, // Admin SetAdmin = 9, SetFeeCollector = 10, // Seeker ClaimSeeker = 13, } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Boost {} #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct ClaimSOL { pub amount: [u8; 8], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct ClaimORE { pub amount: [u8; 8], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Deploy { pub amount: [u8; 8], pub square_id: [u8; 8], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Initialize {} #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Log {} #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Redeem { pub amount: [u8; 8], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Reset {} #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Mine { pub nonce: [u8; 8], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Swap { pub amount: [u8; 8], pub direction: u8, pub precision: u8, pub seed: [u8; 32], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct Uncommit { pub amount: [u8; 8], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct SetAdmin { pub admin: [u8; 32], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct SetBlockDuration { pub block_duration: [u8; 8], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct SetFeeCollector { pub fee_collector: [u8; 32], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct SetFeeRate { pub fee_rate: [u8; 8], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct SetSniperFeeDuration { pub sniper_fee_duration: [u8; 8], } #[repr(C)] #[derive(Clone, Copy, Debug, Pod, Zeroable)] pub struct ClaimSeeker {} instruction!(OreInstruction, Boost); instruction!(OreInstruction, ClaimSOL); instruction!(OreInstruction, ClaimORE); instruction!(OreInstruction, Deploy); instruction!(OreInstruction, Initialize); instruction!(OreInstruction, Log); instruction!(OreInstruction, Redeem); instruction!(OreInstruction, Reset); instruction!(OreInstruction, SetAdmin); instruction!(OreInstruction, SetFeeCollector); instruction!(OreInstruction, ClaimSeeker);