1use steel::*;
2
3#[repr(u8)]
4#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
5pub enum OreInstruction {
6 Automate = 0,
8 Checkpoint = 2,
9 ClaimSOL = 3,
10 ClaimORE = 4,
11 Close = 5,
12 Deploy = 6,
13 Log = 8,
14 Reset = 9,
15 ReloadSOL = 21,
16
17 Deposit = 10,
19 Withdraw = 11,
20 ClaimYield = 12,
21
22 Buyback = 13,
24 Bury = 24,
25 Wrap = 14,
26 SetAdmin = 15,
27 SetFeeCollector = 16,
28 SetSwapProgram = 17,
29 SetVarAddress = 18,
30 NewVar = 19,
31 SetAdminFee = 20,
32 Liq = 25,
33 MigrateMintAuthority = 22,
34}
35
36#[repr(C)]
37#[derive(Clone, Copy, Debug, Pod, Zeroable)]
38pub struct Automate {
39 pub amount: [u8; 8],
40 pub deposit: [u8; 8],
41 pub fee: [u8; 8],
42 pub mask: [u8; 8],
43 pub strategy: u8,
44 pub reload: [u8; 8],
45}
46
47#[repr(C)]
48#[derive(Clone, Copy, Debug, Pod, Zeroable)]
49pub struct ClaimSOL {}
50
51#[repr(C)]
52#[derive(Clone, Copy, Debug, Pod, Zeroable)]
53pub struct ClaimORE {}
54
55#[repr(C)]
56#[derive(Clone, Copy, Debug, Pod, Zeroable)]
57pub struct Deploy {
58 pub amount: [u8; 8],
59 pub squares: [u8; 4],
60}
61
62#[repr(C)]
63#[derive(Clone, Copy, Debug, Pod, Zeroable)]
64pub struct Log {}
65
66#[repr(C)]
67#[derive(Clone, Copy, Debug, Pod, Zeroable)]
68pub struct Reset {}
69
70#[repr(C)]
71#[derive(Clone, Copy, Debug, Pod, Zeroable)]
72pub struct Mine {
73 pub nonce: [u8; 8],
74}
75
76#[repr(C)]
77#[derive(Clone, Copy, Debug, Pod, Zeroable)]
78pub struct Swap {
79 pub amount: [u8; 8],
80 pub direction: u8,
81 pub precision: u8,
82 pub seed: [u8; 32],
83}
84
85#[repr(C)]
86#[derive(Clone, Copy, Debug, Pod, Zeroable)]
87pub struct Uncommit {
88 pub amount: [u8; 8],
89}
90
91#[repr(C)]
92#[derive(Clone, Copy, Debug, Pod, Zeroable)]
93pub struct SetAdmin {
94 pub admin: [u8; 32],
95}
96
97#[repr(C)]
98#[derive(Clone, Copy, Debug, Pod, Zeroable)]
99pub struct SetFeeCollector {
100 pub fee_collector: [u8; 32],
101}
102
103#[repr(C)]
104#[derive(Clone, Copy, Debug, Pod, Zeroable)]
105pub struct SetFeeRate {
106 pub fee_rate: [u8; 8],
107}
108
109#[repr(C)]
110#[derive(Clone, Copy, Debug, Pod, Zeroable)]
111pub struct Wrap {}
112
113#[repr(C)]
114#[derive(Clone, Copy, Debug, Pod, Zeroable)]
115pub struct Buyback {}
116
117#[repr(C)]
118#[derive(Clone, Copy, Debug, Pod, Zeroable)]
119pub struct Bury {
120 pub amount: [u8; 8],
121}
122
123#[repr(C)]
124#[derive(Clone, Copy, Debug, Pod, Zeroable)]
125pub struct ReloadSOL {}
126
127#[repr(C)]
128#[derive(Clone, Copy, Debug, Pod, Zeroable)]
129pub struct Deposit {
130 pub amount: [u8; 8],
131}
132
133#[repr(C)]
134#[derive(Clone, Copy, Debug, Pod, Zeroable)]
135pub struct Withdraw {
136 pub amount: [u8; 8],
137}
138
139#[repr(C)]
140#[derive(Clone, Copy, Debug, Pod, Zeroable)]
141pub struct ClaimYield {
142 pub amount: [u8; 8],
143}
144
145#[repr(C)]
146#[derive(Clone, Copy, Debug, Pod, Zeroable)]
147pub struct Checkpoint {}
148
149#[repr(C)]
150#[derive(Clone, Copy, Debug, Pod, Zeroable)]
151pub struct Close {}
152
153#[repr(C)]
154#[derive(Clone, Copy, Debug, Pod, Zeroable)]
155pub struct NewVar {
156 pub id: [u8; 8],
157 pub commit: [u8; 32],
158 pub samples: [u8; 8],
159}
160
161#[repr(C)]
162#[derive(Clone, Copy, Debug, Pod, Zeroable)]
163pub struct SetAdminFee {
164 pub admin_fee: [u8; 8],
165}
166
167#[repr(C)]
168#[derive(Clone, Copy, Debug, Pod, Zeroable)]
169pub struct SetSwapProgram {}
170
171#[repr(C)]
172#[derive(Clone, Copy, Debug, Pod, Zeroable)]
173pub struct SetVarAddress {}
174
175#[repr(C)]
176#[derive(Clone, Copy, Debug, Pod, Zeroable)]
177pub struct Liq {}
178
179#[repr(C)]
180#[derive(Clone, Copy, Debug, Pod, Zeroable)]
181pub struct MigrateMintAuthority {}
182
183instruction!(OreInstruction, Automate);
184instruction!(OreInstruction, Close);
185instruction!(OreInstruction, Checkpoint);
186instruction!(OreInstruction, ClaimSOL);
187instruction!(OreInstruction, ClaimORE);
188instruction!(OreInstruction, ReloadSOL);
189instruction!(OreInstruction, Deploy);
190instruction!(OreInstruction, Log);
191instruction!(OreInstruction, Wrap);
192instruction!(OreInstruction, Buyback);
193instruction!(OreInstruction, Bury);
194instruction!(OreInstruction, Reset);
195instruction!(OreInstruction, SetAdmin);
196instruction!(OreInstruction, SetFeeCollector);
197instruction!(OreInstruction, Deposit);
198instruction!(OreInstruction, Withdraw);
199instruction!(OreInstruction, ClaimYield);
200instruction!(OreInstruction, NewVar);
201instruction!(OreInstruction, SetAdminFee);
202instruction!(OreInstruction, SetSwapProgram);
203instruction!(OreInstruction, SetVarAddress);
204instruction!(OreInstruction, Liq);
205instruction!(OreInstruction, MigrateMintAuthority);