{
  "address": "9GMVRdY66xm3SZQEvedDso14Ekwg2iEkWEJo1z1YqZfG",
  "metadata": {
    "name": "bagggr",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "bagggr: launch a meme, pair it with anything, trade it on a linear curve, graduate to Raydium CPMM"
  },
  "instructions": [
    {
      "name": "buy",
      "docs": [
        "Buy `token_amount` (base units) for at most `max_quote_in` (base",
        "units of the pair asset, fee included). Cut down to what the curve",
        "has left; the curve is complete when it sells out."
      ],
      "discriminator": [
        102,
        6,
        61,
        18,
        1,
        218,
        235,
        234
      ],
      "accounts": [
        {
          "name": "buyer",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "market_signer",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  105,
                  103,
                  110,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "mint",
          "relations": [
            "market"
          ]
        },
        {
          "name": "quote_mint",
          "relations": [
            "market"
          ]
        },
        {
          "name": "token_vault",
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "quote_vault",
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "buyer_token",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "buyer"
              },
              {
                "kind": "account",
                "path": "token_program"
              },
              {
                "kind": "account",
                "path": "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": "buyer_quote",
          "writable": true
        },
        {
          "name": "treasury_quote",
          "writable": true
        },
        {
          "name": "token_program",
          "docs": [
            "Token-2022: every launched token carries the transfer-fee extension."
          ]
        },
        {
          "name": "quote_token_program"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "token_amount",
          "type": "u64"
        },
        {
          "name": "max_quote_in",
          "type": "u64"
        }
      ]
    },
    {
      "name": "convert",
      "docs": [
        "Sell a conversion vault for SOL through the configured converter",
        "program (the swap instruction comes from the pusher, its accounts as",
        "remaining accounts) and pay the treasury and the pusher in SOL."
      ],
      "discriminator": [
        122,
        80,
        212,
        208,
        92,
        200,
        34,
        161
      ],
      "accounts": [
        {
          "name": "pusher",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "conversion",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  118,
                  101,
                  114,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "quote_mint"
              }
            ]
          }
        },
        {
          "name": "quote_mint",
          "relations": [
            "conversion"
          ]
        },
        {
          "name": "wsol_mint",
          "address": "So11111111111111111111111111111111111111112"
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "conversion"
              },
              {
                "kind": "account",
                "path": "quote_token_program"
              },
              {
                "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": "wsol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "conversion"
              },
              {
                "kind": "account",
                "path": "token_program"
              },
              {
                "kind": "account",
                "path": "wsol_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": "treasury",
          "writable": true
        },
        {
          "name": "swap_program"
        },
        {
          "name": "quote_token_program"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "swap_data",
          "type": "bytes"
        },
        {
          "name": "min_lamports_out",
          "type": "u64"
        }
      ]
    },
    {
      "name": "create_market",
      "discriminator": [
        103,
        226,
        97,
        235,
        200,
        188,
        251,
        254
      ],
      "accounts": [
        {
          "name": "creator",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "mint",
          "docs": [
            "Token-2022 mint with the transfer-fee extension, which Anchor's init",
            "constraints cannot express."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "quote_mint"
        },
        {
          "name": "market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "market_signer",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  105,
                  103,
                  110,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "reward_signer",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  101,
                  119,
                  97,
                  114,
                  100,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "token_vault",
          "writable": true
        },
        {
          "name": "quote_vault",
          "writable": true
        },
        {
          "name": "reward_vault",
          "writable": true
        },
        {
          "name": "metadata",
          "writable": true
        },
        {
          "name": "metadata_program",
          "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
        },
        {
          "name": "sysvar_instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "token_program",
          "docs": [
            "Must be Token-2022; checked in the handler."
          ]
        },
        {
          "name": "quote_token_program"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "CreateMarketParams"
            }
          }
        }
      ]
    },
    {
      "name": "graduate",
      "docs": [
        "Anyone may call this once the curve is complete: seeds the Raydium",
        "CPMM pool and burns the LP. Remaining accounts are forwarded to",
        "Raydium: its `support_mint` allow-list entry when the pair asset is",
        "a Token-2022 mint Raydium does not accept by itself."
      ],
      "discriminator": [
        45,
        235,
        225,
        181,
        17,
        218,
        64,
        130
      ],
      "accounts": [
        {
          "name": "payer",
          "docs": [
            "Anyone. Pays nothing but the transaction fee."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "market_signer",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  105,
                  103,
                  110,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "mint",
          "relations": [
            "market"
          ]
        },
        {
          "name": "quote_mint",
          "relations": [
            "market"
          ]
        },
        {
          "name": "token_vault",
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "quote_vault",
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "cp_swap_program"
        },
        {
          "name": "amm_config"
        },
        {
          "name": "authority"
        },
        {
          "name": "pool_state",
          "writable": true
        },
        {
          "name": "lp_mint",
          "writable": true
        },
        {
          "name": "market_lp",
          "writable": true
        },
        {
          "name": "token_0_vault",
          "writable": true
        },
        {
          "name": "token_1_vault",
          "writable": true
        },
        {
          "name": "create_pool_fee",
          "writable": true
        },
        {
          "name": "observation_state",
          "writable": true
        },
        {
          "name": "token_program",
          "docs": [
            "Classic SPL Token: the LP mint Raydium creates, and the LP burn."
          ],
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "base_token_program",
          "docs": [
            "Token-2022, for the launched token."
          ]
        },
        {
          "name": "quote_token_program"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "init_conversion",
      "docs": [
        "Once per pair asset that is not SOL: the account that holds the",
        "treasury's and the pusher's shares in that asset until converted."
      ],
      "discriminator": [
        52,
        241,
        41,
        198,
        155,
        233,
        135,
        126
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "quote_mint"
        },
        {
          "name": "wsol_mint",
          "address": "So11111111111111111111111111111111111111112"
        },
        {
          "name": "conversion",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  118,
                  101,
                  114,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "quote_mint"
              }
            ]
          }
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "conversion"
              },
              {
                "kind": "account",
                "path": "quote_token_program"
              },
              {
                "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": "wsol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "conversion"
              },
              {
                "kind": "account",
                "path": "token_program"
              },
              {
                "kind": "account",
                "path": "wsol_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": "quote_token_program"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "initialize_config",
      "discriminator": [
        208,
        127,
        21,
        1,
        194,
        190,
        196,
        70
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "ConfigParams"
            }
          }
        }
      ]
    },
    {
      "name": "migrate_config",
      "docs": [
        "Grow a config from an earlier layout; then update_config sets the new fields."
      ],
      "discriminator": [
        92,
        131,
        58,
        105,
        210,
        154,
        224,
        193
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "push_rewards",
      "docs": [
        "Distribute the tax pot. The withheld fees are pulled from the mint",
        "into the reward vault and sold for the pair asset (into the curve",
        "before graduation, into the Raydium pool after; at least",
        "`min_quote_out`). The protocol's share and at most",
        "`pusher_fee_request` (capped by config) for the pusher are paid in",
        "SOL: right away on SOL pairs, through `convert` on any other. The",
        "rest goes in the pair asset to the creator's fee wallet or, pro rata",
        "by balance, to the holders passed as remaining accounts (pairs of",
        "token account, payout account: the wallet itself on SOL pairs, the",
        "pair-asset account otherwise). Holder pushes are restricted to the",
        "configured pusher, which chooses the recipients."
      ],
      "discriminator": [
        202,
        153,
        45,
        133,
        98,
        8,
        43,
        165
      ],
      "accounts": [
        {
          "name": "pusher",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "market_signer",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  105,
                  103,
                  110,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "reward_signer",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  101,
                  119,
                  97,
                  114,
                  100,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "mint",
          "docs": [
            "Mutable: withdrawing withheld fees changes the mint's withheld total."
          ],
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "quote_mint",
          "relations": [
            "market"
          ]
        },
        {
          "name": "token_vault",
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "quote_vault",
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "reward_vault",
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "scratch",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  99,
                  114,
                  97,
                  116,
                  99,
                  104
                ]
              },
              {
                "kind": "account",
                "path": "market"
              }
            ]
          }
        },
        {
          "name": "conversion",
          "docs": [
            "Pair assets other than SOL: where the protocol's and the pusher's",
            "shares wait for `convert`."
          ],
          "writable": true,
          "optional": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  118,
                  101,
                  114,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "quote_mint"
              }
            ]
          }
        },
        {
          "name": "conversion_vault",
          "writable": true,
          "optional": true
        },
        {
          "name": "fee_wallet_payout",
          "docs": [
            "asset account (other pairs). Verified in the handler."
          ],
          "writable": true,
          "optional": true
        },
        {
          "name": "cp_swap_program",
          "optional": true
        },
        {
          "name": "amm_config",
          "optional": true
        },
        {
          "name": "cp_authority",
          "optional": true
        },
        {
          "name": "pool_state",
          "writable": true,
          "optional": true
        },
        {
          "name": "pool_token_vault",
          "writable": true,
          "optional": true
        },
        {
          "name": "pool_quote_vault",
          "writable": true,
          "optional": true
        },
        {
          "name": "observation_state",
          "writable": true,
          "optional": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "quote_token_program"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "pusher_fee_request",
          "type": "u64"
        },
        {
          "name": "min_quote_out",
          "type": "u64"
        }
      ]
    },
    {
      "name": "sell",
      "docs": [
        "Sell `token_amount` back to the curve for at least `min_quote_out`",
        "(after the fee)."
      ],
      "discriminator": [
        51,
        230,
        133,
        164,
        1,
        127,
        131,
        173
      ],
      "accounts": [
        {
          "name": "seller",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "market_signer",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  105,
                  103,
                  110,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "mint",
          "relations": [
            "market"
          ]
        },
        {
          "name": "quote_mint",
          "relations": [
            "market"
          ]
        },
        {
          "name": "token_vault",
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "quote_vault",
          "writable": true,
          "relations": [
            "market"
          ]
        },
        {
          "name": "seller_token",
          "writable": true
        },
        {
          "name": "seller_quote",
          "writable": true
        },
        {
          "name": "treasury_quote",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "quote_token_program"
        }
      ],
      "args": [
        {
          "name": "token_amount",
          "type": "u64"
        },
        {
          "name": "min_quote_out",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_config",
      "discriminator": [
        29,
        158,
        252,
        191,
        10,
        83,
        219,
        99
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "ConfigParams"
            }
          }
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "Config",
      "discriminator": [
        155,
        12,
        170,
        224,
        30,
        250,
        204,
        130
      ]
    },
    {
      "name": "Conversion",
      "discriminator": [
        166,
        162,
        161,
        65,
        158,
        55,
        109,
        27
      ]
    },
    {
      "name": "Market",
      "discriminator": [
        219,
        190,
        213,
        55,
        0,
        227,
        198,
        154
      ]
    }
  ],
  "events": [
    {
      "name": "Graduated",
      "discriminator": [
        51,
        241,
        66,
        50,
        140,
        245,
        156,
        192
      ]
    },
    {
      "name": "MarketCreated",
      "discriminator": [
        88,
        184,
        130,
        231,
        226,
        84,
        6,
        58
      ]
    },
    {
      "name": "Trade",
      "discriminator": [
        24,
        254,
        218,
        152,
        253,
        43,
        18,
        81
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "BadBps",
      "msg": "Basis points must be at most 10,000"
    },
    {
      "code": 6001,
      "name": "BadSupplySplit",
      "msg": "Supply for sale must be below the total supply"
    },
    {
      "code": 6002,
      "name": "BadPriceMultiple",
      "msg": "Price multiple must be at least 1"
    },
    {
      "code": 6003,
      "name": "BadGraduationReserve",
      "msg": "Graduation reserve must be positive"
    },
    {
      "code": 6004,
      "name": "StringTooLong",
      "msg": "Name, symbol or URI is too long"
    },
    {
      "code": 6005,
      "name": "BadInterval",
      "msg": "Reward push interval must be 15, 30, 60, 360, 720 or 1440 minutes"
    },
    {
      "code": 6006,
      "name": "MissingFeeWallet",
      "msg": "Creator rewards need a fee wallet"
    },
    {
      "code": 6007,
      "name": "CurveClosed",
      "msg": "The curve is not open for trading"
    },
    {
      "code": 6008,
      "name": "ZeroAmount",
      "msg": "Amount must be positive"
    },
    {
      "code": 6009,
      "name": "SlippageExceeded",
      "msg": "Would cost more than max_quote_in"
    },
    {
      "code": 6010,
      "name": "SlippageBelowMin",
      "msg": "Would return less than min_quote_out"
    },
    {
      "code": 6011,
      "name": "SellExceedsSold",
      "msg": "Cannot sell more than the curve has sold"
    },
    {
      "code": 6012,
      "name": "Overflow",
      "msg": "Arithmetic overflow"
    },
    {
      "code": 6013,
      "name": "NotComplete",
      "msg": "The curve has not completed yet"
    },
    {
      "code": 6014,
      "name": "BadMetadataPda",
      "msg": "Wrong metadata account"
    },
    {
      "code": 6015,
      "name": "BadRaydiumAccount",
      "msg": "A Raydium account does not match its expected address"
    },
    {
      "code": 6016,
      "name": "NotAdmin",
      "msg": "Only the admin may do this"
    },
    {
      "code": 6017,
      "name": "BadTokenAccount",
      "msg": "Token account owner or mint does not match"
    },
    {
      "code": 6018,
      "name": "NotPusher",
      "msg": "Only the configured pusher may push holder rewards"
    },
    {
      "code": 6019,
      "name": "TooEarly",
      "msg": "The push interval has not elapsed"
    },
    {
      "code": 6020,
      "name": "NothingToPush",
      "msg": "Nothing in the reward vault"
    },
    {
      "code": 6021,
      "name": "BadRecipientCount",
      "msg": "Too many or no recipients"
    },
    {
      "code": 6022,
      "name": "BadRecipient",
      "msg": "A recipient account is not what it claims to be"
    },
    {
      "code": 6023,
      "name": "NotGraduated",
      "msg": "Rewards start after graduation"
    },
    {
      "code": 6024,
      "name": "MissingFeeWalletAccount",
      "msg": "Creator rewards need the fee wallet's quote account"
    },
    {
      "code": 6025,
      "name": "WrongTokenProgram",
      "msg": "The launched token must use Token-2022"
    },
    {
      "code": 6026,
      "name": "BadVault",
      "msg": "A vault address does not match its derivation"
    },
    {
      "code": 6027,
      "name": "BadSource",
      "msg": "Unknown reward source"
    },
    {
      "code": 6028,
      "name": "GraduateFirst",
      "msg": "The curve is complete: graduate it before pushing"
    },
    {
      "code": 6029,
      "name": "MissingConversion",
      "msg": "A pair asset that is not SOL needs its conversion account"
    },
    {
      "code": 6030,
      "name": "BadPayout",
      "msg": "A payout account does not belong to its recipient"
    },
    {
      "code": 6031,
      "name": "NotConverter",
      "msg": "Only the configured converter program may be called"
    },
    {
      "code": 6032,
      "name": "NothingOwed",
      "msg": "Nothing is owed in this asset"
    },
    {
      "code": 6033,
      "name": "BadSwap",
      "msg": "The swap did not deliver the SOL it had to"
    },
    {
      "code": 6034,
      "name": "SolNeedsNoConversion",
      "msg": "SOL pairs pay out natively and need no conversion account"
    },
    {
      "code": 6035,
      "name": "ShortReceived",
      "msg": "The pair asset delivered less than the curve charged"
    },
    {
      "code": 6036,
      "name": "AlreadyMigrated",
      "msg": "The config already has the current layout"
    }
  ],
  "types": [
    {
      "name": "Config",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "docs": [
              "Receives curve fees (in each market's pair asset) and, later, the",
              "protocol's share of pool fees."
            ],
            "type": "pubkey"
          },
          {
            "name": "curve_fee_bps",
            "docs": [
              "Fee on the quote leg of every curve trade."
            ],
            "type": "u16"
          },
          {
            "name": "tax_bps",
            "docs": [
              "Transfer fee baked into every launched token, charged by the token",
              "program on every transfer, anywhere. Fixed at launch."
            ],
            "type": "u16"
          },
          {
            "name": "protocol_share_bps",
            "docs": [
              "Protocol share of what Raydium leaves of the pool fee."
            ],
            "type": "u16"
          },
          {
            "name": "pusher_cap_bps",
            "docs": [
              "Ceiling on the slice of a reward push spent on the pusher's fees."
            ],
            "type": "u16"
          },
          {
            "name": "price_multiple",
            "docs": [
              "Price rises this many times between the first token sold and the last."
            ],
            "type": "u16"
          },
          {
            "name": "supply_total",
            "docs": [
              "Base units. supply_total - supply_for_sale seeds the pool."
            ],
            "type": "u64"
          },
          {
            "name": "supply_for_sale",
            "type": "u64"
          },
          {
            "name": "launch_fee_lamports",
            "docs": [
              "Lamports the creator deposits at launch to fund pool creation."
            ],
            "type": "u64"
          },
          {
            "name": "raydium_program",
            "docs": [
              "The Raydium CPMM program: mainnet and devnet have different ids."
            ],
            "type": "pubkey"
          },
          {
            "name": "raydium_amm_config",
            "docs": [
              "Raydium CPMM fee tier the pool is created with."
            ],
            "type": "pubkey"
          },
          {
            "name": "raydium_create_pool_fee",
            "docs": [
              "Raydium's pool-creation fee receiver."
            ],
            "type": "pubkey"
          },
          {
            "name": "markets_created",
            "type": "u64"
          },
          {
            "name": "pusher",
            "docs": [
              "The keeper allowed to push holder rewards (it picks the recipients)."
            ],
            "type": "pubkey"
          },
          {
            "name": "converter_program",
            "docs": [
              "The only program `convert` may call to turn a pair asset into SOL",
              "(Jupiter on mainnet)."
            ],
            "type": "pubkey"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "burn_share_bps",
            "docs": [
              "Slice of every push that buys the token back and burns it, for every",
              "token, on top of whatever the creator chose for the rest. Appended",
              "last so `migrate_config` can grow older configs into it."
            ],
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "ConfigParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "curve_fee_bps",
            "type": "u16"
          },
          {
            "name": "tax_bps",
            "type": "u16"
          },
          {
            "name": "protocol_share_bps",
            "type": "u16"
          },
          {
            "name": "pusher_cap_bps",
            "type": "u16"
          },
          {
            "name": "price_multiple",
            "type": "u16"
          },
          {
            "name": "supply_total",
            "type": "u64"
          },
          {
            "name": "supply_for_sale",
            "type": "u64"
          },
          {
            "name": "launch_fee_lamports",
            "type": "u64"
          },
          {
            "name": "raydium_program",
            "type": "pubkey"
          },
          {
            "name": "raydium_amm_config",
            "type": "pubkey"
          },
          {
            "name": "raydium_create_pool_fee",
            "type": "pubkey"
          },
          {
            "name": "pusher",
            "type": "pubkey"
          },
          {
            "name": "converter_program",
            "type": "pubkey"
          },
          {
            "name": "burn_share_bps",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "Conversion",
      "docs": [
        "One per pair asset that is not SOL. The protocol's and the pusher's",
        "shares of every push in that asset wait here, in kind, until `convert`",
        "sells them for SOL."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "quote_mint",
            "type": "pubkey"
          },
          {
            "name": "owed_treasury",
            "docs": [
              "Base units of the pair asset owed, by recipient."
            ],
            "type": "u64"
          },
          {
            "name": "owed_pusher",
            "type": "u64"
          },
          {
            "name": "converted_lamports",
            "docs": [
              "Lamports paid out so far, all conversions."
            ],
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "CreateMarketParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "symbol",
            "type": "string"
          },
          {
            "name": "uri",
            "type": "string"
          },
          {
            "name": "graduation_reserve",
            "docs": [
              "Quote base units that graduate the curve."
            ],
            "type": "u64"
          },
          {
            "name": "rewards",
            "type": {
              "defined": {
                "name": "RewardsConfig"
              }
            }
          }
        ]
      }
    },
    {
      "name": "Graduated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "market",
            "type": "pubkey"
          },
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "quote_seeded",
            "type": "u64"
          },
          {
            "name": "tokens_seeded",
            "type": "u64"
          },
          {
            "name": "lp_burned",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "HolderScope",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "All"
          },
          {
            "name": "Top100"
          }
        ]
      }
    },
    {
      "name": "Market",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "creator",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "quote_mint",
            "type": "pubkey"
          },
          {
            "name": "token_vault",
            "type": "pubkey"
          },
          {
            "name": "quote_vault",
            "type": "pubkey"
          },
          {
            "name": "reward_vault",
            "docs": [
              "Where harvested transfer fees land before a push."
            ],
            "type": "pubkey"
          },
          {
            "name": "p0",
            "docs": [
              "Price at s = 0 and at s = supply_for_sale, in quote base units per",
              "whole token, scaled by math::PRICE_SCALE."
            ],
            "type": "u128"
          },
          {
            "name": "p1",
            "type": "u128"
          },
          {
            "name": "supply_for_sale",
            "type": "u64"
          },
          {
            "name": "supply_total",
            "type": "u64"
          },
          {
            "name": "tokens_sold",
            "type": "u64"
          },
          {
            "name": "reserve",
            "docs": [
              "Quote held by the curve, net of fees. Equals the quote vault balance."
            ],
            "type": "u64"
          },
          {
            "name": "graduation_reserve",
            "type": "u64"
          },
          {
            "name": "fees_collected",
            "type": "u64"
          },
          {
            "name": "phase",
            "type": {
              "defined": {
                "name": "Phase"
              }
            }
          },
          {
            "name": "rewards",
            "type": {
              "defined": {
                "name": "RewardsConfig"
              }
            }
          },
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "created_at",
            "type": "i64"
          },
          {
            "name": "graduated_at",
            "type": "i64"
          },
          {
            "name": "last_push_at",
            "docs": [
              "Reward pushes: when the last one ran, and how much of the pair asset",
              "has reached the creator or the holders (base units of the pair)."
            ],
            "type": "i64"
          },
          {
            "name": "pushed_total",
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "signer_bump",
            "type": "u8"
          },
          {
            "name": "rewards_bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "MarketCreated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "market",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "quote_mint",
            "type": "pubkey"
          },
          {
            "name": "creator",
            "type": "pubkey"
          },
          {
            "name": "graduation_reserve",
            "type": "u64"
          },
          {
            "name": "p0",
            "type": "u128"
          },
          {
            "name": "p1",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "Phase",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Curve"
          },
          {
            "name": "Complete"
          },
          {
            "name": "Graduated"
          }
        ]
      }
    },
    {
      "name": "RewardMode",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Creator"
          },
          {
            "name": "Holders"
          },
          {
            "name": "Burn"
          }
        ]
      }
    },
    {
      "name": "RewardsConfig",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mode",
            "type": {
              "defined": {
                "name": "RewardMode"
              }
            }
          },
          {
            "name": "scope",
            "type": {
              "defined": {
                "name": "HolderScope"
              }
            }
          },
          {
            "name": "interval_minutes",
            "docs": [
              "One of constants::VALID_INTERVALS."
            ],
            "type": "u16"
          },
          {
            "name": "fee_wallet",
            "docs": [
              "Where a creator-mode stream is sent. Ignored for holders."
            ],
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "Trade",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "market",
            "type": "pubkey"
          },
          {
            "name": "trader",
            "type": "pubkey"
          },
          {
            "name": "side",
            "docs": [
              "0 = buy, 1 = sell"
            ],
            "type": "u8"
          },
          {
            "name": "tokens",
            "type": "u64"
          },
          {
            "name": "quote",
            "type": "u64"
          },
          {
            "name": "fee",
            "type": "u64"
          },
          {
            "name": "tokens_sold",
            "type": "u64"
          },
          {
            "name": "reserve",
            "type": "u64"
          }
        ]
      }
    }
  ]
}