once ❝ published name Reconstructed 91.5% of control flow structured Anchor ◇ GRzKU9i3Cs7A5Euf9gGZjbRnpypw7DzaU3hWRfUgpYTa copy decompiled 22 Oct 2026
Identity · published metadata ▾
Loader ■ v3 · upgradeable
sBPF ■ v0
Size ■ 556,728 bytes
Instructions ● 58,814
Functions ● 412
SHA-256 ● 23200e76…1d4a7b42
Upgrade authority ■ 8gop…M677
Last deploy slot ■ 459,519,774 ❝ Published by the authors · their claims, not revrsly output Verified build github.com/call-once/once-program @ 1ee2ebf · ✓ hash matches this bytecode IDL · none publishedsecurity.txt · embedded ■ read from the bytes view Loading the reconstruction…
reclaim ▾
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: GRzKU9i3Cs7A5Euf9gGZjbRnpypw7DzaU3hWRfUgpYTa (mainnet)
11
12 use anchor_lang::prelude::*;
13
14 declare_id!( "GRzKU9i3Cs7A5Euf9gGZjbRnpypw7DzaU3hWRfUgpYTa" ); ■ string · 44 B
15
16 // security.txt embedded in the program (its authors' own text, not revrsly output):
17 // name: once
18 // project_url: https://callonce.xyz
19 // contacts: link:https://x.com/calloncedotxyz
20 // policy: https://github.com/call-once/once-program/blob/main/SECURITY.md
21 // preferred_languages: en
22 // source_code: https://github.com/call-once/once-program
23
24 // Accounts — each instruction's accounts, in order, as its account loader (try_accounts) checks them.
25
26 ▸ 5 more #[derive(Accounts)] structs · lines 26–148
149
150 #[event_cpi ]
151 #[derive ( Accounts )]
152 pub struct Reclaim <'info> { ◇ 6 accounts · order, types and checks inferred
153 #[account ( mut )]
154 pub writer : Signer <'info>,
155 #[account ( mut , seeds = [b "call" , /* 8 bytes */ ], bump = /* stored */ , constraint = /* … */ @ CustomError :: AlreadySettled , constraint = /* … */ @ CustomError :: NotWriter )] ■ string · 4 B
156 pub call : Account <'info, Call >,
157 #[account ( mut , seeds = [b "vault" , /* 32 bytes */ ], bump, token::mint = /* … */ , token::authority = /* … */ , token::token_program = /* … */ )] ■ string · 5 B
158 pub vault : InterfaceAccount <'info, TokenAccount >,
159 #[account (constraint = /* … */ @ CustomError :: UnsupportedTokenProgram , constraint = /* … */ @ CustomError :: WrongMint )]
160 pub mint : InterfaceAccount <'info, Mint >,
161 #[account (constraint = /* … */ @ CustomError :: UnsupportedTokenProgram )]
162 pub token_program : Interface <'info, TokenInterface >,
163 #[account ( mut , token::mint = /* … */ , token::authority = /* … */ , token::token_program = /* … */ )]
164 pub destination : InterfaceAccount <'info, TokenAccount >,
165 }
166
167 ▸ 4 more #[derive(Accounts)] structs · lines 167–224
225
226 #[program ]
227 pub mod once {
228 use super ::*;
229
232 ▸ pub fn buy (ctx: Context < Buy >) -> Result <()> { … 431 lines }
668 ▸ pub fn call (ctx: Context < CallAccounts >) -> Result <()> { … 673 lines }
1346 ▸ pub fn cancel (ctx: Context < Cancel >) -> Result <()> { … 398 lines }
1750 ▸ pub fn init (ctx: Context < Init >, arg_0 : Pubkey , arg_20 : u64 , arg_28 : u64 ) -> Result <()> { … 289 lines }
2044 ▸ pub fn lock_and_buy (ctx: Context < LockAndBuy >) -> Result <()> { … 568 lines }
2614
2615 // discriminator 2cb1ecf9916da3ba ● found in the code at .text+0x42328
2616 // args
2617 ▾ pub fn reclaim (ctx: Context < Reclaim >) -> Result <()> { ● its sha256 matches the discriminator
2618 // ◇ The program's own handler (`reclaim` in reconstructed.rs), register-level. Anchor's wrapper
2619 // (`reclaim_handler`) loads the accounts, then calls it with r1 = where its Result is written,
2620 // r2 = &Context. Calls to other fn_* are in reconstructed.rs.
2621 // 73 stack slots (local_…) used below; declared in reconstructed.rs.
2622 r7 = r2;
2623 r6 = r1;
2624 r0 = clock_get (&local_150_u64);
2625 if local_150_u32 ==
3079 ▸ pub fn return_lock (ctx: Context < ReturnLock >) -> Result <()> { … 591 lines }
3675 ▸ pub fn set_once (ctx: Context < SetOnce >) -> Result <()> { … 337 lines }
4018 ▸ pub fn set_params (ctx: Context < SetParams >, arg_0 : u64 , arg_8 : u64 ) -> Result <()> { … 282 lines }
4306 ▸ pub fn write (ctx: Context < Write >, arg_0 : u64 , arg_8 : u64 , arg_10 : u64 , arg_18 : u64 , arg_20 : u64 ) -> Result <()> { … 510 lines }
4818
4819 }
4820
4821 // Errors — the program's error enum, read from the functions that give each variant its name and
4822 // its message. Codes start at 6000. ◇ The enum's own name is not in the binary.
4823 #[error_code ]
4824 pub enum CustomError {
4825 #[msg ( "Only the program upgrade authority may initialize" )] ■ string · 49 B
4826 NotUpgradeAuthority , // 6000
4827 #[msg ( "Only the admin may update configuration" )] ■ string · 39 B
4828 NotAdmin , // 6001
4829 #[msg ( "ONCE mint has already been set" )] ■ string · 30 B
Evidence why revrsly believes it ×
Instruction ● Derived
reclaim
· Discriminator 2cb1ecf9916da3ba found at .text+0x42328. It equals the first 8 bytes of sha256("global:reclaim").
■ Logs "Instruction: Reclaim" on entry.
❝ No published IDL to confirm it.
Arguments · none read 0 tag
Accounts · 8 · ◇ inferred #0 writer s w
#1 call w · Call
#2 vault w · TokenAccount
#3 mint Mint
#4 token_program
#5 destination w · TokenAccount
#6 event_authority
#7 program
Names come from the binary's own error strings. Order, the w/s flags and the types are inferred from code shape. References ● accounts loaded by reclaim_try_accounts
● dispatch → reclaim_handler · .text+0x440e0
◇ its handler → reclaim · .text+0x4ddf8
1
{
2626 r0 = fn_5fbd0(&local_198, local_14c, local_148_u32);
2629 *((r6) as * mut u64 ) = r7;
2630 *((r6 + 8 ) as * mut u64 ) = r8;
2633 r9 = *((r7 + 8 ) as * const u64 );
2634 r2 = *((r9 + 8 ) as * const u64 );
2635 if (local_128_u64 as i64 ) < *((r2 + 0x88 ) as * const u64 ) {
2636 r0 = custom_error_name (&local_90, & NotExpired ); // error 6018
2640 local_28 = 0x7dfc8 ; // .data.rel.ro+0xc8
2641 local_30 = &local_60;
2642 local_20 = 0xe0000020 ;
2643 r0 = custom_error_fmt (& NotExpired , &local_30, r3, r4, r5); // error 6018
2645 r5 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/string.rs:2830:14" ); ■ string · 92 B
2646 r0 = fn_6f930( "a Display implementation returned an error unexpectedly" , 0x37 , &local_150_u64, 0x7dff8 , r5); // .data.rel.ro+0xf8 ■ string · 55 B
2648 local_108 = local_50;
2649 local_110 = local_58;
2650 local_118 = local_60;
2651 local_130 = local_90;
2652 local_128_u64 = local_88;
2653 local_120 = local_80;
2654 local_148_u64 = "programs/once/src/lib.rs" ; ■ string · 24 B
2655 local_b8 = 0x1782 ; // error 6018 NotExpired: "Call has not expired"
2657 local_138_u32 = 0x13c ; // error raised at programs/once/src/lib.rs:316
2660 r0 = fn_5fb40(&local_188, &local_150_u64);
2663 *((r6) as * mut u64 ) = r7;
2664 *((r6 + 8 ) as * mut u64 ) = r8;
2667 local_1a8 = local_148_u64;
2668 r1 = *((r9 + 0x10 ) as * const u64 );
2669 local_1a0 = *((r1 + 0x68 ) as * const u64 );
2670 r3 = *((*((r9 + 0x20 ) as * const u64 )) as * const u64 );
2671 local_98 = *((r3 + 0x18 ) as * const u64 );
2672 local_a0 = *((r3 + 0x10 ) as * const u64 );
2673 local_a8 = *((r3 + 8 ) as * const u64 );
2674 local_b0 = *((r3) as * const u64 );
2675 r3 = *((r1 + 0x20 ) as * const u64 );
2676 r1 = *((r3 + 8 ) as * const u64 );
2677 r5 = *((r1) as * const u64 ) + 1 ;
2682 r4 = *((r3) as * const u64 );
2683 *((r1) as * mut u64 ) = r5;
2685 r5 = *((r3 + 0x10 ) as * const u64 );
2686 r0 = *((r5) as * const u64 ) + 1 ;
2691 *((r5) as * mut u64 ) = r0;
2694 r0 = *((r3 + 0x18 ) as * const u64 );
2695 r7 = *((r3 + 0x20 ) as * const u64 );
2696 r8 = *((r3 + 0x28 ) as * const u8 );
2697 r6 = *((r3 + 0x29 ) as * const u8 );
2698 local_66 = *((r3 + 0x2a ) as * const u8 );
2706 r3 = *((*((r9 + 0x18 ) as * const u64 ) + 0x58 ) as * const u64 );
2707 r1 = *((r3 + 8 ) as * const u64 );
2708 r5 = *((r1) as * const u64 ) + 1 ;
2713 r4 = *((r3) as * const u64 );
2714 *((r1) as * mut u64 ) = r5;
2716 r5 = *((r3 + 0x10 ) as * const u64 );
2717 r0 = *((r5) as * const u64 ) + 1 ;
2722 *((r5) as * mut u64 ) = r0;
2724 r0 = *((r3 + 0x18 ) as * const u64 );
2725 r6 = *((r3 + 0x20 ) as * const u64 );
2726 r7 = *((r3 + 0x28 ) as * const u8 );
2727 r8 = *((r3 + 0x29 ) as * const u8 );
2728 local_36 = *((r3 + 0x2a ) as * const u8 );
2736 r3 = *((*((r9 + 0x28 ) as * const u64 ) + 0x20 ) as * const u64 );
2737 r1 = *((r3 + 8 ) as * const u64 );
2738 r5 = *((r1) as * const u64 ) + 1 ;
2743 r4 = *((r3) as * const u64 );
2744 *((r1) as * mut u64 ) = r5;
2746 r5 = *((r3 + 0x10 ) as * const u64 );
2747 r0 = *((r5) as * const u64 ) + 1 ;
2752 *((r5) as * mut u64 ) = r0;
2754 r0 = *((r3 + 0x18 ) as * const u64 );
2755 r6 = *((r3 + 0x20 ) as * const u64 );
2756 r7 = *((r3 + 0x28 ) as * const u8 );
2757 r8 = *((r3 + 0x29 ) as * const u8 );
2758 local_6 = *((r3 + 0x2a ) as * const u8 );
2766 r3 = *((r9) as * const u64 );
2767 r1 = *((r3 + 8 ) as * const u64 );
2768 r5 = *((r1) as * const u64 ) + 1 ;
2773 r4 = *((r3) as * const u64 );
2774 *((r1) as * mut u64 ) = r5;
2776 r5 = *((r3 + 0x10 ) as * const u64 );
2777 r0 = *((r5) as * const u64 ) + 1 ;
2782 *((r5) as * mut u64 ) = r0;
2784 r0 = *((r3 + 0x18 ) as * const u64 );
2785 r6 = *((r3 + 0x20 ) as * const u64 );
2786 r7 = *((r3 + 0x28 ) as * const u8 );
2787 r8 = *((r3 + 0x29 ) as * const u8 );
2788 local_126 = *((r3 + 0x2a ) as * const u8 );
2796 local_fe0 = *((*((r9 + 0x18 ) as * const u64 ) + 0x30 ) as * const u8 );
2797 local_fe8 = local_1a0;
2798 local_ff0 = &local_150_u64;
2799 local_ff8 = &local_30;
2800 local_1000 = &local_60;
2801 r0 = fn_d4b0(&local_160, r2, &local_b0, &local_90, fp);
2806 *((r6) as * mut u64 ) = r7;
2807 *((r6 + 8 ) as * mut u64 ) = r8;
2810 *((*((r9 + 8 ) as * const u64 ) + 0xb1 ) as * mut u8 ) = 3 ;
2811 *((*((r9 + 8 ) as * const u64 ) + 0xa8 ) as * mut u64 ) = local_1a8;
2812 r1 = *((r9 + 0x30 ) as * const u64 );
2813 r4 = *((r1 + 8 ) as * const u64 );
2814 r2 = *((r4) as * const u64 ) + 1 ;
2820 r5 = *((r1) as * const u64 );
2821 *((r4) as * mut u64 ) = r2;
2823 r0 = *((r1 + 0x10 ) as * const u64 );
2824 r2 = *((r0) as * const u64 ) + 1 ;
2832 *((r0) as * mut u64 ) = r2;
2834 abort (); // abort the program ■ syscall
2836 local_1f0 = *((r1 + 0x2a ) as * const u8 );
2837 local_1e8 = *((r1 + 0x29 ) as * const u8 );
2838 local_1e0 = *((r1 + 0x28 ) as * const u8 );
2839 local_1d8 = *((r1 + 0x20 ) as * const u64 );
2840 local_1d0 = *((r1 + 0x18 ) as * const u64 );
2841 r1 = *((r9 + 8 ) as * const u64 );
2842 r2 = *((*((r1) as * const u64 )) as * const u64 );
2843 local_138_u64 = *((r2 + 0x18 ) as * const u64 );
2844 local_140 = *((r2 + 0x10 ) as * const u64 );
2845 local_148_u64 = *((r2 + 8 ) as * const u64 );
2846 local_150_u64 = *((r2) as * const u64 );
2847 r7 = *((r1 + 0x68 ) as * const u64 );
2848 local_28 = *((r1 + 0x10 ) as * const u64 );
2849 local_20 = *((r1 + 0x18 ) as * const u64 );
2850 local_18 = *((r1 + 0x20 ) as * const u64 );
2851 local_30 = *((r1 + 8 ) as * const u64 );
2852 r8 = *((r1 + 0xb2 ) as * const u8 );
2853 local_50 = *((r1 + 0xc3 ) as * const u64 );
2854 local_58 = *((r1 + 0xbb ) as * const u64 );
2855 local_60 = *((r1 + 0xb3 ) as * const u64 );
2856 local_48 = *((r1 + 0xcb ) as * const u64 );
2858 r1 = *(( 0x300000000 ) as * const u64 );
2869 if r9 <= 0x300000007 {
2870 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:60:1" )); ■ string · 32 B
2873 *(( 0x300000000 ) as * mut u64 ) = r9;
2874 *((r9) as * mut u64 ) = - 0x7d7658d778dfe61a ; // discriminator of event `Reclaimed`
2875 *((r9 + 8 ) as * mut u64 ) = local_150_u64;
2876 *((r9 + 0x10 ) as * mut u64 ) = local_148_u64;
2877 *((r9 + 0x18 ) as * mut u64 ) = local_140;
2878 *((r9 + 0x20 ) as * mut u64 ) = local_138_u64;
2879 *((r9 + 0x28 ) as * mut u64 ) = r7;
2880 *((r9 + 0x30 ) as * mut u64 ) = local_30;
2881 *((r9 + 0x38 ) as * mut u64 ) = local_28;
2882 *((r9 + 0x40 ) as * mut u64 ) = local_20;
2883 *((r9 + 0x48 ) as * mut u64 ) = local_18;
2888 *((r9 + 0x69 ) as * mut u64 ) = local_48;
2889 *((r9 + 0x61 ) as * mut u64 ) = local_50;
2890 *((r9 + 0x59 ) as * mut u64 ) = local_58;
2891 *((r9 + 0x51 ) as * mut u64 ) = local_60;
2895 *((r9 + 0x50 ) as * mut u8 ) = r2;
2897 *((r8 + 8 ) as * mut u64 ) = local_1a8;
2898 *((r8) as * mut u64 ) = local_1a0;
2900 if (r2 as i64 ) >= 0 {
2903 r1 = *(( 0x300000000 ) as * const u64 );
2917 if r0 <= 0x300000007 {
2918 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
2919 r0 = fn_67b18(r1, r2, r3);
2922 *(( 0x300000000 ) as * mut u64 ) = r0;
2923 *((r0) as * mut u64 ) = 0x1d9acb512ea545e4 ; // Anchor emit_cpi! event tag
2924 if (r8 + 0x10 ) == r9 {
2933 *((r1 + r8) as * mut u8 ) = *((r9 + r8) as * const u8 );
2945 r2 = *((r9) as * const u64 );
2957 if r1 < 0x300000008 {
2958 r0 = fn_67b38( 1 , 0x22 );
2961 *(( 0x300000000 ) as * mut u64 ) = r1;
2963 r2 = *((r7) as * const u64 );
2964 r0 = *((r7 + 8 ) as * const u64 );
2965 r4 = *((r7 + 0x10 ) as * const u64 );
2966 *((r1 + 0x18 ) as * mut u64 ) = *((r7 + 0x18 ) as * const u64 );
2967 *((r1 + 0x10 ) as * mut u64 ) = r4;
2968 *((r1 + 8 ) as * mut u64 ) = r0;
2969 *((r1) as * mut u64 ) = r2;
2970 *((r1 + 0x20 ) as * mut u16 ) = 1 ;
2974 r9 = &local_150_u64;
2975 r0 = fn_64088(r9, 0x7a3d5 , r3, r8, &local_30); // .rodata+0xfd5
2976 local_6 = local_1f0;
2977 local_7 = local_1e8;
2978 local_8 = local_1e0;
2979 local_10 = local_1d8;
2980 local_18 = local_1d0;
2981 local_20 = local_1c8;
2982 local_28 = local_1b8;
2984 local_1000 = 0x7e370 ; // .data.rel.ro+0x470
2986 r0 = invoke_signed (&local_168, r9, &local_30, 1 , fp);
2989 r0 = fn_5fbd0(&local_178, r2, local_164);
2997 r1 = *((r2) as * const u64 ) + - 1 ;
2998 *((r2) as * mut u64 ) = r1;
3000 r0 = fn_63ad8(&local_28);
3003 r2 = *((r1) as * const u64 ) + - 1 ;
3004 *((r1) as * mut u64 ) = r2;
3006 r0 = fn_63b28(&local_20);
3008 *((r6) as * mut u64 ) = r7;
3009 *((r6 + 8 ) as * mut u64 ) = r8;
3013 if r1 < 0x300000008 {
3014 r0 = fn_67b38( 1 , 0x22 );
3016 /* continues at L_4ec60; not expressible as structured Rust */ ● an edge Rust can't hold
3023 /* continues at L_4ec48; not expressible as structured Rust */ ● an edge Rust can't hold
3025 /* continues at L_4ee60; not expressible as structured Rust */ ● an edge Rust can't hold
3028 /* continues at L_4ee38; not expressible as structured Rust */ ● an edge Rust can't hold
3030 /* continues at L_4ec28; not expressible as structured Rust */ ● an edge Rust can't hold
3033 if r0 <= 0x300000007 {
3034 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
3035 r0 = fn_67b18(r1, r2, r3);
3037 /* continues at L_4eb00; not expressible as structured Rust */ ● an edge Rust can't hold
3040 /* continues at L_4eae0; not expressible as structured Rust */ ● an edge Rust can't hold
3042 /* continues at L_4eab0; not expressible as structured Rust */ ● an edge Rust can't hold
3044 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
3045 r0 = fn_67b18(r1, r2, r3);
3048 if r9 <= 0x300000007 {
3049 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:60:1" )); ■ string · 32 B
3051 /* continues at L_4e7f0; not expressible as structured Rust */ ● an edge Rust can't hold
3057 /* continues at L_4e7d8; not expressible as structured Rust */ ● an edge Rust can't hold
3059 /* continues at L_4e9e0; not expressible as structured Rust */ ● an edge Rust can't hold
3062 /* continues at L_4e9c0; not expressible as structured Rust */ ● an edge Rust can't hold
3064 /* continues at L_4e7c0; not expressible as structured Rust */ ● an edge Rust can't hold
3074 abort (); // abort the program ■ syscall
4830
OnceAlreadySet , // 6002
4831 #[msg ( "ONCE mint has not been set" )] ■ string · 26 B
4833 #[msg ( "Amounts and gate length must be positive" )] ■ string · 40 B
4834 InvalidValue , // 6004
4835 #[msg ( "Expiry must be in the future" )] ■ string · 28 B
4836 ExpiryNotFuture , // 6005
4837 #[msg ( "Call id must equal the next id" )] ■ string · 30 B
4839 #[msg ( "Unsupported token program" )] ■ string · 25 B
4840 UnsupportedTokenProgram , // 6007
4841 #[msg ( "An active transfer hook is not supported" )] ■ string · 40 B
4842 TransferHookActive , // 6008
4843 #[msg ( "Transfer fee mints are not supported" )] ■ string · 36 B
4844 TransferFeeMint , // 6009
4845 #[msg ( "Default token account state must be initialized" )] ■ string · 47 B
4846 DefaultStateFrozen , // 6010
4847 #[msg ( "Vault deposit does not equal the requested amount" )] ■ string · 49 B
4848 DepositMismatch , // 6011
4849 #[msg ( "Call is not open" )] ■ string · 16 B
4851 #[msg ( "Call is not held" )] ■ string · 16 B
4853 #[msg ( "Call has already settled" )] ■ string · 24 B
4854 AlreadySettled , // 6014
4855 #[msg ( "Public purchase is unavailable during the priority interval" )] ■ string · 59 B
4857 #[msg ( "Priority interval has ended" )] ■ string · 27 B
4859 #[msg ( "Call has expired" )] ■ string · 16 B
4861 #[msg ( "Call has not expired" )] ■ string · 20 B
4863 #[msg ( "Signer is not the writer" )] ■ string · 24 B
4865 #[msg ( "Signer is not the holder" )] ■ string · 24 B
4867 #[msg ( "Signer is not the locker" )] ■ string · 24 B
4869 #[msg ( "Lock release slot has not arrived" )] ■ string · 33 B
4870 LockNotReleased , // 6022
4871 #[msg ( "Vault holds less than the call lot" )] ■ string · 34 B
4873 #[msg ( "Incorrect mint" )] ■ string · 14 B
4875 #[msg ( "Checked arithmetic overflow" )] ■ string · 27 B
4879 // Account types (#[account]), by discriminator: Call, Config, Lock. Fields not recovered.
4880 // Events (#[event]), by discriminator: Bought, Cancelled, Exercised, Initialized, LockReturned, OnceSet, ParamsSet, Reclaimed, Written. Fields not recovered.