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…
cancel ▾
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 ▸ 2 more #[derive(Accounts)] structs · lines 26–78
79
80 #[event_cpi ]
81 #[derive ( Accounts )]
82 pub struct Cancel <'info> { ◇ 6 accounts · order, types and checks inferred
83 #[account ( mut )]
84 pub writer : Signer <'info>,
85 #[account ( mut , seeds = [b "call" , /* 8 bytes */ ], bump = /* stored */ , constraint = /* … */ @ CustomError :: NotOpen , constraint = /* … */ @ CustomError :: NotWriter )] ■ string · 4 B
86 pub call : Account <'info, Call >,
87 #[account ( mut , seeds = [b "vault" , /* 32 bytes */ ], bump, token::mint = /* … */ , token::authority = /* … */ , token::token_program = /* … */ )] ■ string · 5 B
88 pub vault : InterfaceAccount <'info, TokenAccount >,
89 #[account (constraint = /* … */ @ CustomError :: UnsupportedTokenProgram , constraint = /* … */ @ CustomError :: WrongMint )]
90 pub mint : InterfaceAccount <'info, Mint >,
91 #[account (constraint = /* … */ @ CustomError :: UnsupportedTokenProgram )]
92 pub token_program : Interface <'info, TokenInterface >,
93 #[account ( mut , token::mint = /* … */ , token::authority = /* … */ , token::token_program = /* … */ )]
94 pub destination : InterfaceAccount <'info, TokenAccount >,
95 }
96
97 ▸ 7 more #[derive(Accounts)] structs · lines 97–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 }
1343
1344 // discriminator e8dbdf29dbecdcbe ● found in the code at .text+0x42308
1345 // args
1346 ▾ pub fn cancel (ctx: Context < Cancel >) -> Result <()> { ● its sha256 matches the discriminator
1347 // ◇ The program's own handler (`cancel` in reconstructed.rs), register-level. Anchor's wrapper
1348 // (`cancel_handler`) loads the accounts, then calls it with r1 = where its Result is written,
1349 // r2 = &Context. Calls to other fn_* are in reconstructed.rs.
1350 // 65 stack slots (local_…) used below; declared in reconstructed.rs.
1351 r3 = *((r2 + 8 ) as * const u64 );
1352 r7 = *((r3 + 8 ) as * const u64 );
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 }
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
cancel
· Discriminator e8dbdf29dbecdcbe found at .text+0x42308. It equals the first 8 bytes of sha256("global:cancel").
■ Logs "Instruction: Cancel" 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 cancel_try_accounts
● dispatch → cancel_handler · .text+0x43ec0
◇ its handler → cancel · .text+0x4cfa0
1353 r5 = *((r3 + 0x10 ) as * const u64 );
1354 r2 = *((r5 + 0x68 ) as * const u64 );
1356 r3 = *((*((r3 + 0x20 ) as * const u64 )) as * const u64 );
1357 local_e8 = *((r3 + 0x18 ) as * const u64 );
1358 local_f0 = *((r3 + 0x10 ) as * const u64 );
1359 local_f8 = *((r3 + 8 ) as * const u64 );
1360 local_100 = *((r3) as * const u64 );
1361 r3 = *((r5 + 0x20 ) as * const u64 );
1362 r8 = *((r3 + 8 ) as * const u64 );
1363 r5 = *((r8) as * const u64 ) + 1 ;
1368 r4 = *((r3) as * const u64 );
1369 *((r8) as * mut u64 ) = r5;
1371 r5 = *((r3 + 0x10 ) as * const u64 );
1372 r0 = *((r5) as * const u64 ) + 1 ;
1377 *((r5) as * mut u64 ) = r0;
1381 r0 = *((r3 + 0x18 ) as * const u64 );
1382 r6 = *((r3 + 0x20 ) as * const u64 );
1383 r9 = *((r3 + 0x28 ) as * const u8 );
1384 r7 = *((r3 + 0x29 ) as * const u8 );
1385 local_b6 = *((r3 + 0x2a ) as * const u8 );
1394 r3 = *((*((r8 + 0x18 ) as * const u64 ) + 0x58 ) as * const u64 );
1395 r1 = *((r3 + 8 ) as * const u64 );
1396 r5 = *((r1) as * const u64 ) + 1 ;
1401 r4 = *((r3) as * const u64 );
1402 *((r1) as * mut u64 ) = r5;
1404 r5 = *((r3 + 0x10 ) as * const u64 );
1405 r0 = *((r5) as * const u64 ) + 1 ;
1410 *((r5) as * mut u64 ) = r0;
1412 r0 = *((r3 + 0x18 ) as * const u64 );
1413 r6 = *((r3 + 0x20 ) as * const u64 );
1414 r7 = *((r3 + 0x28 ) as * const u8 );
1415 r9 = *((r3 + 0x29 ) as * const u8 );
1416 local_86 = *((r3 + 0x2a ) as * const u8 );
1424 r3 = *((*((r8 + 0x28 ) as * const u64 ) + 0x20 ) as * const u64 );
1425 r1 = *((r3 + 8 ) as * const u64 );
1426 r5 = *((r1) as * const u64 ) + 1 ;
1431 r4 = *((r3) as * const u64 );
1432 *((r1) as * mut u64 ) = r5;
1434 r5 = *((r3 + 0x10 ) as * const u64 );
1435 r0 = *((r5) as * const u64 ) + 1 ;
1440 *((r5) as * mut u64 ) = r0;
1442 r0 = *((r3 + 0x18 ) as * const u64 );
1443 r6 = *((r3 + 0x20 ) as * const u64 );
1444 r7 = *((r3 + 0x28 ) as * const u8 );
1445 r9 = *((r3 + 0x29 ) as * const u8 );
1446 local_6 = *((r3 + 0x2a ) as * const u8 );
1454 r3 = *((r8) as * const u64 );
1455 r1 = *((r3 + 8 ) as * const u64 );
1456 r5 = *((r1) as * const u64 ) + 1 ;
1461 r4 = *((r3) as * const u64 );
1462 *((r1) as * mut u64 ) = r5;
1464 r5 = *((r3 + 0x10 ) as * const u64 );
1465 r0 = *((r5) as * const u64 ) + 1 ;
1470 *((r5) as * mut u64 ) = r0;
1472 r0 = *((r3 + 0x18 ) as * const u64 );
1473 r6 = *((r3 + 0x20 ) as * const u64 );
1474 r7 = *((r3 + 0x28 ) as * const u8 );
1475 r9 = *((r3 + 0x29 ) as * const u8 );
1476 local_56 = *((r3 + 0x2a ) as * const u8 );
1484 local_fe0 = *((*((r8 + 0x18 ) as * const u64 ) + 0x30 ) as * const u8 );
1487 local_ff0 = &local_80_u64;
1488 local_ff8 = &local_30;
1489 local_1000 = &local_b0;
1490 r0 = fn_d4b0(&local_110, local_148, &local_100, &local_e0, fp);
1495 *((r1) as * mut u64 ) = r9;
1496 *((r1 + 8 ) as * mut u64 ) = r7;
1499 *((*((r8 + 8 ) as * const u64 ) + 0xb1 ) as * mut u8 ) = 4 ;
1500 r0 = clock_get (&local_80_u64);
1501 if local_80_u32 == 1 {
1502 r0 = fn_5fbd0(&local_138, local_7c, local_78_u32);
1506 *((r1) as * mut u64 ) = r9;
1507 *((r1 + 8 ) as * mut u64 ) = r7;
1510 *((*((r8 + 8 ) as * const u64 ) + 0xa8 ) as * mut u64 ) = local_78_u64;
1511 r1 = *((r8 + 0x30 ) as * const u64 );
1512 r4 = *((r1 + 8 ) as * const u64 );
1513 r2 = *((r4) as * const u64 ) + 1 ;
1518 r5 = *((r1) as * const u64 );
1519 *((r4) as * mut u64 ) = r2;
1521 r0 = *((r1 + 0x10 ) as * const u64 );
1522 r2 = *((r0) as * const u64 ) + 1 ;
1527 *((r0) as * mut u64 ) = r2;
1529 abort (); // abort the program ■ syscall
1534 local_188 = *((r1 + 0x2a ) as * const u8 );
1535 local_180 = *((r1 + 0x29 ) as * const u8 );
1536 local_178 = *((r1 + 0x28 ) as * const u8 );
1537 local_170 = *((r1 + 0x20 ) as * const u64 );
1538 local_168 = *((r1 + 0x18 ) as * const u64 );
1539 r1 = *((r8 + 8 ) as * const u64 );
1540 r2 = *((*((r1) as * const u64 )) as * const u64 );
1541 local_68 = *((r2 + 0x18 ) as * const u64 );
1542 local_70 = *((r2 + 0x10 ) as * const u64 );
1543 local_78_u64 = *((r2 + 8 ) as * const u64 );
1544 local_80_u64 = *((r2) as * const u64 );
1545 r9 = *((r1 + 0x68 ) as * const u64 );
1546 local_58_u64 = *((r1 + 0x10 ) as * const u64 );
1547 local_50 = *((r1 + 0x18 ) as * const u64 );
1548 local_48 = *((r1 + 0x20 ) as * const u64 );
1549 local_60 = *((r1 + 8 ) as * const u64 );
1550 r6 = *((r1 + 0xa8 ) as * const u64 );
1552 r1 = *(( 0x300000000 ) as * const u64 );
1563 if r8 <= 0x300000007 {
1564 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:52:1" )); ■ string · 32 B
1568 *(( 0x300000000 ) as * mut u64 ) = r8;
1569 *((r8) as * mut u64 ) = 0x2eeae98f412a1788 ; // discriminator of event `Cancelled`
1570 *((r8 + 8 ) as * mut u64 ) = local_80_u64;
1571 *((r8 + 0x10 ) as * mut u64 ) = local_78_u64;
1572 *((r8 + 0x18 ) as * mut u64 ) = local_70;
1573 *((r8 + 0x20 ) as * mut u64 ) = local_68;
1574 *((r8 + 0x28 ) as * mut u64 ) = r9;
1575 *((r8 + 0x30 ) as * mut u64 ) = *((r1) as * const u64 );
1576 *((r8 + 0x38 ) as * mut u64 ) = *((r1 + 8 ) as * const u64 );
1577 *((r8 + 0x40 ) as * mut u64 ) = *((r1 + 0x10 ) as * const u64 );
1578 *((r8 + 0x48 ) as * mut u64 ) = *((r1 + 0x18 ) as * const u64 );
1579 *((r8 + 0x58 ) as * mut u64 ) = r6;
1580 *((r8 + 0x50 ) as * mut u64 ) = r7;
1583 if (r6 as i64 ) >= 0 {
1586 r1 = *((r7) as * const u64 );
1599 if r7 <= 0x300000007 {
1600 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
1601 r0 = fn_67b18(r1, 0x68 , r3);
1604 *(( 0x300000000 ) as * mut u64 ) = r7;
1605 *((r7) as * mut u64 ) = 0x1d9acb512ea545e4 ; // Anchor emit_cpi! event tag
1608 *((r7 + r1 + 8 ) as * mut u8 ) = *((r8 + r1) as * const u8 );
1616 r2 = *(( 0x300000000 ) as * const u64 );
1628 if r1 < 0x300000008 {
1629 r0 = fn_67b38( 1 , 0x22 );
1632 *(( 0x300000000 ) as * mut u64 ) = r1;
1634 r2 = *((r9) as * const u64 );
1635 r3 = *((r9 + 8 ) as * const u64 );
1636 r4 = *((r9 + 0x10 ) as * const u64 );
1637 *((r1 + 0x18 ) as * mut u64 ) = *((r9 + 0x18 ) as * const u64 );
1638 *((r1 + 0x10 ) as * mut u64 ) = r4;
1639 *((r1 + 8 ) as * mut u64 ) = r3;
1640 *((r1) as * mut u64 ) = r2;
1641 *((r1 + 0x20 ) as * mut u16 ) = 1 ;
1646 r0 = fn_64088(r8, 0x7a3d5 , r7, 0x68 , &local_30); // .rodata+0xfd5
1647 local_6 = local_188;
1648 local_7 = local_180;
1649 local_8 = local_178;
1650 local_10 = local_170;
1651 local_18 = local_168;
1652 local_20 = local_160;
1655 local_1000 = 0x7e370 ; // .data.rel.ro+0x470
1657 r0 = invoke_signed (&local_118, r8, &local_30, 1 , fp);
1660 r0 = fn_5fbd0(&local_128, r2, local_114);
1667 r1 = *((r6) as * const u64 ) + - 1 ;
1668 *((r6) as * mut u64 ) = r1;
1670 r0 = fn_63ad8(&local_28);
1673 r2 = *((r1) as * const u64 ) + - 1 ;
1674 *((r1) as * mut u64 ) = r2;
1676 r0 = fn_63b28(&local_20);
1679 *((r1) as * mut u64 ) = r9;
1680 *((r1 + 8 ) as * mut u64 ) = r7;
1684 if r1 < 0x300000008 {
1685 r0 = fn_67b38( 1 , 0x22 );
1687 /* continues at L_4db10; not expressible as structured Rust */ ● an edge Rust can't hold
1693 /* continues at L_4daf8; not expressible as structured Rust */ ● an edge Rust can't hold
1695 /* continues at L_4dd00; not expressible as structured Rust */ ● an edge Rust can't hold
1698 /* continues at L_4dce0; not expressible as structured Rust */ ● an edge Rust can't hold
1700 /* continues at L_4dae0; not expressible as structured Rust */ ● an edge Rust can't hold
1703 if r7 <= 0x300000007 {
1704 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
1705 r0 = fn_67b18(r1, 0x68 , r3);
1707 /* continues at L_4da10; not expressible as structured Rust */ ● an edge Rust can't hold
1710 /* continues at L_4d9f0; not expressible as structured Rust */ ● an edge Rust can't hold
1712 /* continues at L_4d9c0; not expressible as structured Rust */ ● an edge Rust can't hold
1714 r3 = & Location ( "/home/runner/work/platform-tools/platform-tools/out/rust/library/core/src/iter/traits/iterator.rs:2027:9" ); ■ string · 104 B
1715 r0 = fn_67b18(r1, 0x68 , r3);
1718 if r8 <= 0x300000007 {
1719 r0 = fn_67b18( 1 , 0x100 , & Location ( "programs/once/src/events.rs:52:1" )); ■ string · 32 B
1721 /* continues at L_4d7c0; not expressible as structured Rust */ ● an edge Rust can't hold
1727 /* continues at L_4d7a8; not expressible as structured Rust */ ● an edge Rust can't hold
1729 /* continues at L_4d900; not expressible as structured Rust */ ● an edge Rust can't hold
1732 /* continues at L_4d8e0; not expressible as structured Rust */ ● an edge Rust can't hold
1734 /* continues at L_4d790; not expressible as structured Rust */ ● an edge Rust can't hold
1744 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.