1use steel::*;
4
5#[repr(u8)]
6#[derive(Clone, Copy, Debug, Eq, PartialEq, num_enum::TryFromPrimitive)]
7pub enum DojosInstruction {
8 BuyStarterPack = 1,
10
11 RecruitShogunTickets = 2,
13 RecruitShogunSol = 32,
14 SeatShogun = 3,
15 SeatShogunFillAll = 41,
16 ReplaceShogun = 34,
17 Dine = 5,
18 UpgradeBarracksShards = 7,
19 UpgradeBarracksSol = 26,
20 UpgradeForge = 8,
21 MergeShogun = 9,
22 PrestigeUpgrade = 10,
23 ClaimShards = 11,
25 ClaimReferralReward = 12,
26 ClaimRecruitReward = 36,
27 ClaimForgeReward = 37,
28 ClaimDineReward = 38,
29 ClaimDailyReward = 39,
30 ClaimCollectionReward = 40,
31 ClaimOffChainTaskReward = 43,
32 ClaimSeekerTaskReward = 44,
33 MintSoulbound = 45,
34 BattleAttack = 46,
35 BuyBundle = 13,
36 BuyTicketsWithShards = 22,
37 BuyFlashSale = 24,
38 ClearForgeCooldown = 15,
39 Log = 20,
40 LevelUpShogun = 25,
41 RollSceneSectionAmethyst = 27,
42 RollSceneSectionShards = 31,
43 SalvageSceneSection = 28,
44 BuyChest = 29,
45 BuyScene = 33,
46 UpdateActiveScene = 30,
47 BuySceneDojo = 35,
48
49 Deposit = 50,
51 Withdraw = 51,
52 SetChampion = 53,
54 ClaimXpRewards = 54,
56 Initialize = 0,
58 SetGenesisSlot = 19,
59 Buyback = 49,
60 SetSceneActive = 55,
62
63}
64
65#[repr(C)]
66#[derive(Clone, Copy, Debug, Pod, Zeroable)]
67pub struct Initialize {}
68
69#[repr(C)]
70#[derive(Clone, Copy, Debug, Pod, Zeroable)]
71pub struct BuyStarterPack {
72 pub referrer: [u8; 32], }
74
75#[repr(C)]
76#[derive(Clone, Copy, Debug, Pod, Zeroable)]
77pub struct RecruitShogunTickets {
78 pub count: [u8; 8], pub seed: [u8; 32], }
81
82#[repr(C)]
83#[derive(Clone, Copy, Debug, Pod, Zeroable)]
84pub struct RecruitShogunSol {
85 pub count: [u8; 8], pub seed: [u8; 32], }
88
89#[repr(C)]
91#[derive(Clone, Copy, Debug, Pod, Zeroable)]
92pub struct SeatShogun {
93 pub slot: [u8; 8],
94 pub rarity: [u8; 8],
95 pub element: [u8; 8],
96}
97
98#[repr(C)]
100#[derive(Clone, Copy, Debug, Pod, Zeroable)]
101pub struct SeatShogunFillAllEntry {
102 pub rarity: [u8; 8],
103 pub element: [u8; 8],
104}
105
106#[repr(C)]
108#[derive(Clone, Copy, Debug, Pod, Zeroable)]
109pub struct SeatShogunFillAll {
110 pub count: u8,
111 pub _pad: [u8; 7],
112 pub entries: [SeatShogunFillAllEntry; 12],
113}
114
115#[repr(C)]
117#[derive(Clone, Copy, Debug, Pod, Zeroable)]
118pub struct ReplaceShogun {
119 pub slot: [u8; 8],
120 pub new_rarity: [u8; 8],
121 pub new_element: [u8; 8],
122}
123
124#[repr(C)]
126#[derive(Clone, Copy, Debug, Pod, Zeroable)]
127pub struct Dine {
128 pub tier: [u8; 8],
129 pub slot: [u8; 8],
130}
131
132#[repr(C)]
133#[derive(Clone, Copy, Debug, Pod, Zeroable)]
134pub struct UpgradeBarracksShards {}
135
136#[repr(C)]
137#[derive(Clone, Copy, Debug, Pod, Zeroable)]
138pub struct UpgradeBarracksSol {}
139
140#[repr(C)]
141#[derive(Clone, Copy, Debug, Pod, Zeroable)]
142pub struct UpgradeForge {}
143
144#[repr(C)]
146#[derive(Clone, Copy, Debug, Pod, Zeroable)]
147pub struct MergeShogun {
148 pub merge_type: [u8; 8], pub seed: [u8; 32],
150}
151
152#[repr(C)]
154#[derive(Clone, Copy, Debug, Pod, Zeroable)]
155pub struct PrestigeUpgrade {
156 pub slot: [u8; 8],
157}
158
159#[repr(C)]
161#[derive(Clone, Copy, Debug, Pod, Zeroable)]
162pub struct LevelUpShogun {
163 pub slot: [u8; 8],
164}
165
166#[repr(C)]
167#[derive(Clone, Copy, Debug, Pod, Zeroable)]
168pub struct ClaimShards {}
169
170#[repr(C)]
171#[derive(Clone, Copy, Debug, Pod, Zeroable)]
172pub struct ClaimReferralReward {}
173
174#[repr(C)]
175#[derive(Clone, Copy, Debug, Pod, Zeroable)]
176pub struct ClaimRecruitReward {}
177
178#[repr(C)]
179#[derive(Clone, Copy, Debug, Pod, Zeroable)]
180pub struct ClaimForgeReward {}
181
182#[repr(C)]
183#[derive(Clone, Copy, Debug, Pod, Zeroable)]
184pub struct ClaimDineReward {}
185
186
187#[repr(C)]
188#[derive(Clone, Copy, Debug, Pod, Zeroable)]
189pub struct ClaimDailyReward {
190 pub signature: [u8; 64],
191}
192
193#[repr(C)]
194#[derive(Clone, Copy, Debug, Pod, Zeroable)]
195pub struct ClaimCollectionReward {
196 pub collection_index: u8,
198}
199
200#[repr(C)]
202#[derive(Clone, Copy, Debug, Pod, Zeroable)]
203pub struct ClaimOffChainTaskReward {
204 pub task_id: [u8; 8],
205 pub signature: [u8; 64],
206}
207
208#[repr(C)]
210#[derive(Clone, Copy, Debug, Pod, Zeroable)]
211pub struct ClaimSeekerTaskReward {}
212
213#[repr(C)]
215#[derive(Clone, Copy, Debug, Pod, Zeroable)]
216pub struct MintSoulbound {}
217
218#[repr(C)]
220#[derive(Clone, Copy, Debug, Pod, Zeroable)]
221pub struct BattleAttack {
222 pub defender_owner: [u8; 32],
224}
225
226#[repr(C)]
228#[derive(Clone, Copy, Debug, Pod, Zeroable)]
229pub struct SetChampion {
230 pub slot: [u8; 8],
231}
232
233#[repr(C)]
234#[derive(Clone, Copy, Debug, Pod, Zeroable)]
235pub struct BuyBundle {} #[repr(C)]
238#[derive(Clone, Copy, Debug, Pod, Zeroable)]
239pub struct BuyTicketsWithShards {} #[repr(C)]
242#[derive(Clone, Copy, Debug, Pod, Zeroable)]
243pub struct BuyFlashSale {} #[repr(C)]
246#[derive(Clone, Copy, Debug, Pod, Zeroable)]
247pub struct ClearForgeCooldown {}
248
249#[repr(C)]
250#[derive(Clone, Copy, Debug, Pod, Zeroable)]
251pub struct SetGenesisSlot {
252 pub genesis_slot: [u8; 8],
253 pub halving_period_slots: [u8; 8],
255}
256
257#[repr(C)]
258#[derive(Clone, Copy, Debug, Pod, Zeroable)]
259pub struct Log {
260 pub _reserved: [u8; 8], }
262
263#[repr(C)]
264#[derive(Clone, Copy, Debug, Pod, Zeroable)]
265pub struct RollSceneSectionAmethyst {
266 pub count: [u8; 8], pub seed: [u8; 32], }
269
270#[repr(C)]
271#[derive(Clone, Copy, Debug, Pod, Zeroable)]
272pub struct RollSceneSectionShards {
273 pub count: [u8; 8], pub seed: [u8; 32], }
276
277#[repr(C)]
279#[derive(Clone, Copy, Debug, Pod, Zeroable)]
280pub struct SalvageSceneSection {}
281
282#[repr(C)]
283#[derive(Clone, Copy, Debug, Pod, Zeroable)]
284pub struct BuyChest {}
285
286#[repr(C)]
287#[derive(Clone, Copy, Debug, Pod, Zeroable)]
288pub struct BuyScene {
289 pub scene_id: [u8; 8], }
291
292#[repr(C)]
293#[derive(Clone, Copy, Debug, Pod, Zeroable)]
294pub struct UpdateActiveScene {
295 pub scene_id: [u8; 8],
296}
297
298#[repr(C)]
300#[derive(Clone, Copy, Debug, Pod, Zeroable)]
301pub struct BuySceneDojo {
302 pub scene_id: [u8; 8],
303}
304
305#[repr(C)]
307#[derive(Clone, Copy, Debug, Pod, Zeroable)]
308pub struct Buyback {}
309
310#[repr(C)]
312#[derive(Clone, Copy, Debug, Pod, Zeroable)]
313pub struct Deposit {
314 pub amount: [u8; 8],
315}
316
317#[repr(C)]
319#[derive(Clone, Copy, Debug, Pod, Zeroable)]
320pub struct Withdraw {
321 pub amount: [u8; 8],
322}
323
324#[repr(C)]
325#[derive(Clone, Copy, Debug, Pod, Zeroable)]
326pub struct ClaimXpRewards {}
327
328#[repr(C)]
330#[derive(Clone, Copy, Debug, Pod, Zeroable)]
331pub struct SetSceneActive {
332 pub active: [u8; 8],
333}
334
335instruction!(DojosInstruction, Initialize);
336instruction!(DojosInstruction, BuyStarterPack);
337instruction!(DojosInstruction, RecruitShogunTickets);
338instruction!(DojosInstruction, RecruitShogunSol);
339instruction!(DojosInstruction, SeatShogun);
340instruction!(DojosInstruction, SeatShogunFillAll);
341instruction!(DojosInstruction, ReplaceShogun);
342instruction!(DojosInstruction, Dine);
343instruction!(DojosInstruction, UpgradeBarracksShards);
344instruction!(DojosInstruction, UpgradeBarracksSol);
345instruction!(DojosInstruction, UpgradeForge);
346instruction!(DojosInstruction, MergeShogun);
347instruction!(DojosInstruction, PrestigeUpgrade);
348instruction!(DojosInstruction, ClaimShards);
349instruction!(DojosInstruction, ClaimReferralReward);
350instruction!(DojosInstruction, ClaimRecruitReward);
351instruction!(DojosInstruction, ClaimForgeReward);
352instruction!(DojosInstruction, ClaimDineReward);
353instruction!(DojosInstruction, ClaimDailyReward);
354instruction!(DojosInstruction, ClaimCollectionReward);
355instruction!(DojosInstruction, ClaimOffChainTaskReward);
356instruction!(DojosInstruction, ClaimSeekerTaskReward);
357instruction!(DojosInstruction, MintSoulbound);
358instruction!(DojosInstruction, BattleAttack);
359instruction!(DojosInstruction, BuyBundle);
360instruction!(DojosInstruction, BuyTicketsWithShards);
361instruction!(DojosInstruction, BuyFlashSale);
362instruction!(DojosInstruction, ClearForgeCooldown);
363instruction!(DojosInstruction, SetGenesisSlot);
364instruction!(DojosInstruction, Log);
365instruction!(DojosInstruction, LevelUpShogun);
366instruction!(DojosInstruction, RollSceneSectionAmethyst);
367instruction!(DojosInstruction, RollSceneSectionShards);
368instruction!(DojosInstruction, SalvageSceneSection);
369instruction!(DojosInstruction, BuyChest);
370instruction!(DojosInstruction, BuyScene);
371instruction!(DojosInstruction, UpdateActiveScene);
372instruction!(DojosInstruction, BuySceneDojo);
373instruction!(DojosInstruction, Buyback);
374instruction!(DojosInstruction, Deposit);
375instruction!(DojosInstruction, Withdraw);
376instruction!(DojosInstruction, SetChampion);
377instruction!(DojosInstruction, ClaimXpRewards);
378instruction!(DojosInstruction, SetSceneActive);