{
  "address": "6wXTwJwdtA5RhNu6VyYnBzrV51TbsMpTbo5kZv2zdssG",
  "metadata": {
    "name": "gated_bonding_curve",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "NFT-gated bonding curve demonstration"
  },
  "instructions": [
    {
      "name": "accept_authority_migration",
      "docs": ["`to` proves it holds the new key before any pool moves."],
      "discriminator": [35, 7, 48, 46, 103, 117, 62, 240],
      "accounts": [
        {
          "name": "to",
          "signer": true
        },
        {
          "name": "migration",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [97, 117, 116, 104, 111, 114, 105, 116, 121, 95, 109, 105, 103, 114, 97, 116, 105, 111, 110]
              },
              {
                "kind": "account",
                "path": "migration.from",
                "account": "AuthorityMigration"
              }
            ]
          }
        },
        {
          "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": "apply_authority_migration",
      "docs": [
        "Permissionless: move each pool in `remaining_accounts` whose authority is `from` to `to`.",
        "Pools on any other authority are skipped."
      ],
      "discriminator": [228, 107, 99, 28, 240, 71, 109, 73],
      "accounts": [
        {
          "name": "migration",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [97, 117, 116, 104, 111, 114, 105, 116, 121, 95, 109, 105, 103, 114, 97, 116, 105, 111, 110]
              },
              {
                "kind": "account",
                "path": "migration.from",
                "account": "AuthorityMigration"
              }
            ]
          }
        },
        {
          "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": "cancel_authority_migration",
      "docs": ["Close a migration record at any time. Pools already applied stay on `to`. Upgrade authority only."],
      "discriminator": [58, 144, 55, 217, 238, 18, 10, 171],
      "accounts": [
        {
          "name": "upgrade_authority",
          "signer": true
        },
        {
          "name": "program_data"
        },
        {
          "name": "migration",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [97, 117, 116, 104, 111, 114, 105, 116, 121, 95, 109, 105, 103, 114, 97, 116, 105, 111, 110]
              },
              {
                "kind": "account",
                "path": "migration.from",
                "account": "AuthorityMigration"
              }
            ]
          }
        },
        {
          "name": "rent_receiver",
          "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": "close_buyer_tally",
      "docs": ["Close a tally once every window has ended, refunding its rent to the buyer."],
      "discriminator": [120, 56, 215, 177, 5, 67, 253, 97],
      "accounts": [
        {
          "name": "buyer",
          "writable": true,
          "signer": true
        },
        {
          "name": "launch_rules",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [108, 97, 117, 110, 99, 104, 95, 114, 117, 108, 101, 115]
              },
              {
                "kind": "account",
                "path": "launch_rules.pool",
                "account": "LaunchRules"
              }
            ]
          }
        },
        {
          "name": "buyer_tally",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [98, 117, 121, 101, 114]
              },
              {
                "kind": "account",
                "path": "launch_rules.pool",
                "account": "LaunchRules"
              },
              {
                "kind": "account",
                "path": "buyer"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "collect_fees",
      "docs": [
        "Collect accumulated trading fees from the quote vault. Authority-only.",
        "Pays only fee distribution's canonical accounts for this mint (BE-1491 4.1 with the",
        "addendum's F3): `vault_token`, and on an exp curve also `creator_extra`."
      ],
      "discriminator": [164, 152, 207, 99, 30, 186, 19, 182],
      "accounts": [
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "pool_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
              },
              {
                "kind": "account",
                "path": "pool"
              }
            ]
          }
        },
        {
          "name": "quote_vault",
          "writable": true,
          "relations": ["pool"]
        },
        {
          "name": "fee_destination",
          "docs": ["Fee distribution's `vault_token` for this mint, owned by its fee vault. Kept at index 4."],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [118, 97, 117, 108, 116, 95, 116, 111, 107, 101, 110]
              },
              {
                "kind": "account",
                "path": "pool.base_mint",
                "account": "Pool"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                71, 77, 55, 189, 98, 169, 202, 199, 102, 8, 86, 25, 140, 243, 87, 198, 224, 185, 122, 174, 146, 215, 26,
                213, 80, 172, 94, 47, 57, 242, 75, 239
              ]
            }
          }
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "launch_rules",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [108, 97, 117, 110, 99, 104, 95, 114, 117, 108, 101, 115]
              },
              {
                "kind": "account",
                "path": "pool"
              }
            ]
          }
        },
        {
          "name": "fee_vault",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [102, 101, 101, 95, 118, 97, 117, 108, 116]
              },
              {
                "kind": "account",
                "path": "pool.base_mint",
                "account": "Pool"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                71, 77, 55, 189, 98, 169, 202, 199, 102, 8, 86, 25, 140, 243, 87, 198, 224, 185, 122, 174, 146, 215, 26,
                213, 80, 172, 94, 47, 57, 242, 75, 239
              ]
            }
          }
        },
        {
          "name": "creator_extra",
          "docs": ["Fee distribution's `creator_extra` for this mint. Required on an exp curve (fee_bps 200/300)."],
          "writable": true,
          "optional": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 114, 101, 97, 116, 111, 114, 95, 101, 120, 116, 114, 97]
              },
              {
                "kind": "account",
                "path": "pool.base_mint",
                "account": "Pool"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                71, 77, 55, 189, 98, 169, 202, 199, 102, 8, 86, 25, 140, 243, 87, 198, 224, 185, 122, 174, 146, 215, 26,
                213, 80, 172, 94, 47, 57, 242, 75, 239
              ]
            }
          }
        },
        {
          "name": "curve_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 114, 118, 101, 95, 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": "initialize_curve_config",
      "docs": ["Create the program-wide config with the co-signer off. Upgrade authority only."],
      "discriminator": [49, 101, 162, 60, 48, 97, 205, 46],
      "accounts": [
        {
          "name": "upgrade_authority",
          "signer": true
        },
        {
          "name": "program_data"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "curve_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 114, 118, 101, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "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": "initialize_pool",
      "docs": [
        "Initialize a new NFT-gated bonding curve pool with CLAMM parameters.",
        "Creates the token mint, mints total supply, creates metadata, revokes mint authority,",
        "and sets up the bonding curve pool — all in a single trustless instruction."
      ],
      "discriminator": [95, 180, 10, 172, 84, 174, 232, 40],
      "accounts": [
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "base_mint",
          "docs": ["The mint account to be created (must be a fresh keypair signer)"],
          "writable": true,
          "signer": true
        },
        {
          "name": "pool",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108]
              },
              {
                "kind": "account",
                "path": "base_mint"
              },
              {
                "kind": "account",
                "path": "quote_mint"
              }
            ]
          }
        },
        {
          "name": "pool_authority",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
              },
              {
                "kind": "account",
                "path": "pool"
              }
            ]
          }
        },
        {
          "name": "quote_mint"
        },
        {
          "name": "base_vault",
          "writable": true
        },
        {
          "name": "quote_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "pool_authority"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95,
                  91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "quote_mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
                132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "authority_base_account",
          "writable": true
        },
        {
          "name": "metadata",
          "writable": true
        },
        {
          "name": "fee_recipient"
        },
        {
          "name": "token_metadata_program",
          "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "launch_rules",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [108, 97, 117, 110, 99, 104, 95, 114, 117, 108, 101, 115]
              },
              {
                "kind": "account",
                "path": "pool"
              }
            ]
          }
        },
        {
          "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": "migration_threshold",
          "type": "u64"
        },
        {
          "name": "initial_base_supply",
          "type": "u64"
        },
        {
          "name": "enable_nft_gating",
          "type": "bool"
        },
        {
          "name": "fee_bps",
          "type": "u16"
        },
        {
          "name": "sqrt_start_price",
          "type": "u128"
        },
        {
          "name": "seg0_target_sqrt_price",
          "type": "u128"
        },
        {
          "name": "seg0_liquidity",
          "type": "u128"
        },
        {
          "name": "seg1_target_sqrt_price",
          "type": "u128"
        },
        {
          "name": "seg1_liquidity",
          "type": "u128"
        },
        {
          "name": "total_supply",
          "type": "u64"
        },
        {
          "name": "token_decimals",
          "type": "u8"
        },
        {
          "name": "token_name",
          "type": "string"
        },
        {
          "name": "token_symbol",
          "type": "string"
        },
        {
          "name": "token_uri",
          "type": "string"
        },
        {
          "name": "launch_rules",
          "type": {
            "option": {
              "defined": {
                "name": "LaunchRulesArgs"
              }
            }
          }
        }
      ]
    },
    {
      "name": "pause",
      "docs": ["Pause until `now + seconds`. Extends a live pause, never shortens one."],
      "discriminator": [211, 22, 221, 251, 74, 121, 193, 47],
      "accounts": [
        {
          "name": "curve_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 114, 118, 101, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "signer",
          "docs": ["Must be `pause_authority`"],
          "signer": 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": "seconds",
          "type": "i64"
        }
      ]
    },
    {
      "name": "propose_authority_migration",
      "docs": ["Propose moving every pool on `from` to `to`. Upgrade authority only (D-A)."],
      "discriminator": [207, 218, 130, 107, 109, 23, 58, 155],
      "accounts": [
        {
          "name": "upgrade_authority",
          "signer": true
        },
        {
          "name": "program_data"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "migration",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [97, 117, 116, 104, 111, 114, 105, 116, 121, 95, 109, 105, 103, 114, 97, 116, 105, 111, 110]
              },
              {
                "kind": "arg",
                "path": "from"
              }
            ]
          }
        },
        {
          "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": "from",
          "type": "pubkey"
        },
        {
          "name": "to",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "register_buyer",
      "docs": [
        "Create the buyer's tally for a pool with rules. A non-dev buyer needs a valid allowlist",
        "proof while an allowlist phase is in force; the configured dev buyer needs none."
      ],
      "discriminator": [144, 92, 137, 46, 209, 220, 27, 164],
      "accounts": [
        {
          "name": "buyer",
          "signer": true
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "launch_rules",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [108, 97, 117, 110, 99, 104, 95, 114, 117, 108, 101, 115]
              },
              {
                "kind": "account",
                "path": "launch_rules.pool",
                "account": "LaunchRules"
              }
            ]
          }
        },
        {
          "name": "buyer_tally",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [98, 117, 121, 101, 114]
              },
              {
                "kind": "account",
                "path": "launch_rules.pool",
                "account": "LaunchRules"
              },
              {
                "kind": "account",
                "path": "buyer"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "proof",
          "type": {
            "vec": {
              "array": ["u8", 32]
            }
          }
        }
      ]
    },
    {
      "name": "set_migration_cosigner",
      "docs": ["Turn the withdraw co-signer on (`Some`) or off (`None`). Upgrade authority only."],
      "discriminator": [51, 223, 117, 114, 216, 26, 111, 113],
      "accounts": [
        {
          "name": "upgrade_authority",
          "signer": true
        },
        {
          "name": "program_data"
        },
        {
          "name": "curve_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 114, 118, 101, 95, 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": "cosigner",
          "type": {
            "option": "pubkey"
          }
        }
      ]
    },
    {
      "name": "set_pause_authority",
      "docs": ["Set or clear the key that may pause. Upgrade authority only."],
      "discriminator": [127, 70, 214, 12, 172, 8, 89, 114],
      "accounts": [
        {
          "name": "upgrade_authority",
          "signer": true
        },
        {
          "name": "program_data"
        },
        {
          "name": "curve_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 114, 118, 101, 95, 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": "pause_authority",
          "type": {
            "option": "pubkey"
          }
        }
      ]
    },
    {
      "name": "swap_base_to_quote",
      "docs": ["Swap base tokens for quote tokens (sell)", "Selling is always allowed (no NFT gating for sells)"],
      "discriminator": [19, 60, 200, 100, 34, 177, 72, 204],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "pool",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108]
              },
              {
                "kind": "account",
                "path": "pool.base_mint",
                "account": "Pool"
              },
              {
                "kind": "account",
                "path": "pool.quote_mint",
                "account": "Pool"
              }
            ]
          }
        },
        {
          "name": "pool_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
              },
              {
                "kind": "account",
                "path": "pool"
              }
            ]
          }
        },
        {
          "name": "base_vault",
          "writable": true
        },
        {
          "name": "quote_vault",
          "writable": true
        },
        {
          "name": "user_base_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "payer"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95,
                  91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "pool.base_mint",
                "account": "Pool"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
                132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "user_quote_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "payer"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95,
                  91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "pool.quote_mint",
                "account": "Pool"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
                132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "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_in",
          "type": "u64"
        },
        {
          "name": "minimum_amount_out",
          "type": "u64"
        }
      ]
    },
    {
      "name": "swap_quote_to_base",
      "docs": [
        "Swap quote tokens for base tokens (buy)",
        "If NFT gating is enabled and pool hasn't migrated, requires MintRecord proof"
      ],
      "discriminator": [58, 30, 190, 32, 188, 101, 164, 184],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "pool",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108]
              },
              {
                "kind": "account",
                "path": "pool.base_mint",
                "account": "Pool"
              },
              {
                "kind": "account",
                "path": "pool.quote_mint",
                "account": "Pool"
              }
            ]
          }
        },
        {
          "name": "pool_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
              },
              {
                "kind": "account",
                "path": "pool"
              }
            ]
          }
        },
        {
          "name": "base_vault",
          "writable": true
        },
        {
          "name": "quote_vault",
          "writable": true
        },
        {
          "name": "user_base_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "payer"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95,
                  91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "pool.base_mint",
                "account": "Pool"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
                132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "user_quote_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "payer"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95,
                  91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "pool.quote_mint",
                "account": "Pool"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
                132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "mint_record",
          "docs": [
            "The MintRecord PDA from the Believer NFT program",
            "Required if NFT gating is enabled and pool hasn't migrated"
          ],
          "optional": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "launch_rules",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [108, 97, 117, 110, 99, 104, 95, 114, 117, 108, 101, 115]
              },
              {
                "kind": "account",
                "path": "pool"
              }
            ]
          }
        },
        {
          "name": "buyer_tally",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [98, 117, 121, 101, 114]
              },
              {
                "kind": "account",
                "path": "pool"
              },
              {
                "kind": "account",
                "path": "payer"
              }
            ]
          }
        },
        {
          "name": "curve_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 114, 118, 101, 95, 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": "amount_in",
          "type": "u64"
        },
        {
          "name": "minimum_amount_out",
          "type": "u64"
        }
      ]
    },
    {
      "name": "unpause",
      "docs": [
        "End a pause now. The pause authority or the upgrade authority; the latter works even with",
        "`pause_authority = None`, the recovery path (`set_pause_authority(None)` then this)."
      ],
      "discriminator": [169, 144, 4, 38, 10, 141, 188, 255],
      "accounts": [
        {
          "name": "curve_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 114, 118, 101, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "program_data"
        },
        {
          "name": "signer",
          "docs": ["`pause_authority` or the upgrade authority"],
          "signer": 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": "update_nft_gating",
      "docs": ["Admin function to update NFT gating settings"],
      "discriminator": [195, 235, 21, 213, 78, 122, 248, 77],
      "accounts": [
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "curve_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 114, 118, 101, 95, 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": "enabled",
          "type": "bool"
        },
        {
          "name": "nft_program_id",
          "type": {
            "option": "pubkey"
          }
        }
      ]
    },
    {
      "name": "withdraw_for_migration",
      "docs": [
        "Withdraw all liquidity from vaults after migration for creating a DAMM v2 pool.",
        "Only callable by authority after pool has migrated."
      ],
      "discriminator": [229, 30, 82, 104, 62, 251, 75, 69],
      "accounts": [
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "pool_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]
              },
              {
                "kind": "account",
                "path": "pool"
              }
            ]
          }
        },
        {
          "name": "base_vault",
          "writable": true
        },
        {
          "name": "quote_vault",
          "writable": true
        },
        {
          "name": "authority_base_account",
          "docs": ["W1: the pool authority's own associated token accounts, nothing else."],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "pool.authority",
                "account": "Pool"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95,
                  91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "pool.base_mint",
                "account": "Pool"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
                132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "authority_quote_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "pool.authority",
                "account": "Pool"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95,
                  91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "pool.quote_mint",
                "account": "Pool"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
                132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "curve_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 114, 118, 101, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "cosigner",
          "docs": ["Required only when curve_config names a co-signer."],
          "signer": true,
          "optional": 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": []
    }
  ],
  "accounts": [
    {
      "name": "AuthorityMigration",
      "discriminator": [107, 212, 162, 156, 172, 50, 131, 223]
    },
    {
      "name": "BuyerTally",
      "discriminator": [179, 13, 98, 1, 24, 107, 206, 149]
    },
    {
      "name": "CurveConfig",
      "discriminator": [96, 75, 211, 144, 193, 36, 243, 41]
    },
    {
      "name": "LaunchRules",
      "discriminator": [238, 73, 71, 29, 231, 48, 39, 141]
    },
    {
      "name": "Pool",
      "discriminator": [241, 154, 109, 4, 17, 177, 109, 188]
    }
  ],
  "events": [
    {
      "name": "AuthorityMigrationAccepted",
      "discriminator": [126, 228, 95, 7, 132, 212, 248, 77]
    },
    {
      "name": "AuthorityMigrationCancelled",
      "discriminator": [150, 19, 112, 193, 19, 0, 25, 57]
    },
    {
      "name": "AuthorityMigrationProposed",
      "discriminator": [104, 17, 116, 96, 118, 63, 38, 227]
    },
    {
      "name": "FeesCollected",
      "discriminator": [233, 23, 117, 225, 107, 178, 254, 8]
    },
    {
      "name": "FeesSplit",
      "discriminator": [184, 151, 122, 249, 135, 3, 6, 129]
    },
    {
      "name": "LaunchRuleApplied",
      "discriminator": [195, 14, 189, 102, 22, 171, 210, 63]
    },
    {
      "name": "LaunchRulesCreated",
      "discriminator": [57, 161, 100, 218, 155, 218, 115, 92]
    },
    {
      "name": "MigrationCosignerSet",
      "discriminator": [69, 135, 52, 10, 255, 177, 236, 122]
    },
    {
      "name": "MigrationWithdrawn",
      "discriminator": [113, 119, 224, 21, 172, 69, 136, 249]
    },
    {
      "name": "NftGatingUpdated",
      "discriminator": [112, 176, 134, 6, 63, 230, 66, 215]
    },
    {
      "name": "PauseAuthoritySet",
      "discriminator": [177, 33, 27, 216, 181, 96, 84, 145]
    },
    {
      "name": "Paused",
      "discriminator": [172, 248, 5, 253, 49, 255, 255, 232]
    },
    {
      "name": "PoolAuthorityChanged",
      "discriminator": [220, 1, 235, 249, 72, 216, 156, 107]
    },
    {
      "name": "PoolInitialized",
      "discriminator": [100, 118, 173, 87, 12, 198, 254, 229]
    },
    {
      "name": "PoolMigrated",
      "discriminator": [250, 204, 24, 195, 37, 253, 152, 6]
    },
    {
      "name": "SwapExecuted",
      "discriminator": [150, 166, 26, 225, 28, 89, 38, 79]
    },
    {
      "name": "Unpaused",
      "discriminator": [156, 150, 47, 174, 120, 216, 93, 117]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "NftGatingRequired",
      "msg": "NFT gating is enabled - mint_record account required"
    },
    {
      "code": 6001,
      "name": "InvalidMintRecordOwner",
      "msg": "Invalid mint record - account owner does not match NFT program"
    },
    {
      "code": 6002,
      "name": "NftNotFound",
      "msg": "NFT not found - mint record account is empty or invalid"
    },
    {
      "code": 6003,
      "name": "InvalidMintRecordData",
      "msg": "Invalid mint record data - could not parse wallet"
    },
    {
      "code": 6004,
      "name": "MintRecordWalletMismatch",
      "msg": "Mint record wallet does not match swap payer"
    },
    {
      "code": 6005,
      "name": "InvalidAmount",
      "msg": "Invalid swap amount"
    },
    {
      "code": 6006,
      "name": "SlippageExceeded",
      "msg": "Slippage tolerance exceeded"
    },
    {
      "code": 6007,
      "name": "InsufficientLiquidity",
      "msg": "Insufficient liquidity in pool"
    },
    {
      "code": 6008,
      "name": "InvalidVault",
      "msg": "Invalid vault account"
    },
    {
      "code": 6009,
      "name": "Unauthorized",
      "msg": "Not authorized"
    },
    {
      "code": 6010,
      "name": "Overflow",
      "msg": "Arithmetic overflow"
    },
    {
      "code": 6011,
      "name": "Underflow",
      "msg": "Arithmetic underflow"
    },
    {
      "code": 6012,
      "name": "DivisionByZero",
      "msg": "Division by zero"
    },
    {
      "code": 6013,
      "name": "PoolNotMigrated",
      "msg": "Pool has not migrated yet"
    },
    {
      "code": 6014,
      "name": "InvalidCurveParams",
      "msg": "Invalid curve parameters"
    },
    {
      "code": 6015,
      "name": "NoFeesToCollect",
      "msg": "No fees to collect"
    },
    {
      "code": 6016,
      "name": "InvalidMintAuthority",
      "msg": "Invalid mint authority - mint and freeze authority must be None"
    },
    {
      "code": 6017,
      "name": "InvalidMintSupply",
      "msg": "Invalid mint supply - does not match expected initial supply"
    },
    {
      "code": 6018,
      "name": "InvalidFeeDestination",
      "msg": "Fee destination is not this pool's fee distribution account"
    },
    {
      "code": 6019,
      "name": "InvalidNftProgram",
      "msg": "NFT gating program must be the Believer NFT program"
    },
    {
      "code": 6020,
      "name": "InvalidNewAuthority",
      "msg": "New authority must differ from the old one and not be the default key"
    },
    {
      "code": 6021,
      "name": "MigrationAlreadyAccepted",
      "msg": "Authority migration already accepted"
    },
    {
      "code": 6022,
      "name": "MigrationNotAccepted",
      "msg": "Authority migration not accepted"
    },
    {
      "code": 6023,
      "name": "InvalidPool",
      "msg": "Account is not a pool of this program"
    },
    {
      "code": 6024,
      "name": "CosignerRequired",
      "msg": "Migration co-signer signature required"
    },
    {
      "code": 6025,
      "name": "InvalidCurveConfig",
      "msg": "Invalid curve config account"
    },
    {
      "code": 6026,
      "name": "InvalidLaunchRules",
      "msg": "Invalid launch rules"
    },
    {
      "code": 6027,
      "name": "InvalidBuyerTally",
      "msg": "Invalid buyer tally account"
    },
    {
      "code": 6028,
      "name": "NotOpen",
      "msg": "Pool is not open yet"
    },
    {
      "code": 6029,
      "name": "BuyerNotRegistered",
      "msg": "Buyer is not registered for this pool"
    },
    {
      "code": 6030,
      "name": "DevBuyExceeded",
      "msg": "Dev buy exceeds dev_buy_max"
    },
    {
      "code": 6031,
      "name": "NotAllowlisted",
      "msg": "Buyer is not on the allowlist"
    },
    {
      "code": 6032,
      "name": "WalletCapExceeded",
      "msg": "Buy exceeds the per-wallet cap"
    },
    {
      "code": 6033,
      "name": "WindowOpen",
      "msg": "A launch window is still open"
    },
    {
      "code": 6034,
      "name": "Paused",
      "msg": "Paused"
    },
    {
      "code": 6035,
      "name": "InvalidPauseLength",
      "msg": "Pause length must be 1 to MAX_PAUSE_SECS seconds"
    }
  ],
  "types": [
    {
      "name": "AuthorityMigration",
      "docs": ["One authority migration per retired key, PDA `[b\"authority_migration\", from]` (BE-1491 5.1)."],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "from",
            "type": "pubkey"
          },
          {
            "name": "to",
            "type": "pubkey"
          },
          {
            "name": "accepted",
            "type": "bool"
          },
          {
            "name": "proposed_slot",
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "AuthorityMigrationAccepted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "from",
            "type": "pubkey"
          },
          {
            "name": "to",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "AuthorityMigrationCancelled",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "from",
            "type": "pubkey"
          },
          {
            "name": "to",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "AuthorityMigrationProposed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "from",
            "type": "pubkey"
          },
          {
            "name": "to",
            "type": "pubkey"
          },
          {
            "name": "proposed_slot",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "BuyerTally",
      "docs": ["A buyer's spend on one pool with rules, PDA `[b\"buyer\", pool, buyer]` (addendum 4.3)."],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "buyer",
            "type": "pubkey"
          },
          {
            "name": "spent",
            "type": "u64"
          },
          {
            "name": "allowlisted",
            "type": "bool"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "CurveConfig",
      "docs": [
        "Program-wide config, PDA `[b\"curve_config\"]` (BE-1491 6.1, extended by addendum 11.2). A new",
        "account type: none exists on chain until `initialize_curve_config` runs after the upgrade.",
        "Paused means `now < paused_until`; an empty address means running."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "migration_cosigner",
            "docs": ["`None` = co-signer off."],
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "pause_authority",
            "docs": ["The key that may pause; `None` = nobody may pause"],
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "paused_until",
            "docs": ["0 = running"],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "FeesCollected",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "destination",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "FeesSplit",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "to_fee_vault",
            "type": "u64"
          },
          {
            "name": "to_creator_extra",
            "type": "u64"
          },
          {
            "name": "snipe_fees_used",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "LaunchRuleApplied",
      "docs": ["Fires only when a rule changed a buy's outcome: a pre-open dev buy, or a sniper surcharge."],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "extra_fee_bps",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "LaunchRules",
      "docs": [
        "A pool's launch rules, PDA `[b\"launch_rules\", pool]` (addendum 4.2). Created only by",
        "`initialize_pool`; never updated or closed."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "created_at",
            "docs": ["Clock at creation; the sniper-fee clock starts here when open_at is 0"],
            "type": "i64"
          },
          {
            "name": "open_at",
            "docs": ["0 = open at creation"],
            "type": "i64"
          },
          {
            "name": "dev_buyer",
            "docs": ["Pubkey::default() = no exemption"],
            "type": "pubkey"
          },
          {
            "name": "dev_buy_max",
            "docs": ["Quote units the dev buyer may spend before open_at"],
            "type": "u64"
          },
          {
            "name": "allowlist_root",
            "docs": ["All zero = no allowlist phase"],
            "type": {
              "array": ["u8", 32]
            }
          },
          {
            "name": "allowlist_until",
            "type": "i64"
          },
          {
            "name": "max_buy_per_wallet",
            "docs": ["Quote units; 0 = no cap"],
            "type": "u64"
          },
          {
            "name": "cap_until",
            "type": "i64"
          },
          {
            "name": "snipe_fee_start_bps",
            "docs": ["0 = no sniper fee"],
            "type": "u16"
          },
          {
            "name": "snipe_fee_decay_secs",
            "type": "u32"
          },
          {
            "name": "snipe_fees_accrued",
            "docs": ["The sniper share of pool.accumulated_fees, consumed by collect_fees (addendum section 6)"],
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "LaunchRulesArgs",
      "docs": ["`initialize_pool`'s launch-rules argument; bounds in `validate_launch_rules`."],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "open_at",
            "type": "i64"
          },
          {
            "name": "dev_buyer",
            "type": "pubkey"
          },
          {
            "name": "dev_buy_max",
            "type": "u64"
          },
          {
            "name": "allowlist_root",
            "type": {
              "array": ["u8", 32]
            }
          },
          {
            "name": "allowlist_until",
            "type": "i64"
          },
          {
            "name": "max_buy_per_wallet",
            "type": "u64"
          },
          {
            "name": "cap_until",
            "type": "i64"
          },
          {
            "name": "snipe_fee_start_bps",
            "type": "u16"
          },
          {
            "name": "snipe_fee_decay_secs",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "LaunchRulesCreated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "open_at",
            "type": "i64"
          },
          {
            "name": "dev_buyer",
            "type": "pubkey"
          },
          {
            "name": "dev_buy_max",
            "type": "u64"
          },
          {
            "name": "allowlist_root",
            "type": {
              "array": ["u8", 32]
            }
          },
          {
            "name": "allowlist_until",
            "type": "i64"
          },
          {
            "name": "max_buy_per_wallet",
            "type": "u64"
          },
          {
            "name": "cap_until",
            "type": "i64"
          },
          {
            "name": "snipe_fee_start_bps",
            "type": "u16"
          },
          {
            "name": "snipe_fee_decay_secs",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "MigrationCosignerSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "cosigner",
            "type": {
              "option": "pubkey"
            }
          }
        ]
      }
    },
    {
      "name": "MigrationWithdrawn",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "base_amount",
            "type": "u64"
          },
          {
            "name": "quote_amount",
            "type": "u64"
          },
          {
            "name": "accumulated_fees",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "NftGatingConfig",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "nft_program_id",
            "docs": ["The NFT program that issues gating NFTs"],
            "type": "pubkey"
          },
          {
            "name": "enabled",
            "docs": ["Whether NFT gating is currently enabled"],
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "NftGatingUpdated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "enabled",
            "type": "bool"
          },
          {
            "name": "nft_program_id",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "PauseAuthoritySet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pause_authority",
            "type": {
              "option": "pubkey"
            }
          }
        ]
      }
    },
    {
      "name": "Paused",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "until",
            "type": "i64"
          },
          {
            "name": "by",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "Pool",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "docs": ["Pool authority (admin)"],
            "type": "pubkey"
          },
          {
            "name": "base_mint",
            "docs": ["Base token mint (the token being sold on the curve)"],
            "type": "pubkey"
          },
          {
            "name": "quote_mint",
            "docs": ["Quote token mint (e.g., SOL or USDC)"],
            "type": "pubkey"
          },
          {
            "name": "base_vault",
            "docs": ["Base token vault"],
            "type": "pubkey"
          },
          {
            "name": "quote_vault",
            "docs": ["Quote token vault"],
            "type": "pubkey"
          },
          {
            "name": "quote_reserve",
            "docs": ["Current quote token reserve (tracks total SOL for migration check)"],
            "type": "u64"
          },
          {
            "name": "base_reserve",
            "docs": ["Current base token reserve (tracks remaining tokens)"],
            "type": "u64"
          },
          {
            "name": "migration_threshold",
            "docs": ["Quote amount threshold for migration"],
            "type": "u64"
          },
          {
            "name": "is_migrated",
            "docs": ["Whether pool has migrated (NFT gating disabled after migration)"],
            "type": "bool"
          },
          {
            "name": "nft_gating",
            "docs": ["NFT gating configuration"],
            "type": {
              "defined": {
                "name": "NftGatingConfig"
              }
            }
          },
          {
            "name": "bump",
            "docs": ["PDA bump"],
            "type": "u8"
          },
          {
            "name": "fee_bps",
            "docs": ["Trading fee in basis points (100 = 1%)"],
            "type": "u16"
          },
          {
            "name": "accumulated_fees",
            "docs": ["Accumulated trading fees in quote token"],
            "type": "u64"
          },
          {
            "name": "fee_recipient",
            "docs": ["Fee recipient address"],
            "type": "pubkey"
          },
          {
            "name": "sqrt_price",
            "docs": ["Current sqrt price position on the CLAMM curve (Q64 fixed-point)"],
            "type": "u128"
          },
          {
            "name": "sqrt_start_price",
            "docs": ["Initial sqrt price at pool creation (Q64 fixed-point)"],
            "type": "u128"
          },
          {
            "name": "seg0_target_sqrt_price",
            "docs": ["Boundary between segment 0 and segment 1 (Q64)"],
            "type": "u128"
          },
          {
            "name": "seg0_liquidity",
            "docs": ["Liquidity depth in segment 0"],
            "type": "u128"
          },
          {
            "name": "seg1_target_sqrt_price",
            "docs": ["Upper boundary of segment 1 / graduation price (Q64)"],
            "type": "u128"
          },
          {
            "name": "seg1_liquidity",
            "docs": ["Liquidity depth in segment 1"],
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "PoolAuthorityChanged",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "from",
            "type": "pubkey"
          },
          {
            "name": "to",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "PoolInitialized",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "base_mint",
            "type": "pubkey"
          },
          {
            "name": "quote_mint",
            "type": "pubkey"
          },
          {
            "name": "migration_threshold",
            "type": "u64"
          },
          {
            "name": "nft_gating_enabled",
            "type": "bool"
          },
          {
            "name": "fee_bps",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "PoolMigrated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "final_quote_reserve",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "SwapExecuted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "amount_in",
            "type": "u64"
          },
          {
            "name": "amount_out",
            "type": "u64"
          },
          {
            "name": "fee",
            "type": "u64"
          },
          {
            "name": "is_buy",
            "type": "bool"
          },
          {
            "name": "quote_reserve",
            "type": "u64"
          },
          {
            "name": "base_reserve",
            "type": "u64"
          },
          {
            "name": "migration_threshold",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Unpaused",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "by",
            "type": "pubkey"
          }
        ]
      }
    }
  ]
}
