Skip to content

Program instructions

Every social_gate instruction: data, accounts and who may call it.

social_gate has eleven instruction tags plus the standard transfer-hook Execute. Each instruction is one tag byte followed by its fields, with no Anchor discriminator. The TypeScript client encodes them by hand.

wire format
[tag: u8][fields…]              exact length, no padding
key list   = u8 count, then count × 32-byte keys (max 8)
u64        = little endian
option     = 0, or 1 followed by 32 bytes

Setup and roles

TagInstructionSigned byWhat it does
0initialize_configProgram upgrade authorityCreates GateConfig with the sponsors, approvers, launcher, partner and DBC program. Checked through ProgramData, so it can't be front-run.
1set_sponsorsAdminReplaces the sponsor keys (fomo). At most 8, distinct, never the default key.
2set_approversAdminReplaces the approver keys (FOMOPRIME backend). Same rules.
3set_launcherAdminReplaces the launcher. Its old registrations stop counting.
4retiredRejected with InvalidInstructionData. The number is not reused.
5set_adminAdmin and new adminHands over the admin role. The new admin must not hold a buy role.
8set_partnerAdminReplaces the partner (fee claimer) wallet for later launches.

Launch

TagInstructionSigned byWhat it does
9register_dbc_configPayer, and admin or launcherRecords that FOMOPRIME accepts a DBC configuration. Fails if the configuration names another fee claimer or hook program.
10unregister_dbc_configAdmin or launcherCloses a registration and refunds its rent. Tokens already launched keep trading.
7initialize_extra_account_meta_listPayer, and admin or launcherAttaches the gate to a new pool's mint after every launch check. Runs once per mint.

Trading

TagInstructionSigned byWhat it does
6approve_buyAn approverApproves the next DBC swap for one destination token account, up to max_amount tokens.
ExecuteToken-2022The transfer-hook entry point, called on every transfer. Applies the buy gate.

Note

Anything not listed here is not configurable. The hook's extra accounts are two fixed addresses, the instructions sysvar and GateConfig, so wallets and routers resolve them without special handling.