ore_legacy_api/
instruction.rs

1use steel::*;
2
3// Legacy instructions
4
5#[repr(u8)]
6#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
7pub enum OREV2Instruction {
8    OREV2Claim = 0,
9}
10
11#[repr(C)]
12#[derive(Clone, Copy, Debug, Pod, Zeroable)]
13pub struct OREV2Claim {
14    pub amount: [u8; 8],
15}
16
17instruction!(OREV2Instruction, OREV2Claim);
18
19// Pool instructions
20
21#[repr(u8)]
22#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
23pub enum PoolInstruction {
24    PoolClaim = 0,
25    PoolUnstake = 4,
26}
27
28#[repr(C)]
29#[derive(Clone, Copy, Debug, Pod, Zeroable)]
30pub struct PoolClaim {
31    pub amount: [u8; 8],
32    pub pool_bump: u8,
33}
34
35#[repr(C)]
36#[derive(Clone, Copy, Debug, Pod, Zeroable)]
37pub struct PoolUnstake {
38    pub amount: [u8; 8],
39}
40
41instruction!(PoolInstruction, PoolClaim);
42instruction!(PoolInstruction, PoolUnstake);
43
44// Boost instructions
45
46#[repr(u8)]
47#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
48pub enum BoostV2Instruction {
49    BoostV2Claim = 0,
50    BoostV2Withdraw = 5,
51}
52
53#[repr(C)]
54#[derive(Clone, Copy, Debug, Pod, Zeroable)]
55pub struct BoostV2Claim {
56    pub amount: [u8; 8],
57}
58
59#[repr(C)]
60#[derive(Clone, Copy, Debug, Pod, Zeroable)]
61pub struct BoostV2Withdraw {
62    pub amount: [u8; 8],
63}
64
65instruction!(BoostV2Instruction, BoostV2Claim);
66instruction!(BoostV2Instruction, BoostV2Withdraw);