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.
[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 bytesSetup and roles
| Tag | Instruction | Signed by | What it does |
|---|---|---|---|
| 0 | initialize_config | Program upgrade authority | Creates GateConfig with the sponsors, approvers, launcher, partner and DBC program. Checked through ProgramData, so it can't be front-run. |
| 1 | set_sponsors | Admin | Replaces the sponsor keys (fomo). At most 8, distinct, never the default key. |
| 2 | set_approvers | Admin | Replaces the approver keys (FOMOPRIME backend). Same rules. |
| 3 | set_launcher | Admin | Replaces the launcher. Its old registrations stop counting. |
| 4 | retired | – | Rejected with InvalidInstructionData. The number is not reused. |
| 5 | set_admin | Admin and new admin | Hands over the admin role. The new admin must not hold a buy role. |
| 8 | set_partner | Admin | Replaces the partner (fee claimer) wallet for later launches. |
Launch
| Tag | Instruction | Signed by | What it does |
|---|---|---|---|
| 9 | register_dbc_config | Payer, and admin or launcher | Records that FOMOPRIME accepts a DBC configuration. Fails if the configuration names another fee claimer or hook program. |
| 10 | unregister_dbc_config | Admin or launcher | Closes a registration and refunds its rent. Tokens already launched keep trading. |
| 7 | initialize_extra_account_meta_list | Payer, and admin or launcher | Attaches the gate to a new pool's mint after every launch check. Runs once per mint. |
Trading
| Tag | Instruction | Signed by | What it does |
|---|---|---|---|
| 6 | approve_buy | An approver | Approves the next DBC swap for one destination token account, up to max_amount tokens. |
| – | Execute | Token-2022 | The 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.