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…
set_once ▾
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 ▸ 7 more #[derive(Accounts)] structs · lines 26–184
185
186 #[event_cpi ]
187 #[derive ( Accounts )]
188 pub struct SetOnce <'info> { ◇ 4 accounts · order, types and checks inferred
189 #[account ( mut )]
190 pub admin : Signer <'info>,
191 #[account ( mut , seeds = [b "config" ], bump = /* stored */ , realloc = /* … */ , constraint = /* … */ @ CustomError :: NotAdmin , constraint = /* … */ @ CustomError :: OnceAlreadySet )] ■ string · 6 B
192 pub config : Account <'info, Config >,
193 pub once_mint : InterfaceAccount <'info, Mint >,
194 pub system_program : Program <'info, System >,
195 }
196
197 ▸ 2 more #[derive(Accounts)] structs · lines 197–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 }
2617 ▸ pub fn reclaim (ctx: Context < Reclaim >) -> Result <()> { … 457 lines }
3079 ▸ pub fn return_lock (ctx: Context < ReturnLock >) -> Result <()> { … 591 lines }
3672
3673 // discriminator d01563c5fa7e3397 ● found in the code at .text+0x42248
3674 // args
3675 ▾ pub fn set_once (ctx: Context < SetOnce >) -> Result <()> { ● its sha256 matches the discriminator
3676 // ◇ The program's own handler (`set_once` in reconstructed.rs), register-level. Anchor's wrapper
3677 // (`set_once_handler`) loads the accounts, then calls it with r1 = where its Result is written,
3678 // r2 = &Context. Calls to other fn_* are in reconstructed.rs.
3679 // 60 stack slots (local_…) used below; declared in reconstructed.rs.
3680 r6 = r1;
3681 r7 = *((r2 + 8 ) as * const u64 );
3682 r4 = *((*((r7 + 0x10 )
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
set_once
· Discriminator d01563c5fa7e3397 found at .text+0x42248. It equals the first 8 bytes of sha256("global:set_once").
■ Logs "Instruction: SetOnce" on entry.
❝ No published IDL to confirm it.
Arguments · none read 0 tag
Accounts · 6 · ◇ inferred #0 admin s w
#1 config w · Config
#2 once_mint Mint
#3 system_program
#4 event_authority
#5 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 set_once_try_accounts
● dispatch → set_once_handler · .text+0x42bd8
◇ its handler → set_once · .text+0x45670
as
*
const
u64
) +
0x58
)
as
*
const
u64
);
3683 r2 = *((r4) as * const u64 );
3684 local_130 = *((r2 + 0x18 ) as * const u64 );
3685 local_138 = *((r2 + 0x10 ) as * const u64 );
3686 local_140 = *((r2 + 8 ) as * const u64 );
3687 local_148 = *((r2) as * const u64 );
3688 r1 = *((r4 + 8 ) as * const u64 );
3689 r3 = *((r1) as * const u64 ) + 1 ;
3694 *((r1) as * mut u64 ) = r3;
3696 r3 = *((r4 + 0x10 ) as * const u64 );
3697 r5 = *((r3) as * const u64 ) + 1 ;
3702 *((r3) as * mut u64 ) = r5;
3704 r5 = *((r4 + 0x18 ) as * const u64 );
3705 r0 = *((r4 + 0x20 ) as * const u64 );
3706 r8 = *((r4 + 0x28 ) as * const u8 );
3707 r9 = *((r4 + 0x29 ) as * const u8 );
3708 local_a6 = *((r4 + 0x2a ) as * const u8 );
3716 local_128 = *((r5) as * const u64 );
3717 local_120 = *((r5 + 8 ) as * const u64 );
3718 local_118 = *((r5 + 0x10 ) as * const u64 );
3719 local_110 = *((r5 + 0x18 ) as * const u64 );
3720 r2 = *((r1) as * const u64 ) + - 1 ;
3721 *((r1) as * mut u64 ) = r2;
3723 r0 = fn_63ad8(&local_c8_u64);
3725 r1 = *((r3) as * const u64 ) + - 1 ;
3726 *((r3) as * mut u64 ) = r1;
3729 r0 = fn_63b28(&local_c0);
3732 r1 = *((r3) as * const u64 ) + - 1 ;
3733 *((r3) as * mut u64 ) = r1;
3735 /* continues at L_45ab8; not expressible as structured Rust */ ● an edge Rust can't hold
3738 r0 = clock_get (&local_d0_u64);
3739 if local_d0_u32 == 1 {
3740 r0 = fn_5fbd0(&local_180, local_cc, local_c8_u32);
3743 *((r6) as * mut u64 ) = r8;
3744 *((r6 + 8 ) as * mut u64 ) = r7;
3748 r2 = *((r7 + 8 ) as * const u64 );
3749 r3 = *((r2 + 0x48 ) as * const u64 );
3751 if (r1 + r3) >= r1 {
3757 r0 = custom_error_name (&local_30, r7);
3761 local_100 = 0x7dfc8 ; // .data.rel.ro+0xc8
3762 local_108 = &local_18;
3763 local_f8 = 0xe0000020 ;
3764 r0 = custom_error_fmt (r7, &local_108, r3, r4, r5);
3766 r5 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/string.rs:2830:14" ); ■ string · 92 B
3767 r0 = fn_6f930( "a Display implementation returned an error unexpectedly" , 0x37 , &local_d0_u64, 0x7dff8 , r5); // .data.rel.ro+0xf8 ■ string · 55 B
3770 local_90 = local_10;
3771 local_98 = local_18;
3772 local_b0 = local_30;
3773 local_a8_u64 = local_28;
3774 local_a0 = local_20;
3775 local_38 = 0x1789 ; // error 6025 Overflow: "Checked arithmetic overflow"
3778 r0 = fn_5fb40(&local_170, &local_d0_u64);
3781 *((r6) as * mut u64 ) = r8;
3782 *((r6 + 8 ) as * mut u64 ) = r7;
3785 *((r2 + 0x60 ) as * mut u64 ) = r3 + r1;
3786 r1 = *((r7 + 8 ) as * const u64 );
3787 *((r1 + 0x69 ) as * mut u8 ) = 1 ;
3788 *((r1 + 0x6a ) as * mut u64 ) = local_148;
3789 *((r1 + 0x72 ) as * mut u64 ) = local_140;
3790 *((r1 + 0x7a ) as * mut u64 ) = local_138;
3791 *((r1 + 0x82 ) as * mut u64 ) = local_130;
3792 r1 = *((r7 + 8 ) as * const u64 );
3793 *((r1 + 0x8a ) as * mut u8 ) = 1 ;
3794 *((r1 + 0xa3 ) as * mut u64 ) = local_110;
3795 *((r1 + 0x9b ) as * mut u64 ) = local_118;
3796 *((r1 + 0x93 ) as * mut u64 ) = local_120;
3797 *((r1 + 0x8b ) as * mut u64 ) = local_128;
3798 r1 = *((r7 + 0x20 ) as * const u64 );
3799 r7 = *((r1 + 8 ) as * const u64 );
3800 r2 = *((r7) as * const u64 ) + 1 ;
3805 r8 = *((r1) as * const u64 );
3806 *((r7) as * mut u64 ) = r2;
3808 r4 = *((r1 + 0x10 ) as * const u64 );
3809 r2 = *((r4) as * const u64 ) + 1 ;
3814 *((r4) as * mut u64 ) = r2;
3816 abort (); // abort the program ■ syscall
3819 local_1c0 = *((r1 + 0x2a ) as * const u8 );
3820 local_1b8 = *((r1 + 0x29 ) as * const u8 );
3821 local_1b0 = *((r1 + 0x28 ) as * const u8 );
3822 local_1a8 = *((r1 + 0x20 ) as * const u64 );
3823 local_1a0 = *((r1 + 0x18 ) as * const u64 );
3825 r1 = *(( 0x300000000 ) as * const u64 );
3838 if r9 <= 0x300000007 {
3839 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:10:1" )); ■ string · 32 B
3843 *((r7) as * mut u64 ) = r9;
3844 *((r9) as * mut u64 ) = 0x3e5c34fa631f06ff ; // discriminator of event `OnceSet`
3845 *((r9 + 8 ) as * mut u64 ) = local_148;
3846 *((r9 + 0x10 ) as * mut u64 ) = local_140;
3847 *((r9 + 0x18 ) as * mut u64 ) = local_138;
3848 *((r9 + 0x20 ) as * mut u64 ) = local_130;
3849 *((r9 + 0x28 ) as * mut u64 ) = local_128;
3850 *((r9 + 0x30 ) as * mut u64 ) = local_120;
3851 *((r9 + 0x38 ) as * mut u64 ) = local_118;
3852 *((r9 + 0x40 ) as * mut u64 ) = local_110;
3855 if (r8 as i64 ) >= 0 {
3857 r1 = *((r7) as * const u64 );
3870 if r7 <= 0x300000007 {
3871 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
3872 r0 = fn_67b18(r1, 0x50 , r3);
3875 *(( 0x300000000 ) as * mut u64 ) = r7;
3876 *((r7) as * mut u64 ) = 0x1d9acb512ea545e4 ; // Anchor emit_cpi! event tag
3879 *((r7 + r1 + 8 ) as * mut u8 ) = *((r9 + r1) as * const u8 );
3887 r2 = *(( 0x300000000 ) as * const u64 );
3899 if r1 < 0x300000008 {
3900 r0 = fn_67b38( 1 , 0x22 );
3903 *(( 0x300000000 ) as * mut u64 ) = r1;
3905 r2 = *((r8) as * const u64 );
3906 r3 = *((r8 + 8 ) as * const u64 );
3907 r4 = *((r8 + 0x10 ) as * const u64 );
3908 *((r1 + 0x18 ) as * mut u64 ) = *((r8 + 0x18 ) as * const u64 );
3909 *((r1 + 0x10 ) as * mut u64 ) = r4;
3910 *((r1 + 8 ) as * mut u64 ) = r3;
3911 *((r1) as * mut u64 ) = r2;
3912 *((r1 + 0x20 ) as * mut u16 ) = 1 ;
3918 r0 = fn_64088(r1, 0x7a3d5 , r7, 0x50 , &local_108); // .rodata+0xfd5
3919 local_de = local_1c0;
3920 local_df = local_1b8;
3921 local_e0 = local_1b0;
3922 local_e8 = local_1a8;
3923 local_f0 = local_1a0;
3924 local_f8 = local_198;
3927 local_1000 = 0x7e370 ; // .data.rel.ro+0x470
3929 r0 = invoke_signed (&local_150, local_1c8, &local_108, 1 , fp);
3932 r0 = fn_5fbd0(&local_160, r2, local_14c);
3939 r1 = *((r9) as * const u64 ) + - 1 ;
3940 *((r9) as * mut u64 ) = r1;
3942 r0 = fn_63ad8(&local_100);
3945 r2 = *((r1) as * const u64 ) + - 1 ;
3946 *((r1) as * mut u64 ) = r2;
3948 r0 = fn_63b28(&local_f8);
3950 *((r6) as * mut u64 ) = r8;
3951 *((r6 + 8 ) as * mut u64 ) = r7;
3955 if r1 < 0x300000008 {
3956 r0 = fn_67b38( 1 , 0x22 );
3958 /* continues at L_46028; not expressible as structured Rust */ ● an edge Rust can't hold
3964 /* continues at L_46010; not expressible as structured Rust */ ● an edge Rust can't hold
3966 /* continues at L_46220; not expressible as structured Rust */ ● an edge Rust can't hold
3970 /* continues at L_46200; not expressible as structured Rust */ ● an edge Rust can't hold
3972 /* continues at L_45ff8; not expressible as structured Rust */ ● an edge Rust can't hold
3975 if r7 <= 0x300000007 {
3976 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
3977 r0 = fn_67b18(r1, 0x50 , r3);
3979 /* continues at L_45f28; not expressible as structured Rust */ ● an edge Rust can't hold
3982 /* continues at L_45f08; not expressible as structured Rust */ ● an edge Rust can't hold
3984 /* continues at L_45ed8; not expressible as structured Rust */ ● an edge Rust can't hold
3986 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
3987 r0 = fn_67b18(r1, 0x50 , r3);
3990 if r9 <= 0x300000007 {
3991 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:10:1" )); ■ string · 32 B
3993 /* continues at L_45d00; not expressible as structured Rust */ ● an edge Rust can't hold
3999 /* continues at L_45ce8; not expressible as structured Rust */ ● an edge Rust can't hold
4001 /* continues at L_45e28; not expressible as structured Rust */ ● an edge Rust can't hold
4006 /* continues at L_45e08; not expressible as structured Rust */ ● an edge Rust can't hold
4008 /* continues at L_45cd0; not expressible as structured Rust */ ● an edge Rust can't hold
4012 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.