IDL
The Anchor IDL lives in the repository at idl/firefly.json (16 instructions). It is published with the program when the program is deployed; the program address is not yet deployed. This page is generated from that file.
#init_config
Admin, once. Creates the config and the platform Quantum Vault from its first WOTS commitment.
| Argument |
Type |
platform_commitment |
[u8; 32] |
| Account |
Writable |
Signer |
admin |
yes |
yes |
config |
yes |
|
platform_vault |
yes |
|
program |
|
|
program_data |
|
|
system_program |
|
|
#update_config
Admin. Changes defaults for future launches or pauses new launches. Cannot move funds.
| Argument |
Type |
update |
ConfigUpdate |
| Account |
Writable |
Signer |
admin |
|
yes |
config |
yes |
|
#set_quote_asset
Admin. Enables a quote asset and sets its phantom reserve and launch fee for future launches.
| Argument |
Type |
phantom_reserve |
u64 |
launch_fee |
u64 |
enabled |
bool |
| Account |
Writable |
Signer |
admin |
yes |
yes |
config |
|
|
mint |
|
|
quote_asset |
yes |
|
system_program |
|
|
#set_pool_config
Admin. Chooses the Raydium CPMM fee tier for future launches; must be owned by a known CPMM deployment.
| Account |
Writable |
Signer |
admin |
|
yes |
config |
yes |
|
pool_config |
|
|
#launch_token
Creator. Creates the mint and launch, revokes all authorities, optional dev buy.
| Argument |
Type |
args |
LaunchArgs |
| Account |
Writable |
Signer |
creator |
yes |
yes |
config |
yes |
|
quote_asset |
|
|
quote_mint |
|
|
mint |
yes |
|
launch |
yes |
|
curve_tokens |
yes |
|
reserve |
yes |
|
fees |
yes |
|
creator_quote |
yes |
|
creator_tokens |
yes |
|
platform_quote |
yes |
|
token_program |
|
|
quote_token_program |
|
|
associated_token_program |
|
|
system_program |
|
|
#buy
Anyone. Buys on the curve. The crossing buy is capped and closes the curve.
| Argument |
Type |
quote_in |
u64 |
min_tokens_out |
u64 |
| Account |
Writable |
Signer |
trader |
yes |
yes |
launch |
yes |
|
mint |
|
|
quote_mint |
|
|
curve_tokens |
yes |
|
reserve |
yes |
|
fees |
yes |
|
trader_quote |
yes |
|
trader_tokens |
yes |
|
token_program |
|
|
quote_token_program |
|
|
associated_token_program |
|
|
system_program |
|
|
#sell
Anyone. Sells to the curve while it is not complete.
| Argument |
Type |
tokens_in |
u64 |
min_quote_out |
u64 |
| Account |
Writable |
Signer |
trader |
yes |
yes |
launch |
yes |
|
mint |
|
|
quote_mint |
|
|
curve_tokens |
yes |
|
reserve |
yes |
|
fees |
yes |
|
trader_quote |
yes |
|
trader_tokens |
yes |
|
token_program |
|
|
quote_token_program |
|
|
associated_token_program |
|
|
system_program |
|
|
#seed_pool
Anyone. Creates the Raydium CPMM pool at ["pool", mint], burns the unsold supply and every LP token.
| Argument |
Type |
funding |
u64 |
| Account |
Writable |
Signer |
payer |
yes |
yes |
launch |
yes |
|
mint |
yes |
|
quote_mint |
|
|
curve_tokens |
yes |
|
reserve |
yes |
|
grad |
yes |
|
grad_tokens |
yes |
|
grad_quote |
yes |
|
grad_lp |
yes |
|
amm_program |
|
|
amm_config |
|
|
amm_authority |
|
|
pool_state |
yes |
|
lp_mint |
yes |
|
token_0_vault |
yes |
|
token_1_vault |
yes |
|
create_pool_fee |
yes |
|
observation_state |
yes |
|
token_program |
|
|
token_2022_program |
|
|
quote_token_program |
|
|
associated_token_program |
|
|
system_program |
|
|
#rescue
Anyone, 30 days after graduation if no pool exists. Burns the unsold supply; phase becomes Rescued.
| Account |
Writable |
Signer |
launch |
yes |
|
mint |
yes |
|
curve_tokens |
yes |
|
token_program |
|
|
#redeem
Holder, phase Rescued. Burns tokens for quote_reserve × tokens_in ÷ sold (floor).
| Argument |
Type |
tokens_in |
u64 |
| Account |
Writable |
Signer |
holder |
|
yes |
launch |
yes |
|
mint |
yes |
|
quote_mint |
|
|
reserve |
yes |
|
holder_tokens |
yes |
|
destination |
yes |
|
token_program |
|
|
quote_token_program |
|
|
#sweep_pool_fees
Anyone, after graduation. Moves the pool creator fee into the launch fee account, split 30/70.
| Account |
Writable |
Signer |
payer |
yes |
yes |
launch |
yes |
|
mint |
yes |
|
quote_mint |
|
|
grad |
|
|
grad_tokens |
yes |
|
grad_quote |
yes |
|
fees |
yes |
|
token_program |
|
|
quote_token_program |
|
|
#claim_creator_fees
Anyone. Pushes a launch's creator fees to its fixed fee recipient.
| Account |
Writable |
Signer |
launch |
yes |
|
quote_mint |
|
|
fees |
yes |
|
recipient_quote |
yes |
|
quote_token_program |
|
|
Anyone. Pushes a launch's platform fees to the platform Quantum Vault.
| Account |
Writable |
Signer |
config |
|
|
launch |
yes |
|
quote_mint |
|
|
fees |
yes |
|
platform_quote |
yes |
|
quote_token_program |
|
|
#vault_open
Anyone. Opens a Quantum Vault for a commitment.
| Argument |
Type |
commitment |
[u8; 32] |
| Account |
Writable |
Signer |
payer |
yes |
yes |
vault |
yes |
|
system_program |
|
|
#vault_withdraw
Anyone holding a valid WOTS signature. Withdraws SPL tokens and rotates the key.
| Argument |
Type |
amount |
u64 |
next_commitment |
[u8; 32] |
salt |
u32 |
signature |
bytes |
| Account |
Writable |
Signer |
vault |
yes |
|
mint |
|
|
vault_tokens |
yes |
|
destination |
yes |
|
token_program |
|
|
#vault_withdraw_sol
Anyone holding a valid WOTS signature. Withdraws SOL and rotates the key.
| Argument |
Type |
amount |
u64 |
next_commitment |
[u8; 32] |
salt |
u32 |
signature |
bytes |
| Account |
Writable |
Signer |
vault |
yes |
|
destination |
yes |
|
#Types
#LaunchArgs
| Field |
Type |
Notes |
salt |
[u8; 16] |
Free 16 bytes that make the mint address unique: mint = PDA["mint", creator, salt]. |
name |
string |
|
symbol |
string |
|
uri |
string |
Off-chain JSON (image and socials) in the usual token-metadata shape. |
description |
string |
Stored on-chain in the mint's metadata. |
x |
string |
|
telegram |
string |
|
website |
string |
|
creator_tax_bps |
u16 |
|
fee_recipient |
pubkey |
Who receives creator fees and tax, forever. Pubkey::default() means the creator. |
dev_buy |
u64 |
Optional dev buy, in quote base units (gross, fees included). Zero for none. |
dev_buy_min_tokens_out |
u64 |
|
#ConfigUpdate
| Field |
Type |
Notes |
trade_fee_bps |
Option<u16> |
|
platform_share_bps |
Option<u16> |
|
max_creator_tax_bps |
Option<u16> |
|
launches_paused |
Option<bool> |
|
new_admin |
Option<pubkey> |
|
#Phase
| Variant |
Value |
NotGraduated |
0 |
Swept |
1 |
PoolCreated |
2 |
Rescued |
3 |