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,
24 ClaimReferralReward = 12,
25 ClaimRecruitReward = 36,
26 ClaimForgeReward = 37,
27 ClaimDineReward = 38,
28 ClaimDailyReward = 39,
29 ClaimCollectionReward = 40,
30 BuyBundle = 13,
31 BuyTicketsWithShards = 22,
32 BuyFlashSale = 24,
33 ClearForgeCooldown = 15,
34 Log = 20,
35 LevelUpShogun = 25,
36 RollSceneSectionAmethyst = 27,
37 RollSceneSectionShards = 31,
38 SalvageSceneSection = 28,
39 BuyChest = 29,
40 BuyScene = 33,
41 UpdateActiveScene = 30,
42 BuySceneDojo = 35,
43
44 Initialize = 0,
46 SetGenesisSlot = 19,
47}
48
49#[repr(C)]
50#[derive(Clone, Copy, Debug, Pod, Zeroable)]
51pub struct Initialize {}
52
53#[repr(C)]
54#[derive(Clone, Copy, Debug, Pod, Zeroable)]
55pub struct BuyStarterPack {
56 pub referrer: [u8; 32], }
58
59#[repr(C)]
60#[derive(Clone, Copy, Debug, Pod, Zeroable)]
61pub struct RecruitShogunTickets {
62 pub count: [u8; 8], pub seed: [u8; 32], }
65
66#[repr(C)]
67#[derive(Clone, Copy, Debug, Pod, Zeroable)]
68pub struct RecruitShogunSol {
69 pub count: [u8; 8], pub seed: [u8; 32], }
72
73#[repr(C)]
75#[derive(Clone, Copy, Debug, Pod, Zeroable)]
76pub struct SeatShogun {
77 pub slot: [u8; 8],
78 pub rarity: [u8; 8],
79 pub element: [u8; 8],
80}
81
82#[repr(C)]
84#[derive(Clone, Copy, Debug, Pod, Zeroable)]
85pub struct SeatShogunFillAllEntry {
86 pub rarity: [u8; 8],
87 pub element: [u8; 8],
88}
89
90#[repr(C)]
92#[derive(Clone, Copy, Debug, Pod, Zeroable)]
93pub struct SeatShogunFillAll {
94 pub count: u8,
95 pub _pad: [u8; 7],
96 pub entries: [SeatShogunFillAllEntry; 12],
97}
98
99#[repr(C)]
101#[derive(Clone, Copy, Debug, Pod, Zeroable)]
102pub struct ReplaceShogun {
103 pub slot: [u8; 8],
104 pub new_rarity: [u8; 8],
105 pub new_element: [u8; 8],
106}
107
108#[repr(C)]
110#[derive(Clone, Copy, Debug, Pod, Zeroable)]
111pub struct Dine {
112 pub tier: [u8; 8],
113 pub slot: [u8; 8],
114}
115
116#[repr(C)]
117#[derive(Clone, Copy, Debug, Pod, Zeroable)]
118pub struct UpgradeBarracksShards {}
119
120#[repr(C)]
121#[derive(Clone, Copy, Debug, Pod, Zeroable)]
122pub struct UpgradeBarracksSol {}
123
124#[repr(C)]
125#[derive(Clone, Copy, Debug, Pod, Zeroable)]
126pub struct UpgradeForge {}
127
128#[repr(C)]
130#[derive(Clone, Copy, Debug, Pod, Zeroable)]
131pub struct MergeShogun {
132 pub merge_type: [u8; 8], pub seed: [u8; 32],
134}
135
136#[repr(C)]
138#[derive(Clone, Copy, Debug, Pod, Zeroable)]
139pub struct PrestigeUpgrade {
140 pub slot: [u8; 8],
141}
142
143#[repr(C)]
145#[derive(Clone, Copy, Debug, Pod, Zeroable)]
146pub struct LevelUpShogun {
147 pub slot: [u8; 8],
148}
149
150#[repr(C)]
151#[derive(Clone, Copy, Debug, Pod, Zeroable)]
152pub struct ClaimShards {} #[repr(C)]
155#[derive(Clone, Copy, Debug, Pod, Zeroable)]
156pub struct ClaimReferralReward {}
157
158#[repr(C)]
159#[derive(Clone, Copy, Debug, Pod, Zeroable)]
160pub struct ClaimRecruitReward {}
161
162#[repr(C)]
163#[derive(Clone, Copy, Debug, Pod, Zeroable)]
164pub struct ClaimForgeReward {}
165
166#[repr(C)]
167#[derive(Clone, Copy, Debug, Pod, Zeroable)]
168pub struct ClaimDineReward {}
169
170#[repr(C)]
171#[derive(Clone, Copy, Debug, Pod, Zeroable)]
172pub struct ClaimDailyReward {
173 pub signature: [u8; 64],
174}
175
176#[repr(C)]
177#[derive(Clone, Copy, Debug, Pod, Zeroable)]
178pub struct ClaimCollectionReward {
179 pub collection_index: u8,
181}
182
183#[repr(C)]
184#[derive(Clone, Copy, Debug, Pod, Zeroable)]
185pub struct BuyBundle {} #[repr(C)]
188#[derive(Clone, Copy, Debug, Pod, Zeroable)]
189pub struct BuyTicketsWithShards {} #[repr(C)]
192#[derive(Clone, Copy, Debug, Pod, Zeroable)]
193pub struct BuyFlashSale {} #[repr(C)]
196#[derive(Clone, Copy, Debug, Pod, Zeroable)]
197pub struct ClearForgeCooldown {}
198
199#[repr(C)]
200#[derive(Clone, Copy, Debug, Pod, Zeroable)]
201pub struct SetGenesisSlot {
202 pub genesis_slot: [u8; 8],
203 pub halving_period_slots: [u8; 8],
205}
206
207#[repr(C)]
208#[derive(Clone, Copy, Debug, Pod, Zeroable)]
209pub struct Log {
210 pub _reserved: [u8; 8], }
212
213#[repr(C)]
214#[derive(Clone, Copy, Debug, Pod, Zeroable)]
215pub struct RollSceneSectionAmethyst {
216 pub count: [u8; 8], pub seed: [u8; 32], }
219
220#[repr(C)]
221#[derive(Clone, Copy, Debug, Pod, Zeroable)]
222pub struct RollSceneSectionShards {
223 pub count: [u8; 8], pub seed: [u8; 32], }
226
227#[repr(C)]
229#[derive(Clone, Copy, Debug, Pod, Zeroable)]
230pub struct SalvageSceneSection {}
231
232#[repr(C)]
233#[derive(Clone, Copy, Debug, Pod, Zeroable)]
234pub struct BuyChest {}
235
236#[repr(C)]
237#[derive(Clone, Copy, Debug, Pod, Zeroable)]
238pub struct BuyScene {
239 pub scene_id: [u8; 8], }
241
242#[repr(C)]
243#[derive(Clone, Copy, Debug, Pod, Zeroable)]
244pub struct UpdateActiveScene {
245 pub scene_id: [u8; 8],
246}
247
248#[repr(C)]
250#[derive(Clone, Copy, Debug, Pod, Zeroable)]
251pub struct BuySceneDojo {
252 pub scene_id: [u8; 8],
253}
254
255instruction!(DojosInstruction, Initialize);
256instruction!(DojosInstruction, BuyStarterPack);
257instruction!(DojosInstruction, RecruitShogunTickets);
258instruction!(DojosInstruction, RecruitShogunSol);
259instruction!(DojosInstruction, SeatShogun);
260instruction!(DojosInstruction, SeatShogunFillAll);
261instruction!(DojosInstruction, ReplaceShogun);
262instruction!(DojosInstruction, Dine);
263instruction!(DojosInstruction, UpgradeBarracksShards);
264instruction!(DojosInstruction, UpgradeBarracksSol);
265instruction!(DojosInstruction, UpgradeForge);
266instruction!(DojosInstruction, MergeShogun);
267instruction!(DojosInstruction, PrestigeUpgrade);
268instruction!(DojosInstruction, ClaimShards);
269instruction!(DojosInstruction, ClaimReferralReward);
270instruction!(DojosInstruction, ClaimRecruitReward);
271instruction!(DojosInstruction, ClaimForgeReward);
272instruction!(DojosInstruction, ClaimDineReward);
273instruction!(DojosInstruction, ClaimDailyReward);
274instruction!(DojosInstruction, ClaimCollectionReward);
275instruction!(DojosInstruction, BuyBundle);
276instruction!(DojosInstruction, BuyTicketsWithShards);
277instruction!(DojosInstruction, BuyFlashSale);
278instruction!(DojosInstruction, ClearForgeCooldown);
279instruction!(DojosInstruction, SetGenesisSlot);
280instruction!(DojosInstruction, Log);
281instruction!(DojosInstruction, LevelUpShogun);
282instruction!(DojosInstruction, RollSceneSectionAmethyst);
283instruction!(DojosInstruction, RollSceneSectionShards);
284instruction!(DojosInstruction, SalvageSceneSection);
285instruction!(DojosInstruction, BuyChest);
286instruction!(DojosInstruction, BuyScene);
287instruction!(DojosInstruction, UpdateActiveScene);
288instruction!(DojosInstruction, BuySceneDojo);