ore_stake_api/
instruction.rs1use steel::*;
2
3#[repr(u8)]
4#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
5pub enum OreStakeInstruction {
6 Log = 0,
8 Init = 1,
9 Distribute = 2,
10
11 Deposit = 10,
13 Withdraw = 11,
14 Claim = 12,
15 Compound = 13,
16 Close = 14,
17}
18
19#[repr(C)]
20#[derive(Clone, Copy, Debug, Pod, Zeroable)]
21pub struct Log {}
22
23#[repr(C)]
24#[derive(Clone, Copy, Debug, Pod, Zeroable)]
25pub struct Deposit {
26 pub amount: [u8; 8],
27 pub compound_fee: [u8; 8],
28 pub compound_fee_deposit: [u8; 8],
29}
30
31#[repr(C)]
32#[derive(Clone, Copy, Debug, Pod, Zeroable)]
33pub struct Withdraw {
34 pub amount: [u8; 8],
35}
36
37#[repr(C)]
38#[derive(Clone, Copy, Debug, Pod, Zeroable)]
39pub struct Claim {
40 pub amount: [u8; 8],
41}
42
43#[repr(C)]
44#[derive(Clone, Copy, Debug, Pod, Zeroable)]
45pub struct Compound {}
46
47#[repr(C)]
48#[derive(Clone, Copy, Debug, Pod, Zeroable)]
49pub struct Distribute {
50 pub amount: [u8; 8],
51}
52
53#[repr(C)]
54#[derive(Clone, Copy, Debug, Pod, Zeroable)]
55pub struct Init {}
56
57#[repr(C)]
58#[derive(Clone, Copy, Debug, Pod, Zeroable)]
59pub struct Close {}
60
61instruction!(OreStakeInstruction, Log);
62instruction!(OreStakeInstruction, Init);
63instruction!(OreStakeInstruction, Distribute);
64instruction!(OreStakeInstruction, Deposit);
65instruction!(OreStakeInstruction, Withdraw);
66instruction!(OreStakeInstruction, Claim);
67instruction!(OreStakeInstruction, Compound);
68instruction!(OreStakeInstruction, Close);