{
  "address": "LemmhtCwJ4WPn2a3yCdn3z3k7Unguxvj7NcMHeuhrSX",
  "metadata": {
    "name": "lemming",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "Lemming Pad ($CLIFF): copy-trading flocks on pump.fun coins launched through the pad. One vault per leader with two ledgers (leader / flock), one shared buy price, the flock sells first, cliff penalty on early or deep-loss leader sales, instant unplug for followers, high-water-mark leader fee, sunset of abandoned flocks"
  },
  "instructions": [
    {
      "name": "accept_admin",
      "discriminator": [
        112,
        42,
        45,
        90,
        116,
        181,
        13,
        170
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "burn_strays",
      "docs": [
        "Burns tokens sitting in a purse ATA of a mint the flock holds no position in (someone sent them) and closes",
        "the ATA (rent to the leader's ledger). Anyone."
      ],
      "discriminator": [
        88,
        196,
        90,
        111,
        142,
        5,
        169,
        96
      ],
      "accounts": [
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "flock.leader",
                "account": "Flock"
              }
            ]
          }
        },
        {
          "name": "purse",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  117,
                  114,
                  115,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              }
            ]
          }
        },
        {
          "name": "mint",
          "writable": true
        },
        {
          "name": "purse_ata",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "buy_cliff",
      "docs": [
        "The $CLIFF bucket buys $CLIFF and burns it. Permissionless; the program sizes the chunk: min(bucket, buy_max,",
        "impact cap, fee x reserve (never profitably sandwiched, RESEARCH-batch7 6), what the curve can take). The median",
        "guard + dispersion apply, one buy per buy_gap and per slot. `max_spend` > 0 only makes it stricter (fails, never",
        "shrinks: AUDIT-cobweb M-3). The caller lends the rents (ATA + WSOL), all returned.",
        "remaining = venue buy list (pump buy, or PumpSwap buy after the migration) with user = the burner PDA."
      ],
      "discriminator": [
        54,
        178,
        114,
        176,
        114,
        113,
        17,
        8
      ],
      "accounts": [
        {
          "name": "caller",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "pad",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  97,
                  100
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "config.pad_mint",
                "account": "Config"
              }
            ]
          }
        },
        {
          "name": "mint",
          "writable": true
        },
        {
          "name": "burner",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  117,
                  114,
                  110,
                  101,
                  114
                ]
              }
            ]
          }
        },
        {
          "name": "burner_ata",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "max_spend",
          "type": "u64"
        }
      ]
    },
    {
      "name": "claim_dev",
      "docs": [
        "Pays the dev's bucket to coin.dev (anyone can push it; it only goes to the dev)."
      ],
      "discriminator": [
        67,
        144,
        21,
        238,
        28,
        66,
        170,
        208
      ],
      "accounts": [
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "dev",
          "writable": true,
          "relations": [
            "coin"
          ]
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "close_flock",
      "docs": [
        "Closes an empty flock (no positions, no shares, no followers, no pending exits): the purse's volume",
        "accumulators close (rent back), everything in the Flock account (the leader's free SOL, strays, rent) goes to",
        "the leader. The leader, or anyone once the flock is in sunset."
      ],
      "discriminator": [
        95,
        21,
        245,
        37,
        1,
        8,
        82,
        219
      ],
      "accounts": [
        {
          "name": "caller",
          "signer": true
        },
        {
          "name": "leader",
          "writable": true,
          "relations": [
            "flock"
          ]
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "flock.leader",
                "account": "Flock"
              }
            ]
          }
        },
        {
          "name": "purse",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  117,
                  114,
                  115,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              }
            ]
          }
        },
        {
          "name": "pump_uva",
          "writable": true
        },
        {
          "name": "pump_event_authority"
        },
        {
          "name": "pump_program",
          "address": "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
        },
        {
          "name": "amm_uva",
          "writable": true
        },
        {
          "name": "amm_event_authority"
        },
        {
          "name": "amm_program",
          "address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "collect",
      "docs": [
        "Books the creator fees that reached the Fees PDA and splits them dev / $CLIFF / treasury. Permissionless.",
        "remaining (optional) = pump collect_creator_fee [fees, creator_vault, system, event_authority, pump]; after",
        "migration the client puts PumpSwap `transfer_creator_fees_to_pump` (permissionless) before this instruction.",
        "`wsol` (optional) = ANY SPL WSOL account owned by the Fees PDA (PumpSwap collect_coin_creator_fee can park fees",
        "there, AUDIT-penguin M-3): closed into the Fees PDA and booked."
      ],
      "discriminator": [
        208,
        47,
        194,
        155,
        17,
        98,
        82,
        236
      ],
      "accounts": [
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "pad",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  97,
                  100
                ]
              }
            ]
          }
        },
        {
          "name": "wsol",
          "writable": true,
          "optional": true
        },
        {
          "name": "spl_token",
          "optional": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "create_flock",
      "docs": [
        "Opens the leader's flock with an optional first deposit into his ledger and prepares the purse's pump /",
        "PumpSwap volume accumulators (the leader pays them; they come back at close_flock)."
      ],
      "discriminator": [
        121,
        217,
        206,
        238,
        85,
        239,
        238,
        107
      ],
      "accounts": [
        {
          "name": "leader",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "leader"
              }
            ]
          }
        },
        {
          "name": "purse",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  117,
                  114,
                  115,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              }
            ]
          }
        },
        {
          "name": "pump_uva",
          "writable": true
        },
        {
          "name": "pump_event_authority"
        },
        {
          "name": "pump_program",
          "address": "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
        },
        {
          "name": "amm_uva",
          "writable": true
        },
        {
          "name": "amm_event_authority"
        },
        {
          "name": "amm_program",
          "address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "leader_fee_bps",
          "type": "u16"
        },
        {
          "name": "deposit",
          "type": "u64"
        },
        {
          "name": "expected_version",
          "type": "u32"
        }
      ]
    },
    {
      "name": "exit_pay",
      "docs": [
        "Pays a finished Exit (every slice sold): the follower gets cash + proceeds minus the leader's fee",
        "(leader_fee_bps of the part above his high-water mark, to the leader's ledger). The Exit closes (rent to its",
        "payer); a follower with no shares left closes too (rent to him). Anyone."
      ],
      "discriminator": [
        131,
        194,
        88,
        149,
        158,
        8,
        145,
        178
      ],
      "accounts": [
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "flock.leader",
                "account": "Flock"
              }
            ]
          },
          "relations": [
            "exit"
          ]
        },
        {
          "name": "exit",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  120,
                  105,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              },
              {
                "kind": "account",
                "path": "wallet"
              }
            ]
          }
        },
        {
          "name": "follower",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  111,
                  108,
                  108,
                  111,
                  119
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              },
              {
                "kind": "account",
                "path": "wallet"
              }
            ]
          }
        },
        {
          "name": "wallet",
          "writable": true,
          "relations": [
            "exit"
          ]
        },
        {
          "name": "payer",
          "writable": true,
          "relations": [
            "exit"
          ]
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "exit_sell",
      "docs": [
        "Sells (part of) one slice of an Exit. The follower: `amount` 0 = all, his own `min_out` (any). Anyone else,",
        "EXIT_CRANK_GRACE after the unplug (at once in sunset): the program sizes a sandwich-proof chunk (<= fee x",
        "reserve, <= impact cap) sold at the live price. remaining = venue sell list with user = the purse."
      ],
      "discriminator": [
        99,
        132,
        49,
        244,
        193,
        137,
        5,
        105
      ],
      "accounts": [
        {
          "name": "caller",
          "writable": true,
          "signer": true
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "flock.leader",
                "account": "Flock"
              }
            ]
          },
          "relations": [
            "exit"
          ]
        },
        {
          "name": "exit",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  120,
                  105,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              },
              {
                "kind": "account",
                "path": "exit.wallet",
                "account": "Exit"
              }
            ]
          }
        },
        {
          "name": "purse",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  117,
                  114,
                  115,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "purse_ata",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "slot",
          "type": "u8"
        },
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "min_out",
          "type": "u64"
        }
      ]
    },
    {
      "name": "follow",
      "docs": [
        "Joins (or tops up) a flock: shares = lamports x (S + V) / (NAV + 1), NAV = flock cash + every open flock",
        "position at max(fresh median, spot). Refused while an open position has no fresh median. Caps per follower",
        "(cost basis) and per flock (NAV). remaining = for every position with flock tokens, in slot order:",
        "[coin, curve] or [coin, curve, pool, pool_base_ta, pool_quote_ta] after the migration."
      ],
      "discriminator": [
        161,
        61,
        150,
        122,
        164,
        153,
        0,
        18
      ],
      "accounts": [
        {
          "name": "wallet",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "flock.leader",
                "account": "Flock"
              }
            ]
          }
        },
        {
          "name": "follower",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  111,
                  108,
                  108,
                  111,
                  119
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              },
              {
                "kind": "account",
                "path": "wallet"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "lamports",
          "type": "u64"
        },
        {
          "name": "min_shares",
          "type": "u128"
        }
      ]
    },
    {
      "name": "init_config",
      "docs": [
        "One-time setup by INIT_AUTHORITY: Config + the Pad buckets."
      ],
      "discriminator": [
        23,
        235,
        115,
        232,
        168,
        96,
        1,
        231
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "address": "FpgrHTssceM8pgMeCZ8AB2SqifKnpdJ1bhwB68dHULdu"
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "pad",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  97,
                  100
                ]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "treasury",
          "type": "pubkey"
        },
        {
          "name": "coin",
          "type": {
            "defined": {
              "name": "CoinParams"
            }
          }
        },
        {
          "name": "pad",
          "type": {
            "defined": {
              "name": "PadParams"
            }
          }
        },
        {
          "name": "flock",
          "type": {
            "defined": {
              "name": "FlockParams"
            }
          }
        }
      ]
    },
    {
      "name": "launch",
      "docs": [
        "Creates the pump coin (creator = Fees PDA) + optional dev buy to the dev, the Coin record (rent by the dev), pays",
        "the launch fee to the treasury and pre-funds the Fees PDA with its rent floor. Alone in its transaction.",
        "remaining = pump create_v2 accounts (16) [+ pump buy accounts (16+) when dev_buy > 0]."
      ],
      "discriminator": [
        153,
        241,
        93,
        225,
        22,
        69,
        74,
        61
      ],
      "accounts": [
        {
          "name": "dev",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "mint",
          "writable": true,
          "signer": true
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "dev_ata",
          "writable": true
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "symbol",
          "type": "string"
        },
        {
          "name": "uri",
          "type": "string"
        },
        {
          "name": "dev_buy",
          "type": "u64"
        },
        {
          "name": "min_tokens_out",
          "type": "u64"
        },
        {
          "name": "expected_version",
          "type": "u32"
        }
      ]
    },
    {
      "name": "lead_buy",
      "docs": [
        "The leader's buy: `req_bps` of BOTH ledgers' free SOL in one pump buy (clamped by max_trade_bps of each ledger's",
        "book value and by the impact cap, both ledgers by the same factor). Top-level, no pump trade in the same tx.",
        "remaining = venue buy list with user = the purse (pump buy list, or PumpSwap buy list after the migration)."
      ],
      "discriminator": [
        107,
        235,
        101,
        233,
        244,
        160,
        63,
        17
      ],
      "accounts": [
        {
          "name": "leader",
          "writable": true,
          "signer": true,
          "relations": [
            "flock"
          ]
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "leader"
              }
            ]
          }
        },
        {
          "name": "purse",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  117,
                  114,
                  115,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "purse_ata",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "req_bps",
          "type": "u16"
        }
      ]
    },
    {
      "name": "lead_sell",
      "docs": [
        "The leader's sale of `bps` of a position: the flock's slice FIRST (median guard, `flock_slip_bps` 0 = the",
        "flock's sell_slip, a smaller value is stricter), then the leader's same share (his own `leader_min_out`). Cliff",
        "jump rules apply. Top-level, no pump trade in the same tx. remaining = venue sell list with user = the purse."
      ],
      "discriminator": [
        66,
        33,
        191,
        36,
        207,
        67,
        46,
        190
      ],
      "accounts": [
        {
          "name": "leader",
          "writable": true,
          "signer": true,
          "relations": [
            "flock"
          ]
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "leader"
              }
            ]
          }
        },
        {
          "name": "purse",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  117,
                  114,
                  115,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "purse_ata",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "bps",
          "type": "u16"
        },
        {
          "name": "flock_slip_bps",
          "type": "u16"
        },
        {
          "name": "leader_min_out",
          "type": "u64"
        }
      ]
    },
    {
      "name": "leader_deposit",
      "docs": [
        "The leader adds SOL to his own ledger."
      ],
      "discriminator": [
        104,
        184,
        202,
        9,
        138,
        11,
        51,
        207
      ],
      "accounts": [
        {
          "name": "leader",
          "writable": true,
          "signer": true,
          "relations": [
            "flock"
          ]
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "leader"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "leader_withdraw",
      "docs": [
        "The leader takes SOL out of his own ledger's free SOL (never the flock's, never tokens)."
      ],
      "discriminator": [
        237,
        25,
        229,
        73,
        85,
        41,
        102,
        17
      ],
      "accounts": [
        {
          "name": "leader",
          "writable": true,
          "signer": true,
          "relations": [
            "flock"
          ]
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "leader"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "observe",
      "docs": [
        "Observation of a coin's price (curve virtual reserves, or its canonical PumpSwap pool after the migration),",
        "clamped to +-10 % of the median of the newest 7, at most one per OBS_GAP. Permissionless.",
        "remaining after the migration: [pool, pool_base_ta, pool_quote_ta]."
      ],
      "discriminator": [
        204,
        78,
        178,
        115,
        194,
        147,
        65,
        74
      ],
      "accounts": [
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "curve"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "pay_treasury",
      "docs": [
        "Pays the pooled treasury share to config.treasury. Anyone."
      ],
      "discriminator": [
        225,
        12,
        97,
        182,
        104,
        65,
        17,
        51
      ],
      "accounts": [
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "pad",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  97,
                  100
                ]
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "prepare_burner",
      "docs": [
        "Creates the burner's pump + PumpSwap user volume accumulators once (the caller pays). Permissionless."
      ],
      "discriminator": [
        41,
        10,
        51,
        91,
        149,
        117,
        104,
        176
      ],
      "accounts": [
        {
          "name": "caller",
          "writable": true,
          "signer": true
        },
        {
          "name": "burner",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  117,
                  114,
                  110,
                  101,
                  114
                ]
              }
            ]
          }
        },
        {
          "name": "pump_uva",
          "writable": true
        },
        {
          "name": "pump_event_authority"
        },
        {
          "name": "pump_program",
          "address": "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
        },
        {
          "name": "amm_uva",
          "writable": true
        },
        {
          "name": "amm_event_authority"
        },
        {
          "name": "amm_program",
          "address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "propose_admin",
      "discriminator": [
        121,
        214,
        199,
        212,
        87,
        39,
        117,
        234
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "proposed",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "register_pad_mint",
      "docs": [
        "$CLIFF launched elsewhere on pump.fun (mainnet: Anton may launch it by hand): registers a fee-less Coin record",
        "(observation ring for the buyback guard; flocks cannot trade it) and sets it once."
      ],
      "discriminator": [
        7,
        83,
        75,
        208,
        142,
        174,
        70,
        13
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "curve"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "set_pad_mint",
      "docs": [
        "$CLIFF = a coin launched through this pad, set once, then frozen."
      ],
      "discriminator": [
        234,
        142,
        132,
        83,
        102,
        138,
        83,
        154
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "set_params",
      "docs": [
        "Params for future coins / flocks (bounded). Existing coins and flocks keep their copy."
      ],
      "discriminator": [
        27,
        234,
        178,
        52,
        147,
        2,
        187,
        141
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "coin",
          "type": {
            "defined": {
              "name": "CoinParams"
            }
          }
        },
        {
          "name": "pad",
          "type": {
            "defined": {
              "name": "PadParams"
            }
          }
        },
        {
          "name": "flock",
          "type": {
            "defined": {
              "name": "FlockParams"
            }
          }
        }
      ]
    },
    {
      "name": "set_paused",
      "docs": [
        "Pause blocks new coins, new flocks, follows and flock buys. Sales, exits, payouts, withdrawals, collects and",
        "claims always work."
      ],
      "discriminator": [
        91,
        60,
        125,
        192,
        176,
        225,
        166,
        218
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "paused",
          "type": "bool"
        }
      ]
    },
    {
      "name": "set_treasury",
      "discriminator": [
        57,
        97,
        196,
        95,
        195,
        206,
        106,
        136
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "treasury",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "sunset",
      "docs": [
        "A flock without any leader instruction for stale_secs enters sunset (anyone): no new buys or follows;",
        "`sunset_sell` liquidates flock-first; anyone can unplug followers; the leader keeps his ledger."
      ],
      "discriminator": [
        138,
        4,
        22,
        231,
        106,
        164,
        103,
        11
      ],
      "accounts": [
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "flock.leader",
                "account": "Flock"
              }
            ]
          }
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "sunset_sell",
      "docs": [
        "Sale of a sunset flock's position (anyone): flock first, in program-sized",
        "sandwich-proof chunks (sized on the median twin of the reserves, AUDIT-lemming H-2), cliff rules as for the leader."
      ],
      "discriminator": [
        26,
        244,
        62,
        184,
        88,
        7,
        28,
        202
      ],
      "accounts": [
        {
          "name": "caller",
          "writable": true,
          "signer": true
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "flock.leader",
                "account": "Flock"
              }
            ]
          }
        },
        {
          "name": "purse",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  117,
                  114,
                  115,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "purse_ata",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "sync_migration",
      "docs": [
        "Curve -> Migrated once the curve is complete and the canonical PumpSwap pool exists. Pre-creates the pool's",
        "coin_creator_vault_ata (WSOL ATA of PumpSwap's creator vault authority of our Fees PDA), paid by the caller, so",
        "no purse is ever the first swapper charged for it (RESEARCH-batch8 B1). Permissionless."
      ],
      "discriminator": [
        225,
        231,
        95,
        199,
        32,
        239,
        236,
        87
      ],
      "accounts": [
        {
          "name": "caller",
          "writable": true,
          "signer": true
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "curve"
        },
        {
          "name": "pool"
        },
        {
          "name": "ccv_authority"
        },
        {
          "name": "ccv_ata",
          "writable": true
        },
        {
          "name": "wsol_mint",
          "address": "So11111111111111111111111111111111111111112"
        },
        {
          "name": "spl_token",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": []
    },
    {
      "name": "unfollow",
      "docs": [
        "Instant unplug: burns `shares` (0 = all) of the follower; an Exit takes his fraction of the flock's free SOL",
        "and of every open position. The follower signs; once the flock is in sunset anyone may unplug anyone (the",
        "money only ever goes to the follower). The caller pays the Exit rent and gets it back at exit_pay."
      ],
      "discriminator": [
        122,
        47,
        24,
        161,
        12,
        85,
        224,
        68
      ],
      "accounts": [
        {
          "name": "caller",
          "writable": true,
          "signer": true
        },
        {
          "name": "wallet"
        },
        {
          "name": "flock",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "flock.leader",
                "account": "Flock"
              }
            ]
          }
        },
        {
          "name": "follower",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  111,
                  108,
                  108,
                  111,
                  119
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              },
              {
                "kind": "account",
                "path": "wallet"
              }
            ]
          }
        },
        {
          "name": "exit",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  120,
                  105,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "flock"
              },
              {
                "kind": "account",
                "path": "wallet"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "event_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  95,
                  95,
                  101,
                  118,
                  101,
                  110,
                  116,
                  95,
                  97,
                  117,
                  116,
                  104,
                  111,
                  114,
                  105,
                  116,
                  121
                ]
              }
            ]
          }
        },
        {
          "name": "program"
        }
      ],
      "args": [
        {
          "name": "shares",
          "type": "u128"
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "Coin",
      "discriminator": [
        215,
        195,
        53,
        238,
        217,
        196,
        213,
        51
      ]
    },
    {
      "name": "Config",
      "discriminator": [
        155,
        12,
        170,
        224,
        30,
        250,
        204,
        130
      ]
    },
    {
      "name": "Exit",
      "discriminator": [
        25,
        25,
        160,
        223,
        53,
        155,
        170,
        162
      ]
    },
    {
      "name": "Flock",
      "discriminator": [
        74,
        11,
        85,
        113,
        33,
        72,
        114,
        162
      ]
    },
    {
      "name": "Follower",
      "discriminator": [
        97,
        232,
        233,
        36,
        16,
        248,
        239,
        228
      ]
    },
    {
      "name": "Pad",
      "discriminator": [
        181,
        45,
        219,
        141,
        63,
        144,
        253,
        180
      ]
    }
  ],
  "events": [
    {
      "name": "CliffBought",
      "discriminator": [
        72,
        144,
        193,
        201,
        202,
        164,
        40,
        54
      ]
    },
    {
      "name": "CliffJump",
      "discriminator": [
        120,
        227,
        88,
        28,
        94,
        90,
        179,
        79
      ]
    },
    {
      "name": "Collected",
      "discriminator": [
        67,
        109,
        138,
        167,
        168,
        239,
        2,
        207
      ]
    },
    {
      "name": "ConfigSet",
      "discriminator": [
        15,
        104,
        59,
        16,
        236,
        241,
        8,
        6
      ]
    },
    {
      "name": "DevPaid",
      "discriminator": [
        108,
        221,
        137,
        38,
        39,
        247,
        120,
        194
      ]
    },
    {
      "name": "ExitPaid",
      "discriminator": [
        135,
        5,
        84,
        235,
        210,
        12,
        176,
        43
      ]
    },
    {
      "name": "ExitSold",
      "discriminator": [
        118,
        71,
        81,
        246,
        177,
        236,
        96,
        226
      ]
    },
    {
      "name": "FlockClosed",
      "discriminator": [
        91,
        16,
        134,
        130,
        127,
        24,
        55,
        242
      ]
    },
    {
      "name": "FlockCreated",
      "discriminator": [
        70,
        201,
        196,
        158,
        251,
        19,
        89,
        71
      ]
    },
    {
      "name": "Followed",
      "discriminator": [
        236,
        182,
        255,
        24,
        25,
        185,
        209,
        23
      ]
    },
    {
      "name": "KeySet",
      "discriminator": [
        58,
        88,
        48,
        221,
        90,
        54,
        52,
        157
      ]
    },
    {
      "name": "Launched",
      "discriminator": [
        209,
        127,
        29,
        152,
        129,
        212,
        189,
        183
      ]
    },
    {
      "name": "LeadBuy",
      "discriminator": [
        108,
        128,
        247,
        76,
        117,
        97,
        168,
        98
      ]
    },
    {
      "name": "LeadSell",
      "discriminator": [
        255,
        44,
        170,
        236,
        218,
        242,
        214,
        79
      ]
    },
    {
      "name": "LeaderMoved",
      "discriminator": [
        30,
        62,
        124,
        101,
        82,
        194,
        141,
        4
      ]
    },
    {
      "name": "Migrated",
      "discriminator": [
        2,
        66,
        164,
        53,
        158,
        122,
        128,
        236
      ]
    },
    {
      "name": "Observed",
      "discriminator": [
        154,
        65,
        198,
        52,
        238,
        11,
        193,
        59
      ]
    },
    {
      "name": "PadMintSet",
      "discriminator": [
        36,
        57,
        117,
        98,
        7,
        209,
        231,
        41
      ]
    },
    {
      "name": "PausedSet",
      "discriminator": [
        171,
        125,
        127,
        156,
        233,
        81,
        68,
        66
      ]
    },
    {
      "name": "PositionClosed",
      "discriminator": [
        157,
        163,
        227,
        228,
        13,
        97,
        138,
        121
      ]
    },
    {
      "name": "StraysBurned",
      "discriminator": [
        86,
        62,
        106,
        154,
        104,
        101,
        100,
        219
      ]
    },
    {
      "name": "SunsetStarted",
      "discriminator": [
        231,
        227,
        134,
        208,
        22,
        77,
        26,
        211
      ]
    },
    {
      "name": "TreasuryPaid",
      "discriminator": [
        203,
        141,
        198,
        183,
        132,
        74,
        239,
        248
      ]
    },
    {
      "name": "Unfollowed",
      "discriminator": [
        181,
        126,
        70,
        2,
        95,
        63,
        168,
        239
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "NotAuthorized",
      "msg": "only the admin / the right key can do this"
    },
    {
      "code": 6001,
      "name": "BadParams",
      "msg": "parameter out of its allowed range"
    },
    {
      "code": 6002,
      "name": "Paused",
      "msg": "the pad is paused: no new coins, flocks, follows or flock buys (exits, sales and claims still work)"
    },
    {
      "code": 6003,
      "name": "BadAccounts",
      "msg": "wrong account passed"
    },
    {
      "code": 6004,
      "name": "Math",
      "msg": "math overflow"
    },
    {
      "code": 6005,
      "name": "PadMintFrozen",
      "msg": "the pad token is already set and frozen"
    },
    {
      "code": 6006,
      "name": "ParamsChanged",
      "msg": "parameters changed since the page loaded: reload and confirm again"
    },
    {
      "code": 6007,
      "name": "NotAlone",
      "msg": "this instruction must be alone in its transaction (only compute-budget / system next to it)"
    },
    {
      "code": 6008,
      "name": "NotTopLevel",
      "msg": "a trade must be a top-level instruction"
    },
    {
      "code": 6009,
      "name": "BadName",
      "msg": "name: 1-32 printable characters"
    },
    {
      "code": 6010,
      "name": "BadSymbol",
      "msg": "ticker: 1-10 characters, no spaces"
    },
    {
      "code": 6011,
      "name": "BadUri",
      "msg": "metadata uri must be ipfs://<CID> or https://ipfs.io/ipfs/<CID>"
    },
    {
      "code": 6012,
      "name": "UnsafeMint",
      "msg": "only plain pump.fun Token-2022 mints are accepted"
    },
    {
      "code": 6013,
      "name": "NothingBought",
      "msg": "nothing was bought"
    },
    {
      "code": 6014,
      "name": "NothingToCollect",
      "msg": "nothing to collect"
    },
    {
      "code": 6015,
      "name": "NothingToClaim",
      "msg": "nothing to claim"
    },
    {
      "code": 6016,
      "name": "BelowRentFloor",
      "msg": "the payout would leave the receiving wallet below its rent minimum"
    },
    {
      "code": 6017,
      "name": "ObserveTooSoon",
      "msg": "one observation per coin per gap: wait a few seconds"
    },
    {
      "code": 6018,
      "name": "StaleMedian",
      "msg": "the coin's median price is stale: it needs fresh observations (observe) before this"
    },
    {
      "code": 6019,
      "name": "PriceAboveMedian",
      "msg": "the live price is above the median: refusing to buy into a pump"
    },
    {
      "code": 6020,
      "name": "PriceBelowMedian",
      "msg": "the sale would fetch less than the median-based minimum"
    },
    {
      "code": 6021,
      "name": "PricesDisagree",
      "msg": "prices of the last minutes disagree too much: wait until the price settles"
    },
    {
      "code": 6022,
      "name": "MigrationNotSynced",
      "msg": "the coin migrated: sync_migration first"
    },
    {
      "code": 6023,
      "name": "NotMigrated",
      "msg": "the coin did not migrate yet"
    },
    {
      "code": 6024,
      "name": "AlreadyMigrated",
      "msg": "already migrated"
    },
    {
      "code": 6025,
      "name": "RentCharged",
      "msg": "a pump account charged the vault an unexpected rent"
    },
    {
      "code": 6026,
      "name": "OneTradePerSlot",
      "msg": "one program trade of this coin per slot / per gap"
    },
    {
      "code": 6027,
      "name": "NotPadCoin",
      "msg": "flocks can only trade coins launched through Lemming Pad"
    },
    {
      "code": 6028,
      "name": "LeaderIsDev",
      "msg": "the leader cannot lead a flock into his own coin"
    },
    {
      "code": 6029,
      "name": "CoinTooFresh",
      "msg": "the coin is too fresh for a flock buy"
    },
    {
      "code": 6030,
      "name": "TooManyPositions",
      "msg": "this flock already holds the maximum number of coins"
    },
    {
      "code": 6031,
      "name": "TradeTooSmall",
      "msg": "the trade is below the minimum size"
    },
    {
      "code": 6032,
      "name": "LeaderStakeTooSmall",
      "msg": "the leader's stake is too small: deposit more SOL into the leader ledger"
    },
    {
      "code": 6033,
      "name": "FlockSunset",
      "msg": "the flock is in sunset: no new buys or follows"
    },
    {
      "code": 6034,
      "name": "NotStale",
      "msg": "the flock is not stale yet"
    },
    {
      "code": 6035,
      "name": "NotSunset",
      "msg": "the flock is not in sunset"
    },
    {
      "code": 6036,
      "name": "FollowTooSmall",
      "msg": "follow amount below the minimum"
    },
    {
      "code": 6037,
      "name": "FollowerCap",
      "msg": "follow would pass the per-follower cap"
    },
    {
      "code": 6038,
      "name": "FlockCap",
      "msg": "follow would pass the flock cap"
    },
    {
      "code": 6039,
      "name": "LeaderCannotFollow",
      "msg": "the leader follows through his own ledger (leader_deposit), not as a follower"
    },
    {
      "code": 6040,
      "name": "SharesBelowMin",
      "msg": "fewer shares than the minimum you accepted: the flock value moved, reload"
    },
    {
      "code": 6041,
      "name": "NoShares",
      "msg": "no shares to unfollow"
    },
    {
      "code": 6042,
      "name": "NotFollower",
      "msg": "only the follower can unplug (anyone may crank it once the flock is in sunset)"
    },
    {
      "code": 6043,
      "name": "ExitNotDone",
      "msg": "this exit still has tokens to sell"
    },
    {
      "code": 6044,
      "name": "NothingToSell",
      "msg": "this exit slot has nothing left to sell"
    },
    {
      "code": 6045,
      "name": "InsufficientLeaderSol",
      "msg": "not enough SOL in the leader ledger"
    },
    {
      "code": 6046,
      "name": "FlockNotEmpty",
      "msg": "the flock still has positions, followers or pending exits"
    },
    {
      "code": 6047,
      "name": "NoPosition",
      "msg": "the position does not exist"
    },
    {
      "code": 6048,
      "name": "PositionNotEmpty",
      "msg": "the position still holds tokens"
    },
    {
      "code": 6049,
      "name": "FeeTooHigh",
      "msg": "leader fee above the pad's maximum"
    },
    {
      "code": 6050,
      "name": "NoPadMint",
      "msg": "the pad token is not set"
    },
    {
      "code": 6051,
      "name": "BucketTooSmall",
      "msg": "the $CLIFF bucket is too small for a buy"
    },
    {
      "code": 6052,
      "name": "SpendAboveMax",
      "msg": "refusing: the program would spend more than the max you passed"
    },
    {
      "code": 6053,
      "name": "BadBps",
      "msg": "bps must be 1..=10000"
    },
    {
      "code": 6054,
      "name": "BadFlockName",
      "msg": "flock name: 1-24 printable characters"
    },
    {
      "code": 6055,
      "name": "ExitGrace",
      "msg": "the follower sells his own slices first: anyone may crank them a little later"
    }
  ],
  "types": [
    {
      "name": "CliffBought",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "venue",
            "type": "u8"
          },
          {
            "name": "spent",
            "type": "u64"
          },
          {
            "name": "burned",
            "type": "u64"
          },
          {
            "name": "median_q9",
            "type": "u64"
          },
          {
            "name": "donated",
            "type": "u64"
          },
          {
            "name": "pool_left",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "CliffJump",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "reason",
            "docs": [
              "1 = sold before min_hold, 2 = flock slice below its cost by more than cliff_loss, 3 = both"
            ],
            "type": "u8"
          },
          {
            "name": "held_secs",
            "type": "i64"
          },
          {
            "name": "f_cost_sold",
            "type": "u64"
          },
          {
            "name": "f_sol",
            "type": "u64"
          },
          {
            "name": "leader_sol",
            "type": "u64"
          },
          {
            "name": "penalty",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Coin",
      "docs": [
        "A coin launched through Lemming (or the external $CLIFF registered by set_pad_mint). Holds the dev's pending",
        "share as lamports. Invariant: lamports - rent == dev_pending."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "created_at",
            "type": "i64"
          },
          {
            "name": "migrated",
            "type": "u8"
          },
          {
            "name": "external",
            "docs": [
              "1 = $CLIFF registered without a launch here (no fees, flocks cannot trade it)"
            ],
            "type": "u8"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "fees_bump",
            "type": "u8"
          },
          {
            "name": "dev_bps",
            "type": "u16"
          },
          {
            "name": "pad_bps",
            "type": "u16"
          },
          {
            "name": "treasury_bps",
            "type": "u16"
          },
          {
            "name": "dev_pending",
            "type": "u64"
          },
          {
            "name": "dev_paid",
            "type": "u64"
          },
          {
            "name": "fees_total",
            "type": "u64"
          },
          {
            "name": "collects",
            "type": "u32"
          },
          {
            "name": "fee_ring",
            "type": {
              "array": [
                "u64",
                8
              ]
            }
          },
          {
            "name": "fee_head",
            "type": "i64"
          },
          {
            "name": "obs",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "ObsQ"
                  }
                },
                16
              ]
            }
          },
          {
            "name": "obs_head",
            "type": "u8"
          },
          {
            "name": "obs_count",
            "type": "u8"
          },
          {
            "name": "price_q9",
            "type": "u64"
          },
          {
            "name": "last_obs_ts",
            "type": "i64"
          },
          {
            "name": "last_buy_slot",
            "docs": [
              "one program buy per coin per slot (SPEC 0.3 d)"
            ],
            "type": "u64"
          },
          {
            "name": "flock_buys",
            "type": "u32"
          },
          {
            "name": "flock_buy_sol",
            "type": "u64"
          },
          {
            "name": "flock_sells",
            "type": "u32"
          },
          {
            "name": "flock_sell_sol",
            "type": "u64"
          },
          {
            "name": "pad_bought_sol",
            "type": "u64"
          },
          {
            "name": "pad_burned",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "CoinParams",
      "docs": [
        "Split of every coin's creator fees + the launch fee. Copied into each Coin at launch (the admin can only change",
        "future coins). treasury = 10000 - dev - pad."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "launch_fee",
            "type": "u64"
          },
          {
            "name": "dev_bps",
            "type": "u16"
          },
          {
            "name": "pad_bps",
            "docs": [
              "$CLIFF buyback + burn share"
            ],
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "Collected",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "incoming",
            "type": "u64"
          },
          {
            "name": "dev",
            "type": "u64"
          },
          {
            "name": "pad",
            "type": "u64"
          },
          {
            "name": "treasury",
            "type": "u64"
          },
          {
            "name": "fees_total",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Config",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "pending_admin",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "pad_mint",
            "docs": [
              "$CLIFF, set once (then frozen)"
            ],
            "type": "pubkey"
          },
          {
            "name": "paused",
            "type": "bool"
          },
          {
            "name": "coin",
            "type": {
              "defined": {
                "name": "CoinParams"
              }
            }
          },
          {
            "name": "pad",
            "type": {
              "defined": {
                "name": "PadParams"
              }
            }
          },
          {
            "name": "flock",
            "type": {
              "defined": {
                "name": "FlockParams"
              }
            }
          },
          {
            "name": "version",
            "docs": [
              "bumps on every params change; launch / create_flock pass the version the site showed"
            ],
            "type": "u32"
          },
          {
            "name": "coins",
            "type": "u64"
          },
          {
            "name": "flocks",
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "ConfigSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "coin",
            "type": {
              "defined": {
                "name": "CoinParams"
              }
            }
          },
          {
            "name": "pad",
            "type": {
              "defined": {
                "name": "PadParams"
              }
            }
          },
          {
            "name": "flock",
            "type": {
              "defined": {
                "name": "FlockParams"
              }
            }
          },
          {
            "name": "version",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "DevPaid",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Exit",
      "docs": [
        "An unplugged follower's slice: his share of the flock's cash (taken at once) and of every open position (sold by",
        "`exit_sell`, anyone can crank). Paid by `exit_pay`. Rent paid by `payer` and returned to it."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "wallet",
            "type": "pubkey"
          },
          {
            "name": "payer",
            "type": "pubkey"
          },
          {
            "name": "shares",
            "type": "u128"
          },
          {
            "name": "basis",
            "type": "u64"
          },
          {
            "name": "cash",
            "type": "u64"
          },
          {
            "name": "sol",
            "docs": [
              "cash + proceeds so far (booked in flock.exit_sol)"
            ],
            "type": "u64"
          },
          {
            "name": "created_at",
            "type": "i64"
          },
          {
            "name": "slots",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "ExitSlot"
                  }
                },
                3
              ]
            }
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "ExitPaid",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "wallet",
            "type": "pubkey"
          },
          {
            "name": "total",
            "type": "u64"
          },
          {
            "name": "basis",
            "type": "u64"
          },
          {
            "name": "fee",
            "type": "u64"
          },
          {
            "name": "paid",
            "type": "u64"
          },
          {
            "name": "closed_follower",
            "type": "bool"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "ExitSlot",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "tokens",
            "type": "u64"
          },
          {
            "name": "left",
            "type": "u64"
          },
          {
            "name": "got",
            "type": "u64"
          },
          {
            "name": "cost",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "ExitSold",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "exit",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "tokens",
            "type": "u64"
          },
          {
            "name": "sol",
            "type": "u64"
          },
          {
            "name": "left",
            "type": "u64"
          },
          {
            "name": "by_follower",
            "type": "bool"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Flock",
      "docs": [
        "One flock per leader. All SOL of both ledgers and of pending exits sits in THIS account (program-owned); the purse",
        "PDA [\"purse\", flock] (data-less, system-owned) is the pump / PumpSwap `user`, owns the token ATAs and holds 0",
        "lamports between instructions.",
        "Invariants: lamports - rent >= l_sol + f_sol + exit_sol (the difference is unbooked strays);",
        "purse ATA(mint) amount >= f_tok + l_tok + exit_tok of that position;",
        "total_shares == 0  =>  f_sol == 0 and every f_tok == 0."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "leader",
            "type": "pubkey"
          },
          {
            "name": "name",
            "type": {
              "array": [
                "u8",
                24
              ]
            }
          },
          {
            "name": "name_len",
            "type": "u8"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "purse_bump",
            "type": "u8"
          },
          {
            "name": "state",
            "type": "u8"
          },
          {
            "name": "created_at",
            "type": "i64"
          },
          {
            "name": "last_leader_ts",
            "type": "i64"
          },
          {
            "name": "sunset_at",
            "type": "i64"
          },
          {
            "name": "p",
            "type": {
              "defined": {
                "name": "FlockParams"
              }
            }
          },
          {
            "name": "leader_fee_bps",
            "type": "u16"
          },
          {
            "name": "l_sol",
            "type": "u64"
          },
          {
            "name": "f_sol",
            "type": "u64"
          },
          {
            "name": "exit_sol",
            "type": "u64"
          },
          {
            "name": "total_shares",
            "type": "u128"
          },
          {
            "name": "followers",
            "type": "u32"
          },
          {
            "name": "pending_exits",
            "type": "u32"
          },
          {
            "name": "positions",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "Position"
                  }
                },
                3
              ]
            }
          },
          {
            "name": "followed_in",
            "type": "u64"
          },
          {
            "name": "paid_out",
            "type": "u64"
          },
          {
            "name": "leader_in",
            "type": "u64"
          },
          {
            "name": "leader_out",
            "type": "u64"
          },
          {
            "name": "leader_fees",
            "type": "u64"
          },
          {
            "name": "cliff_jumps",
            "type": "u32"
          },
          {
            "name": "cliff_paid",
            "type": "u64"
          },
          {
            "name": "trades",
            "type": "u32"
          },
          {
            "name": "f_realized",
            "docs": [
              "realized result of closed slices (proceeds - cost), per ledger"
            ],
            "type": "i64"
          },
          {
            "name": "l_realized",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "FlockClosed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "leader",
            "type": "pubkey"
          },
          {
            "name": "paid",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "FlockCreated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "leader",
            "type": "pubkey"
          },
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "leader_fee_bps",
            "type": "u16"
          },
          {
            "name": "deposit",
            "type": "u64"
          },
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "FlockParams"
              }
            }
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "FlockParams",
      "docs": [
        "Rules of a flock. The Config holds the template; every Flock copies it at creation and keeps it forever (a leader",
        "and his followers trade under the rules they joined under). The leader picks his fee <= max_leader_fee_bps."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "min_hold_secs",
            "docs": [
              "a leader sale younger than this (since the position's last buy) is a cliff jump"
            ],
            "type": "i64"
          },
          {
            "name": "cliff_bps",
            "docs": [
              "share of the LEADER's proceeds of a cliff-jump sale that goes to the flock"
            ],
            "type": "u16"
          },
          {
            "name": "cliff_loss_bps",
            "docs": [
              "a leader sale where the flock's slice fetches less than its cost x (1 - cliff_loss) is a cliff jump too"
            ],
            "type": "u16"
          },
          {
            "name": "max_leader_fee_bps",
            "docs": [
              "highest leader fee (of follower profit above the high-water mark) a leader may choose"
            ],
            "type": "u16"
          },
          {
            "name": "max_trade_bps",
            "docs": [
              "one buy spends at most this share of each ledger's book value"
            ],
            "type": "u16"
          },
          {
            "name": "follower_cap",
            "docs": [
              "follower deposits (cost basis) cap / flock value cap"
            ],
            "type": "u64"
          },
          {
            "name": "flock_cap",
            "type": "u64"
          },
          {
            "name": "min_leader_stake",
            "docs": [
              "leader skin: his ledger's book value >= min_leader_stake, and in every buy his SOL >= min_leader_bps of the",
              "flock's SOL in the same buy (Hyperliquid rule: leader >= 5 % of the vault)"
            ],
            "type": "u64"
          },
          {
            "name": "min_leader_bps",
            "type": "u16"
          },
          {
            "name": "min_follow",
            "type": "u64"
          },
          {
            "name": "max_impact_bps",
            "docs": [
              "a flock buy moves the price by at most max_impact (exact constant-product bound) and needs the live quote",
              "within buy_slip of the median promise"
            ],
            "type": "u16"
          },
          {
            "name": "buy_slip_bps",
            "type": "u16"
          },
          {
            "name": "sell_slip_bps",
            "docs": [
              "the flock's slice of a leader sale must fetch >= median value x (1 - fee) x (1 - sell_slip)"
            ],
            "type": "u16"
          },
          {
            "name": "min_coin_age",
            "docs": [
              "a coin younger than this cannot be bought by a flock (fresh-coin pump)"
            ],
            "type": "i64"
          },
          {
            "name": "stale_secs",
            "docs": [
              "no leader instruction for this long -> anyone may sunset the flock"
            ],
            "type": "i64"
          },
          {
            "name": "max_positions",
            "type": "u8"
          },
          {
            "name": "min_trade",
            "docs": [
              "smallest flock trade (total SOL of a buy)"
            ],
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Followed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "wallet",
            "type": "pubkey"
          },
          {
            "name": "lamports",
            "type": "u64"
          },
          {
            "name": "shares",
            "type": "u128"
          },
          {
            "name": "nav",
            "type": "u64"
          },
          {
            "name": "total_shares",
            "type": "u128"
          },
          {
            "name": "f_sol",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Follower",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "wallet",
            "type": "pubkey"
          },
          {
            "name": "shares",
            "type": "u128"
          },
          {
            "name": "basis",
            "docs": [
              "high-water mark in lamports for the shares he holds: what he paid in, pro rata after partial exits. The fee is",
              "crystallised at the exit, on the realized excess only (so a profit later lost is never charged)"
            ],
            "type": "u64"
          },
          {
            "name": "deposited",
            "type": "u64"
          },
          {
            "name": "received",
            "type": "u64"
          },
          {
            "name": "fees_paid",
            "type": "u64"
          },
          {
            "name": "joined_at",
            "type": "i64"
          },
          {
            "name": "last_follow_at",
            "type": "i64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "KeySet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "kind",
            "docs": [
              "0 treasury, 1 admin proposed, 2 admin accepted"
            ],
            "type": "u8"
          },
          {
            "name": "key",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "Launched",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "symbol",
            "type": "string"
          },
          {
            "name": "uri",
            "type": "string"
          },
          {
            "name": "dev_buy",
            "type": "u64"
          },
          {
            "name": "dev_tokens",
            "type": "u64"
          },
          {
            "name": "launch_fee",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "LeadBuy",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "slot",
            "type": "u8"
          },
          {
            "name": "venue",
            "type": "u8"
          },
          {
            "name": "req_bps",
            "type": "u16"
          },
          {
            "name": "eff_ppb",
            "docs": [
              "effective share of each ledger's free SOL that was spent, in 1e-9 units (clamped by caps)"
            ],
            "type": "u64"
          },
          {
            "name": "f_sol_in",
            "type": "u64"
          },
          {
            "name": "l_sol_in",
            "type": "u64"
          },
          {
            "name": "f_tokens",
            "type": "u64"
          },
          {
            "name": "l_tokens",
            "type": "u64"
          },
          {
            "name": "median_q9",
            "type": "u64"
          },
          {
            "name": "price_q9",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "LeadSell",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "slot",
            "type": "u8"
          },
          {
            "name": "venue",
            "type": "u8"
          },
          {
            "name": "kind",
            "docs": [
              "0 leader sale, 1 sunset sale"
            ],
            "type": "u8"
          },
          {
            "name": "bps",
            "type": "u16"
          },
          {
            "name": "f_tokens",
            "type": "u64"
          },
          {
            "name": "f_sol",
            "type": "u64"
          },
          {
            "name": "l_tokens",
            "type": "u64"
          },
          {
            "name": "l_sol",
            "type": "u64"
          },
          {
            "name": "penalty",
            "type": "u64"
          },
          {
            "name": "median_q9",
            "type": "u64"
          },
          {
            "name": "closed",
            "type": "bool"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "LeaderMoved",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "deposit",
            "docs": [
              "true = deposit, false = withdraw"
            ],
            "type": "bool"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "l_sol",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Migrated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "ObsQ",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "price_q9",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Observed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "raw_q9",
            "type": "u64"
          },
          {
            "name": "stored_q9",
            "type": "u64"
          },
          {
            "name": "median_q9",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Pad",
      "docs": [
        "Pad-wide buckets: the $CLIFF buyback pool and the treasury share of creator fees.",
        "Invariant: lamports - rent == cliff_pool + treasury_pending."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "cliff_pool",
            "type": "u64"
          },
          {
            "name": "cliff_in",
            "type": "u64"
          },
          {
            "name": "cliff_spent",
            "type": "u64"
          },
          {
            "name": "cliff_burned",
            "type": "u64"
          },
          {
            "name": "cliff_buys",
            "type": "u32"
          },
          {
            "name": "donated",
            "type": "u64"
          },
          {
            "name": "treasury_pending",
            "type": "u64"
          },
          {
            "name": "treasury_paid",
            "type": "u64"
          },
          {
            "name": "last_buy_ts",
            "type": "i64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "PadMintSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "external",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "PadParams",
      "docs": [
        "The $CLIFF buyback (pad-wide bucket -> buy pad_mint -> burn)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "buy_max",
            "docs": [
              "most one buy may spend (the program sizes every chunk itself, SPEC 0.3)"
            ],
            "type": "u64"
          },
          {
            "name": "buy_impact_bps",
            "type": "u16"
          },
          {
            "name": "buy_slip_bps",
            "type": "u16"
          },
          {
            "name": "buy_gap_secs",
            "docs": [
              "at most one $CLIFF buy per gap"
            ],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "PausedSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "paused",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "Position",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "docs": [
              "Pubkey::default() = free slot"
            ],
            "type": "pubkey"
          },
          {
            "name": "f_tok",
            "docs": [
              "tokens of each ledger, and tokens already owned by pending exits (all sit in the purse's ATA)"
            ],
            "type": "u64"
          },
          {
            "name": "l_tok",
            "type": "u64"
          },
          {
            "name": "exit_tok",
            "type": "u64"
          },
          {
            "name": "f_cost",
            "docs": [
              "SOL cost basis of the tokens each ledger still holds"
            ],
            "type": "u64"
          },
          {
            "name": "l_cost",
            "type": "u64"
          },
          {
            "name": "opened_at",
            "type": "i64"
          },
          {
            "name": "last_buy_at",
            "type": "i64"
          },
          {
            "name": "last_trade_slot",
            "docs": [
              "one trade of this position per slot (buys, leader sales, exit sales, sunset sales)"
            ],
            "type": "u64"
          },
          {
            "name": "ata_rent",
            "docs": [
              "lamports the leader paid for the purse ATA (returned to his ledger when the position closes)"
            ],
            "type": "u64"
          },
          {
            "name": "f_in",
            "docs": [
              "cumulative SOL in / out per ledger, cliff penalties of this position"
            ],
            "type": "u64"
          },
          {
            "name": "l_in",
            "type": "u64"
          },
          {
            "name": "f_out",
            "type": "u64"
          },
          {
            "name": "l_out",
            "type": "u64"
          },
          {
            "name": "cliff_paid",
            "type": "u64"
          },
          {
            "name": "buys",
            "type": "u16"
          },
          {
            "name": "sells",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "PositionClosed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "slot",
            "type": "u8"
          },
          {
            "name": "f_in",
            "type": "u64"
          },
          {
            "name": "f_out",
            "type": "u64"
          },
          {
            "name": "l_in",
            "type": "u64"
          },
          {
            "name": "l_out",
            "type": "u64"
          },
          {
            "name": "ata_back",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "StraysBurned",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "burned",
            "type": "u64"
          },
          {
            "name": "ata_back",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "SunsetStarted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "last_leader_ts",
            "type": "i64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "TreasuryPaid",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Unfollowed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "flock",
            "type": "pubkey"
          },
          {
            "name": "wallet",
            "type": "pubkey"
          },
          {
            "name": "exit",
            "type": "pubkey"
          },
          {
            "name": "shares",
            "type": "u128"
          },
          {
            "name": "cash",
            "type": "u64"
          },
          {
            "name": "tokens",
            "type": {
              "array": [
                "u64",
                3
              ]
            }
          },
          {
            "name": "basis",
            "type": "u64"
          },
          {
            "name": "total_shares",
            "type": "u128"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    }
  ]
}