1// Reconstructed from the compiled program by revrsly.
2// Read from the bytecode: instruction names and discriminators; each instruction's accounts in
3// order, with the types and attributes their loaders' checks imply (◇ inferred: the error codes
4// they raise, the account type whose discriminator they compare, the program ids they compare
5// with); the program's error enum; event and account type names. `/* … */` is a value not
6// recovered. Handler bodies are the register-level logic of each instruction's own handler.
7// Argument names come from a published IDL when there is one, else they are placeholders; struct
8// fields are not recovered. This is a reconstruction, NOT the author's source, and will not
9// compile as-is.
10// Program: 5aMAKxzyqesf1dn7cDLPdGxwshZf1aVNavYzAQQU32Fg (mainnet)
11
12use anchor_lang::prelude::*;
13
14declare_id!("5aMAKxzyqesf1dn7cDLPdGxwshZf1aVNavYzAQQU32Fg");■ string · 44 B
15
16// Accounts — each instruction's accounts, in order, as its account loader (try_accounts) checks them.
17
18#[derive(Accounts)]
19pub struct CommitFirstLegResult<'info> {◇ 3 accounts · order, types and checks inferred
20 #[account(mut)]
21 pub user: AccountInfo<'info>,
22 pub system_program: AccountInfo<'info>,
23 // ◇ created here (init); its type is not recovered
24 #[account(init, payer = /* … */, seeds = [/* … */], bump, space = /* … */)]
25 pub leg_result: AccountInfo<'info>,
26}
27
28▸ 3 more #[derive(Accounts)] structs · lines 28–74
75
76#[program]
77pub mod smart_arb {
78 use super::*;
79
80 // discriminator 8edba53648443ba4● found in the code at .text+0x32160
81 // args
82 ▾ pub fn commit_first_leg_result(ctx: Context<CommitFirstLegResult>) -> Result<()> {● its sha256 matches the discriminator
83 // ◇ The program's own handler (`commit_first_leg_result` in reconstructed.rs), register-level. Anchor's wrapper
84 // (`commit_first_leg_result_handler`) loads the accounts, then calls it with r1 = where its Result is written,
85 // r2 = &Context. Calls to other fn_* are in reconstructed.rs.
86 // 10 stack slots (local_…) used below; declared in reconstructed.rs.
87 r6 = r2;
88 r8 = r1;
89 r0 = get_return_data(&local_60);
90 r2 = local_40;
91 local_68 = r8;
92 if r2 != -0x8000000000000000 {
93 r7 = &local_40;
94 r0 = fn_47bb0(&local_60, *((r6) as *const u64));
95 if r0 != 0 {
96 if local_30 < 0x11 {
97 r0 = fn_29d0(r7);
98 r8 = 0;
99 r9 = 0;
100 r7 = 0;
101 r0 = fn_10678(local_68, *((r6 + 8) as *const u64) + 0x30, r8, r9, r7);
102 r0 = fn_d058(r6 + 0x20);
103 return r0;
104 }
105 local_20 = *((r7 + 8) as *const u64);
106 local_28 = *((r7) as *const u64);
107 r2 = *((r7 + 0x10) as *const u64);
108 local_18 = r2;
109 local_8 = 0;
110 local_10 = 0;
111 if r2 <= 0xf {
112 r0 = fn_51d38(0x10, r2, &Location("programs/smart_arb/src/lib.rs:218:37"));■ string · 36 B
113 }
114 r0 = fn_51da0(&local_10, 0x10, local_20, 0x10, &Location("programs/smart_arb/src/lib.rs:218:16"));■ string · 36 B
115 r9 = local_8;
116 r8 = local_10;
117 r1 = &local_28;
118 local_70 = r1;
119 r0 = fn_c958(r1, 0x10, &Location("programs/smart_arb/src/lib.rs:219:43"));■ string · 36 B
120 r7 = *((r0) as *const u8);
121 r0 = fn_29d0(local_70);
122 r0 = fn_10678(local_68, *((r6 + 8) as *const u64) + 0x30, r8, r9, r7);
123 r0 = fn_d058(r6 + 0x20);
124 return r0;
125 }
126 r0 = fn_29d0(r7);
127 r8 = 0;
128 r9 = 0;
129 r7 = 0;
130 r0 = fn_10678(local_68, *((r6 + 8) as *const u64) + 0x30, r8, r9, r7);
131 r0 = fn_d058(r6 + 0x20);
132 return r0;
133 }
134 r8 = 0;
135 r9 = 0;
136 r7 = 0;
137 r0 = fn_10678(local_68, *((r6 + 8) as *const u64) + 0x30, r8, r9, r7);
138 r0 = fn_d058(r6 + 0x20);
139 return r0;
140 }
141