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_params ▾
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 ▸ 8 more #[derive(Accounts)] structs · lines 26–195
196
197 #[event_cpi ]
198 #[derive ( Accounts )]
199 pub struct SetParams <'info> { ◇ 2 accounts · order, types and checks inferred
200 pub admin : Signer <'info>,
201 #[account ( mut , seeds = [b "config" ], bump = /* stored */ , constraint = /* … */ @ CustomError :: NotAdmin )] ■ string · 6 B
202 pub config : Account <'info, Config >,
203 }
204
205 ▸ 1 more #[derive(Accounts)] struct · lines 205–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 }
3675 ▸ pub fn set_once (ctx: Context < SetOnce >) -> Result <()> { … 337 lines }
4014
4015 // discriminator 1beab2349302bb8d ● found in the code at .text+0x42268
4016 // arg layout: @0: u64, @8: u64
4017 // argument names are placeholders; offsets, sizes (hence types) inferred from the handler's data reads
4018 ▾ pub fn set_params (ctx: Context < SetParams >, arg_0 : u64 , arg_8 : u64 ) -> Result <()> { ● its sha256 matches the discriminator
4019 // ◇ The program's own handler (`set_params` in reconstructed.rs), register-level. Anchor's wrapper
4020 // (`set_params_handler`) loads the accounts, then calls it with r1 = where its Result is written,
4021 // r2 = &Context, r3..r4 = the arguments in order (larger ones by reference; more on the stack).
4022 // 43 stack slots (local_…) used below; declared in reconstructed.rs.
4023 r8 = r4;
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_params
· Discriminator 1beab2349302bb8d found at .text+0x42268. It equals the first 8 bytes of sha256("global:set_params").
■ Logs "Instruction: SetParams" on entry.
❝ No published IDL to confirm it.
Arguments · 16 B after the tag 0 tag 8 u64 16 u64
Accounts · 4 · ◇ inferred #0 admin s
#1 config w · Config
#2 event_authority
#3 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_params_try_accounts
● dispatch → set_params_handler · .text+0x43178
◇ its handler → set_params · .text+0x46368
4029 r0 = custom_error_name (&local_60, & InvalidValue ); // error 6004
4033 local_40 = 0x7dfc8 ; // .data.rel.ro+0xc8
4034 local_48 = &local_18;
4035 local_38 = 0xe0000020 ;
4036 r0 = custom_error_fmt (& InvalidValue , &local_48, r3, r4, r5); // error 6004
4038 r5 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/string.rs:2830:14" ); ■ string · 92 B
4039 r0 = fn_6f930( "a Display implementation returned an error unexpectedly" , 0x37 , &local_100, 0x7dff8 , r5); // .data.rel.ro+0xf8 ■ string · 55 B
4042 local_c0 = local_10;
4043 local_c8 = local_18;
4044 local_e0 = local_60;
4045 local_d8 = local_58;
4046 local_d0 = local_50;
4047 local_f8 = "programs/once/src/lib.rs" ; ■ string · 24 B
4048 local_68 = 0x1774 ; // error 6004 InvalidValue: "Amounts and gate length must be positive"
4050 local_e8 = 0x4c ; // error raised at programs/once/src/lib.rs:76
4053 r0 = fn_5fb40(&local_110, &local_100);
4057 *((r1 + 8 ) as * mut u64 ) = r6;
4058 *((r1) as * mut u64 ) = r9;
4061 r1 = *((r2 + 8 ) as * const u64 );
4062 *((*((r1 + 8 ) as * const u64 ) + 0x48 ) as * mut u64 ) = r7;
4063 *((*((r1 + 8 ) as * const u64 ) + 0x50 ) as * mut u64 ) = r8;
4064 r1 = *((r1 + 0x10 ) as * const u64 );
4065 r9 = *((r1 + 8 ) as * const u64 );
4066 r2 = *((r9) as * const u64 ) + 1 ;
4071 local_140 = *((r1) as * const u64 );
4072 *((r9) as * mut u64 ) = r2;
4074 r4 = *((r1 + 0x10 ) as * const u64 );
4075 r2 = *((r4) as * const u64 ) + 1 ;
4080 *((r4) as * mut u64 ) = r2;
4082 abort (); // abort the program ■ syscall
4085 local_170 = *((r1 + 0x2a ) as * const u8 );
4086 local_168 = *((r1 + 0x29 ) as * const u8 );
4087 local_160 = *((r1 + 0x28 ) as * const u8 );
4088 local_158 = *((r1 + 0x20 ) as * const u64 );
4089 local_150 = *((r1 + 0x18 ) as * const u64 );
4091 r1 = *(( 0x300000000 ) as * const u64 );
4103 if r9 <= 0x300000007 {
4104 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:15:1" )); ■ string · 32 B
4108 *((r6) as * mut u64 ) = r9;
4109 *((r9 + 0x10 ) as * mut u64 ) = r8;
4110 *((r9 + 8 ) as * mut u64 ) = r7;
4111 *((r9) as * mut u64 ) = - 0xa9db38703de90c7 ; // discriminator of event `ParamsSet`
4114 if (r7 as i64 ) >= 0 {
4116 r1 = *((r6) as * const u64 );
4129 if r7 <= 0x300000007 {
4130 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
4131 r0 = fn_67b18(r1, 0x20 , r3);
4135 *((r8) as * mut u64 ) = r7;
4136 *((r7) as * mut u64 ) = 0x1d9acb512ea545e4 ; // Anchor emit_cpi! event tag
4137 *((r7 + 8 ) as * mut u8 ) = *((r9) as * const u8 );
4138 *((r7 + 9 ) as * mut u8 ) = *((r9 + 1 ) as * const u8 );
4139 *((r7 + 0xa ) as * mut u8 ) = *((r9 + 2 ) as * const u8 );
4140 *((r7 + 0xb ) as * mut u8 ) = *((r9 + 3 ) as * const u8 );
4141 *((r7 + 0xc ) as * mut u8 ) = *((r9 + 4 ) as * const u8 );
4142 *((r7 + 0xd ) as * mut u8 ) = *((r9 + 5 ) as * const u8 );
4143 *((r7 + 0xe ) as * mut u8 ) = *((r9 + 6 ) as * const u8 );
4144 *((r7 + 0xf ) as * mut u8 ) = *((r9 + 7 ) as * const u8 );
4145 *((r7 + 0x10 ) as * mut u8 ) = *((r9 + 8 ) as * const u8 );
4146 *((r7 + 0x11 ) as * mut u8 ) = *((r9 + 9 ) as * const u8 );
4147 *((r7 + 0x12 ) as * mut u8 ) = *((r9 + 0xa ) as * const u8 );
4148 *((r7 + 0x13 ) as * mut u8 ) = *((r9 + 0xb ) as * const u8 );
4149 *((r7 + 0x14 ) as * mut u8 ) = *((r9 + 0xc ) as * const u8 );
4150 *((r7 + 0x15 ) as * mut u8 ) = *((r9 + 0xd ) as * const u8 );
4151 *((r7 + 0x16 ) as * mut u8 ) = *((r9 + 0xe ) as * const u8 );
4152 *((r7 + 0x17 ) as * mut u8 ) = *((r9 + 0xf ) as * const u8 );
4153 *((r7 + 0x18 ) as * mut u8 ) = *((r9 + 0x10 ) as * const u8 );
4154 *((r7 + 0x19 ) as * mut u8 ) = *((r9 + 0x11 ) as * const u8 );
4155 *((r7 + 0x1a ) as * mut u8 ) = *((r9 + 0x12 ) as * const u8 );
4156 *((r7 + 0x1b ) as * mut u8 ) = *((r9 + 0x13 ) as * const u8 );
4157 *((r7 + 0x1c ) as * mut u8 ) = *((r9 + 0x14 ) as * const u8 );
4158 *((r7 + 0x1d ) as * mut u8 ) = *((r9 + 0x15 ) as * const u8 );
4159 *((r7 + 0x1e ) as * mut u8 ) = *((r9 + 0x16 ) as * const u8 );
4160 *((r7 + 0x1f ) as * mut u8 ) = *((r9 + 0x17 ) as * const u8 );
4162 r2 = *((r8) as * const u64 );
4174 if r1 < 0x300000008 {
4175 r0 = fn_67b38( 1 , 0x22 );
4178 *(( 0x300000000 ) as * mut u64 ) = r1;
4180 r2 = *((r9) as * const u64 );
4181 r3 = *((r9 + 8 ) as * const u64 );
4182 r4 = *((r9 + 0x10 ) as * const u64 );
4183 *((r1 + 0x18 ) as * mut u64 ) = *((r9 + 0x18 ) as * const u64 );
4184 *((r1 + 0x10 ) as * mut u64 ) = r4;
4185 *((r1 + 8 ) as * mut u64 ) = r3;
4186 *((r1) as * mut u64 ) = r2;
4187 *((r1 + 0x20 ) as * mut u16 ) = 1 ;
4192 r0 = fn_64088(r8, 0x7a3d5 , r7, 0x20 , &local_48); // .rodata+0xfd5
4193 local_1e = local_170;
4194 local_1f = local_168;
4195 local_20 = local_160;
4196 local_28 = local_158;
4197 local_30 = local_150;
4198 local_38 = local_138;
4201 local_1000 = 0x7e370 ; // .data.rel.ro+0x470
4203 r0 = invoke_signed (&local_118, r8, &local_48, 1 , fp);
4208 r0 = fn_5fbd0(&local_128, r2, local_114);
4210 r2 = *((r1) as * const u64 ) + - 1 ;
4213 *((r1) as * mut u64 ) = r2;
4218 r2 = *((r1) as * const u64 ) + - 1 ;
4219 *((r1) as * mut u64 ) = r2;
4224 r1 = *((r6) as * const u64 ) + - 1 ;
4225 *((r6) as * mut u64 ) = r1;
4231 r1 = *((r2) as * const u64 ) + - 1 ;
4232 *((r2) as * mut u64 ) = r1;
4239 *((r1 + 8 ) as * mut u64 ) = r6;
4240 *((r1) as * mut u64 ) = r9;
4244 if r1 < 0x300000008 {
4245 r0 = fn_67b38( 1 , 0x22 );
4247 /* continues at L_46ac0; not expressible as structured Rust */ ● an edge Rust can't hold
4253 /* continues at L_46aa8; not expressible as structured Rust */ ● an edge Rust can't hold
4255 /* continues at L_46d48; not expressible as structured Rust */ ● an edge Rust can't hold
4259 /* continues at L_46d28; not expressible as structured Rust */ ● an edge Rust can't hold
4261 /* continues at L_46a90; not expressible as structured Rust */ ● an edge Rust can't hold
4264 if r7 <= 0x300000007 {
4265 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
4266 r0 = fn_67b18(r1, 0x20 , r3);
4268 /* continues at L_46898; not expressible as structured Rust */ ● an edge Rust can't hold
4271 /* continues at L_46878; not expressible as structured Rust */ ● an edge Rust can't hold
4273 /* continues at L_46848; not expressible as structured Rust */ ● an edge Rust can't hold
4275 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
4276 r0 = fn_67b18(r1, 0x20 , r3);
4279 if r9 <= 0x300000007 {
4280 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:15:1" )); ■ string · 32 B
4282 /* continues at L_46538; not expressible as structured Rust */ ● an edge Rust can't hold
4288 /* continues at L_46520; not expressible as structured Rust */ ● an edge Rust can't hold
4290 /* continues at L_46798; not expressible as structured Rust */ ● an edge Rust can't hold
4294 /* continues at L_46778; not expressible as structured Rust */ ● an edge Rust can't hold
4296 /* continues at L_46508; not expressible as structured Rust */ ● an edge Rust can't hold
4298 abort (); // abort the program ■ syscall
4300 /* continues at L_465b0; not expressible as structured Rust */ ● an edge Rust can't hold
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.