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…
once · revrsly
init ▾
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 ▸ 3 more #[derive(Accounts)] structs · lines 26–95
96
97 #[event_cpi ]
98 #[derive ( Accounts )]
99 pub struct Init <'info> { ◇ 6 accounts · order, types and checks inferred
100 #[account ( mut )]
101 pub authority : Signer <'info>,
102 #[account (constraint = /* … */ @ CustomError :: NotUpgradeAuthority )]
103 pub deployment : Program <'info, crate ::program:: Once >,
104 #[account (constraint = /* … */ @ CustomError :: NotUpgradeAuthority )]
105 pub program_data : Account <'info, ProgramData >,
106 // ◇ created here (init); its type is not recovered
107 #[account ( init , payer = /* … */ , seeds = [b "config" ], bump)] ■ string · 6 B
108 pub config : AccountInfo <'info>,
109 pub usdc_mint : InterfaceAccount <'info, Mint >,
110 pub system_program : Program <'info, System >,
111 }
112
113 ▸ 6 more #[derive(Accounts)] structs · lines 113–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 }
1746
1747 // discriminator dc3bcfec6cfa2f64 ● found in the code at .text+0x42228
1748 // arg layout: @0: Pubkey | [u8; 32], @32: u64, @40: u64
1749 // argument names are placeholders; offsets, sizes (hence types) inferred from the handler's data reads
1750 ▾ pub fn init (ctx: Context < Init >, arg_0 : Pubkey , arg_20 : u64 , arg_28 : u64 ) -> Result <()> { ● its sha256 matches the discriminator
1751 // ◇ The program's own handler (`init` in reconstructed.rs), register-level. Anchor's wrapper
1752 // (`init_handler`) loads the accounts, then calls it with r1 = where its Result is written,
1753 // r2 = &Context, r3..r5 = the arguments in order (larger ones by reference; more on the stack).
1754 // 46 stack slots (local_…) used below; declared in reconstructed.rs.
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 }
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 ×
· Discriminator dc3bcfec6cfa2f64 found at .text+0x42228. It equals the first 8 bytes of sha256("global:init").
■ Logs "Instruction: Init" on entry.
❝ No published IDL to confirm it.
Arguments · 48 B after the tag 0 tag 8 Pubkey 40 u64 48 u64
Accounts · 8 · ◇ inferred #0 authority s w
#1 deployment
#2 program_data
#3 config w
#4 usdc_mint Mint
#5 system_program
#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 init_try_accounts
● dispatch → init_handler · .text+0x427f0
◇ its handler → init · .text+0x44ae8
1755
r9 = r3;
1760 r0 = custom_error_name (&local_60, & InvalidValue ); // error 6004
1764 local_40 = 0x7dfc8 ; // .data.rel.ro+0xc8
1765 local_48 = &local_18;
1766 local_38 = 0xe0000020 ;
1767 r0 = custom_error_fmt (& InvalidValue , &local_48, r3, r4, r5); // error 6004
1769 r5 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/alloc/src/string.rs:2830:14" ); ■ string · 92 B
1770 r0 = fn_6f930( "a Display implementation returned an error unexpectedly" , 0x37 , &local_100, 0x7dff8 , r5); // .data.rel.ro+0xf8 ■ string · 55 B
1773 local_c0 = local_10;
1774 local_c8 = local_18;
1775 local_e0 = local_60;
1776 local_d8 = local_58;
1777 local_d0 = local_50;
1778 local_f8 = "programs/once/src/lib.rs" ; ■ string · 24 B
1779 local_68 = 0x1774 ; // error 6004 InvalidValue: "Amounts and gate length must be positive"
1781 local_e8_u32 = 0x26 ; // error raised at programs/once/src/lib.rs:38
1784 r0 = fn_5fb40(&local_110, &local_100);
1787 *((r8) as * mut u64 ) = r6;
1788 *((r8 + 8 ) as * mut u64 ) = r7;
1792 r6 = *((r2 + 8 ) as * const u64 );
1793 r8 = *((r6 + 0x18 ) as * const u64 );
1794 r1 = *((*((*((r6 + 0x20 ) as * const u64 ) + 0x58 ) as * const u64 )) as * const u64 );
1795 local_c8 = *((r1 + 0x18 ) as * const u64 );
1796 local_d0 = *((r1 + 0x10 ) as * const u64 );
1797 local_d8 = *((r1 + 8 ) as * const u64 );
1798 local_e0 = *((r1) as * const u64 );
1799 r7 = *((r2 + 0x20 ) as * const u8 );
1800 local_f8 = *((r9 + 8 ) as * const u64 );
1801 local_f0 = *((r9 + 0x10 ) as * const u64 );
1802 local_e8_u64 = *((r9 + 0x18 ) as * const u64 );
1803 local_100 = *((r9) as * const u64 );
1806 r0 = memcpy (r8 + 8 , &local_100, 0x40 );
1807 *((r8 + 0x50 ) as * mut u64 ) = local_138;
1808 *((r8 + 0x48 ) as * mut u64 ) = local_130;
1809 *((r8 + 0x68 ) as * mut u8 ) = r7;
1810 *((r8 + 0x58 ) as * mut u64 ) = 0 ;
1811 *((r8 + 0x60 ) as * mut u64 ) = 0 ;
1812 *((r8 + 0x8a ) as * mut u8 ) = 0 ;
1813 *((r8 + 0x69 ) as * mut u8 ) = 0 ;
1814 r1 = *((r6 + 0x30 ) as * const u64 );
1815 r4 = *((r1 + 8 ) as * const u64 );
1816 r2 = *((r4) as * const u64 ) + 1 ;
1821 r7 = *((r1) as * const u64 );
1822 *((r4) as * mut u64 ) = r2;
1824 r5 = *((r1 + 0x10 ) as * const u64 );
1825 r2 = *((r5) as * const u64 ) + 1 ;
1830 *((r5) as * mut u64 ) = r2;
1832 abort (); // abort the program ■ syscall
1836 local_180 = *((r1 + 0x2a ) as * const u8 );
1837 local_178 = *((r1 + 0x29 ) as * const u8 );
1838 local_170 = *((r1 + 0x28 ) as * const u8 );
1839 local_168 = *((r1 + 0x20 ) as * const u64 );
1840 local_160 = *((r1 + 0x18 ) as * const u64 );
1841 r1 = *((*((*((r6 + 0x20 ) as * const u64 ) + 0x58 ) as * const u64 )) as * const u64 );
1842 local_c8 = *((r1 + 0x18 ) as * const u64 );
1843 local_d0 = *((r1 + 0x10 ) as * const u64 );
1844 local_d8 = *((r1 + 8 ) as * const u64 );
1845 local_e0 = *((r1) as * const u64 );
1847 r1 = *(( 0x300000000 ) as * const u64 );
1861 if r6 <= 0x300000007 {
1862 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:3:1" )); ■ string · 31 B
1867 *((r8) as * mut u64 ) = r6;
1868 *((r6) as * mut u64 ) = - 0x2e36ad8c9d8c2a30 ; // discriminator of event `Initialized`
1869 *((r6 + 8 ) as * mut u64 ) = *((r9) as * const u64 );
1870 *((r6 + 0x10 ) as * mut u64 ) = *((r9 + 8 ) as * const u64 );
1871 *((r6 + 0x18 ) as * mut u64 ) = *((r9 + 0x10 ) as * const u64 );
1872 *((r6 + 0x20 ) as * mut u64 ) = *((r9 + 0x18 ) as * const u64 );
1873 *((r6 + 0x28 ) as * mut u64 ) = *((r1) as * const u64 );
1874 *((r6 + 0x30 ) as * mut u64 ) = *((r1 + 8 ) as * const u64 );
1875 *((r6 + 0x38 ) as * mut u64 ) = *((r1 + 0x10 ) as * const u64 );
1876 *((r6 + 0x40 ) as * mut u64 ) = *((r1 + 0x18 ) as * const u64 );
1877 *((r6 + 0x50 ) as * mut u64 ) = r0;
1878 *((r6 + 0x48 ) as * mut u64 ) = r5;
1881 if (r7 as i64 ) >= 0 {
1883 r1 = *((r8) as * const u64 );
1896 if r7 <= 0x300000007 {
1897 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
1898 r0 = fn_67b18(r1, 0x60 , r3);
1901 *(( 0x300000000 ) as * mut u64 ) = r7;
1902 *((r7) as * mut u64 ) = 0x1d9acb512ea545e4 ; // Anchor emit_cpi! event tag
1905 *((r7 + r1 + 8 ) as * mut u8 ) = *((r6 + r1) as * const u8 );
1913 r2 = *(( 0x300000000 ) as * const u64 );
1924 if r1 < 0x300000008 {
1925 r0 = fn_67b38( 1 , 0x22 );
1928 *(( 0x300000000 ) as * mut u64 ) = r1;
1930 r2 = *((r6) as * const u64 );
1931 r3 = *((r6 + 8 ) as * const u64 );
1932 r4 = *((r6 + 0x10 ) as * const u64 );
1933 *((r1 + 0x18 ) as * mut u64 ) = *((r6 + 0x18 ) as * const u64 );
1934 *((r1 + 0x10 ) as * mut u64 ) = r4;
1935 *((r1 + 8 ) as * mut u64 ) = r3;
1936 *((r1) as * mut u64 ) = r2;
1937 *((r1 + 0x20 ) as * mut u16 ) = 1 ;
1942 r0 = fn_64088(r8, 0x7a3d5 , r7, 0x60 , &local_48); // .rodata+0xfd5
1943 local_1e = local_180;
1944 local_1f = local_178;
1945 local_20 = local_170;
1946 local_28 = local_168;
1947 local_30 = local_160;
1948 local_38 = local_158;
1949 local_40 = local_140;
1951 local_1000 = 0x7e370 ; // .data.rel.ro+0x470
1953 r0 = invoke_signed (&local_118, r8, &local_48, 1 , fp);
1956 r0 = fn_5fbd0(&local_128, r2, local_114);
1966 r1 = *((r2) as * const u64 ) + - 1 ;
1967 *((r2) as * mut u64 ) = r1;
1969 r0 = fn_63ad8(&local_40);
1972 r2 = *((r1) as * const u64 ) + - 1 ;
1973 *((r1) as * mut u64 ) = r2;
1975 r0 = fn_63b28(&local_38);
1977 *((r8) as * mut u64 ) = r6;
1978 *((r8 + 8 ) as * mut u64 ) = r7;
1982 if r1 < 0x300000008 {
1983 r0 = fn_67b38( 1 , 0x22 );
1985 /* continues at L_45318; not expressible as structured Rust */ ● an edge Rust can't hold
1991 /* continues at L_45300; not expressible as structured Rust */ ● an edge Rust can't hold
1993 /* continues at L_45520; not expressible as structured Rust */ ● an edge Rust can't hold
1996 /* continues at L_45500; not expressible as structured Rust */ ● an edge Rust can't hold
1998 /* continues at L_452e8; not expressible as structured Rust */ ● an edge Rust can't hold
2001 if r7 <= 0x300000007 {
2002 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
2003 r0 = fn_67b18(r1, 0x60 , r3);
2005 /* continues at L_45220; not expressible as structured Rust */ ● an edge Rust can't hold
2008 /* continues at L_45200; not expressible as structured Rust */ ● an edge Rust can't hold
2010 /* continues at L_451d0; not expressible as structured Rust */ ● an edge Rust can't hold
2012 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
2013 r0 = fn_67b18(r1, 0x60 , r3);
2017 if r6 <= 0x300000007 {
2018 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:3:1" )); ■ string · 31 B
2020 /* continues at L_44e28; not expressible as structured Rust */ ● an edge Rust can't hold
2026 /* continues at L_44e08; not expressible as structured Rust */ ● an edge Rust can't hold
2028 /* continues at L_45118; not expressible as structured Rust */ ● an edge Rust can't hold
2033 /* continues at L_450f8; not expressible as structured Rust */ ● an edge Rust can't hold
2035 /* continues at L_44df0; not expressible as structured Rust */ ● an edge Rust can't hold
2037 abort (); // abort the program ■ syscall
2039 /* continues at L_44f30; 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.