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}
29
30#[repr(C)]
31#[derive(Clone, Copy, Debug, Pod, Zeroable)]
32pub struct Withdraw {
33 pub amount: [u8; 8],
34}
35
36#[repr(C)]
37#[derive(Clone, Copy, Debug, Pod, Zeroable)]
38pub struct Claim {
39 pub amount: [u8; 8],
40}
41
42#[repr(C)]
43#[derive(Clone, Copy, Debug, Pod, Zeroable)]
44pub struct Compound {}
45
46#[repr(C)]
47#[derive(Clone, Copy, Debug, Pod, Zeroable)]
48pub struct Distribute {
49 pub amount: [u8; 8],
50}
51
52#[repr(C)]
53#[derive(Clone, Copy, Debug, Pod, Zeroable)]
54pub struct Init {}
55
56#[repr(C)]
57#[derive(Clone, Copy, Debug, Pod, Zeroable)]
58pub struct Close {}
59
60instruction!(OreStakeInstruction, Log);
61instruction!(OreStakeInstruction, Init);
62instruction!(OreStakeInstruction, Distribute);
63instruction!(OreStakeInstruction, Deposit);
64instruction!(OreStakeInstruction, Withdraw);
65instruction!(OreStakeInstruction, Claim);
66instruction!(OreStakeInstruction, Compound);
67instruction!(OreStakeInstruction, Close);