{
  "address": "CaLLvd6h3X2FFEhTKe5GBah3yzkFFgLsJrmgbVFoBQhn",
  "metadata": {
    "name": "calledit",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "Called It: parimutuel prediction market on calls about pump.fun coins, settled on an on-chain median"
  },
  "instructions": [
    {
      "name": "accept_admin",
      "discriminator": [
        112,
        42,
        45,
        90,
        116,
        181,
        13,
        170
      ],
      "accounts": [
        {
          "name": "proposed",
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "activate_call",
      "docs": [
        "Opens a Pending dev call (from `launch_with_call`) once the coin's history allows a start price. Anyone can",
        "send it (the keeper does), also while paused (the stake is already in). The part of the stake above the pot",
        "cap goes back to the dev at once. Refused after the pending timeout (then `cancel_pending`).",
        "remaining_accounts after migration: [pool, pool_base_ta, pool_quote_ta]."
      ],
      "discriminator": [
        231,
        185,
        187,
        111,
        115,
        7,
        215,
        161
      ],
      "accounts": [
        {
          "name": "call",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108
                ]
              },
              {
                "kind": "account",
                "path": "call.id",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "caller_rep",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "call.caller",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "position",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  111,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "call"
              },
              {
                "kind": "account",
                "path": "call.caller",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "caller",
          "writable": true
        },
        {
          "name": "obs",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  98,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "call.mint",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "curve"
        }
      ],
      "args": []
    },
    {
      "name": "bet",
      "docs": [
        "Parimutuel bet on an open call. YES (0) or NO (1); one side per wallet per call (a wallet adds to its side).",
        "Allowed only before bet_close (open + window x bet_window_bps / 10000) and while the fresh median7 is still",
        "below the halfway price start x (1 + (target - 1) / 2). The caller and the coin's dev can never bet NO.",
        "The pot (both sides) never exceeds pot_cap_bps of the coin's liquidity value (the smaller of the value at the",
        "open and now, both at the median price, so a trade or a liquidity deposit in front of the bet buys no room).",
        "remaining_accounts after migration: [pool, pool_base_ta, pool_quote_ta]."
      ],
      "discriminator": [
        94,
        203,
        166,
        126,
        20,
        243,
        169,
        82
      ],
      "accounts": [
        {
          "name": "bettor",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "call",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108
                ]
              },
              {
                "kind": "account",
                "path": "call.id",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "position",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  111,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "call"
              },
              {
                "kind": "account",
                "path": "bettor"
              }
            ]
          }
        },
        {
          "name": "obs",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  98,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "call.mint",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "curve"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "side",
          "type": "u8"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "cancel_pending",
      "docs": [
        "A Pending dev call that was not activated within its pending timeout: anyone can cancel it; the dev's stake",
        "comes back through `claim` (state Cancelled = full refund). No reputation change."
      ],
      "discriminator": [
        74,
        87,
        109,
        242,
        64,
        192,
        151,
        71
      ],
      "accounts": [
        {
          "name": "call",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108
                ]
              },
              {
                "kind": "account",
                "path": "call.id",
                "account": "Call"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "check",
      "docs": [
        "Settles an open call if it can be settled now: HIT when the newest 7 observations up to min(now, end) show the",
        "median at or above the target, held for hit_hold_secs, all after the open; MISS when now > end without that.",
        "Anyone can send it (keeper, site button). Fails with NotSettleable when neither holds yet."
      ],
      "discriminator": [
        238,
        251,
        184,
        43,
        83,
        233,
        244,
        65
      ],
      "accounts": [
        {
          "name": "call",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108
                ]
              },
              {
                "kind": "account",
                "path": "call.id",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "caller_rep",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "call.caller",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "obs",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  98,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "call.mint",
                "account": "Call"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "claim",
      "docs": [
        "Pays a settled (or cancelled) call's position to its wallet and closes the position (rent to the wallet).",
        "Anyone can push it. Winner: amount + floor((loser_total - fee) x amount / winner_total); loser: 0 (the",
        "position is closed, its rent comes back); refund (one side empty, or a cancelled dev call): the amount."
      ],
      "discriminator": [
        62,
        198,
        214,
        193,
        213,
        159,
        108,
        210
      ],
      "accounts": [
        {
          "name": "call",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108
                ]
              },
              {
                "kind": "account",
                "path": "call.id",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "position",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  111,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "call"
              },
              {
                "kind": "account",
                "path": "position.wallet",
                "account": "Position"
              }
            ]
          }
        },
        {
          "name": "wallet",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "claim_dev",
      "docs": [
        "Pays the dev's booked creator fees to coin.dev. Anyone can push it; below the rent floor of an empty wallet it",
        "fails with BelowRentFloor and stays pending."
      ],
      "discriminator": [
        67,
        144,
        21,
        238,
        28,
        66,
        170,
        208
      ],
      "accounts": [
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "dev",
          "writable": true,
          "relations": [
            "coin"
          ]
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "collect_fees",
      "docs": [
        "pump.fun collect_creator_fee into the coin's Fees PDA, then books every new lamport (fee_treasury_bps to the",
        "treasury, the rest to the dev). Anyone can send it. After migration the keeper first moves PumpSwap's creator",
        "fees to pump with PumpSwap `transfer_creator_fees_to_pump` (permissionless).",
        "remaining = [fees, creator_vault, system, event_authority, pump]."
      ],
      "discriminator": [
        164,
        152,
        207,
        99,
        30,
        186,
        19,
        182
      ],
      "accounts": [
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "collect_treasury",
      "docs": [
        "Pays the treasury's booked share of creator fees to config.treasury. Anyone can push it."
      ],
      "discriminator": [
        48,
        255,
        226,
        214,
        221,
        81,
        222,
        65
      ],
      "accounts": [
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "collect_win_fee",
      "docs": [
        "Sends a settled call's win fee (win_fee_bps of the losing pool) to config.treasury. Anyone can push it."
      ],
      "discriminator": [
        10,
        43,
        16,
        61,
        38,
        58,
        164,
        35
      ],
      "accounts": [
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "call",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108
                ]
              },
              {
                "kind": "account",
                "path": "call.id",
                "account": "Call"
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "init_config",
      "discriminator": [
        23,
        235,
        115,
        232,
        168,
        96,
        1,
        231
      ],
      "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": "treasury",
          "type": "pubkey"
        },
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "Params"
            }
          }
        }
      ]
    },
    {
      "name": "launch",
      "docs": [
        "Launches a coin without a call: pump create_v2 (creator = the Fees PDA, no mayhem / cashback / holder",
        "rewards) + optional dev buy (buyer = dev) in one instruction, launch fee on top of the buy to the treasury,",
        "first price observation from the curve. Alone in its transaction (no snipe behind the create, no fee skip).",
        "remaining_accounts = pump create_v2 accounts (16) [+ pump buy accounts (16+), user = dev, if dev_buy > 0]."
      ],
      "discriminator": [
        153,
        241,
        93,
        225,
        22,
        69,
        74,
        61
      ],
      "accounts": [
        {
          "name": "dev",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "mint",
          "docs": [
            "Fresh mint keypair; pump create_v2 creates it."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "obs",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  98,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "dev_ata",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "symbol",
          "type": "string"
        },
        {
          "name": "uri",
          "type": "string"
        },
        {
          "name": "dev_buy",
          "type": "u64"
        },
        {
          "name": "expected_launch_fee_bps",
          "type": "u16"
        }
      ]
    },
    {
      "name": "launch_with_call",
      "docs": [
        "`launch` + the dev's own call on the new coin: target, window and stake are fixed now and the stake goes into",
        "the Call account (state Pending, flag dev_call). The call opens (`activate_call`, permissionless) once the coin",
        "has the 15 minutes of price history every call needs; its start price is the median then. The dev's position",
        "is YES and the dev can never bet NO on any call on this coin. A dev call not activated within the config's",
        "pending_timeout_secs can be cancelled by anyone (`cancel_pending`): the stake goes back."
      ],
      "discriminator": [
        45,
        140,
        165,
        251,
        168,
        150,
        131,
        50
      ],
      "accounts": [
        {
          "name": "dev",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "mint",
          "writable": true,
          "signer": true
        },
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "obs",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  98,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true
        },
        {
          "name": "dev_ata",
          "writable": true
        },
        {
          "name": "call",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108
                ]
              },
              {
                "kind": "account",
                "path": "config.calls",
                "account": "Config"
              }
            ]
          }
        },
        {
          "name": "position",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  111,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "call"
              },
              {
                "kind": "account",
                "path": "dev"
              }
            ]
          }
        },
        {
          "name": "caller_rep",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "dev"
              }
            ]
          }
        },
        {
          "name": "token_program"
        },
        {
          "name": "ata_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "symbol",
          "type": "string"
        },
        {
          "name": "uri",
          "type": "string"
        },
        {
          "name": "dev_buy",
          "type": "u64"
        },
        {
          "name": "expected_launch_fee_bps",
          "type": "u16"
        },
        {
          "name": "target_x_bps",
          "type": "u32"
        },
        {
          "name": "window_secs",
          "type": "i64"
        },
        {
          "name": "stake",
          "type": "u64"
        }
      ]
    },
    {
      "name": "observe",
      "docs": [
        "Appends the coin's price (pump curve, or its canonical PumpSwap pool after migration) to its observation",
        "ring, at most one per OBS_MIN_GAP, clamped to +-band of the median of the newest 7 stored (the first",
        "observation of a fresh ring is stored as is). Creates the ring on first use for ANY pump coin (payer pays its",
        "rent; band = config's obs_band_bps then). Anyone can send it; it may share its transaction only with other",
        "observes / checks (and ComputeBudget / System), so no trade can sit next to it.",
        "remaining_accounts: [pool, pool_base_ta, pool_quote_ta] when the coin migrated, then any number of",
        "[call, caller_rep] pairs of this coin to check right after the new observation (see `check`)."
      ],
      "discriminator": [
        204,
        78,
        178,
        115,
        194,
        147,
        65,
        74
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "obs",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  98,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "curve"
        },
        {
          "name": "instructions",
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "open_call",
      "docs": [
        "Opens a call: the caller stakes `stake` on YES that `mint` reaches start x target_x_bps / 10000 within",
        "`window_secs`. Start = the lower median of the coin's history (every observation of the last 30 min, >= 7,",
        "spanning >= 15 min, spread <= 1.5x); refused without it. `max_start_q9` (0 = any) guards the start the client",
        "showed; `expected_win_fee_bps` guards the fee. The stake counts toward the pot cap",
        "(pot_cap_bps of the coin's liquidity value at the median price).",
        "remaining_accounts after migration: [pool, pool_base_ta, pool_quote_ta]."
      ],
      "discriminator": [
        153,
        26,
        89,
        45,
        252,
        243,
        183,
        62
      ],
      "accounts": [
        {
          "name": "caller",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "obs",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  98,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "obs.mint",
                "account": "PriceObs"
              }
            ]
          }
        },
        {
          "name": "curve"
        },
        {
          "name": "pad_coin"
        },
        {
          "name": "call",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108
                ]
              },
              {
                "kind": "account",
                "path": "config.calls",
                "account": "Config"
              }
            ]
          }
        },
        {
          "name": "position",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  111,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "call"
              },
              {
                "kind": "account",
                "path": "caller"
              }
            ]
          }
        },
        {
          "name": "caller_rep",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  97,
                  108,
                  108,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "caller"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "target_x_bps",
          "type": "u32"
        },
        {
          "name": "window_secs",
          "type": "i64"
        },
        {
          "name": "stake",
          "type": "u64"
        },
        {
          "name": "max_start_q9",
          "type": "u64"
        },
        {
          "name": "expected_win_fee_bps",
          "type": "u16"
        }
      ]
    },
    {
      "name": "propose_admin",
      "docs": [
        "Two-step admin handover: the admin proposes (Pubkey::default() cancels), the proposed key accepts."
      ],
      "discriminator": [
        121,
        214,
        199,
        212,
        87,
        39,
        117,
        234
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "proposed",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "set_paused",
      "docs": [
        "Pause blocks new money only: launches, new calls and bets. Observing, activation of already staked dev calls,",
        "settlement, claims and fee payouts keep working."
      ],
      "discriminator": [
        91,
        60,
        125,
        192,
        176,
        225,
        166,
        218
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "paused",
          "type": "bool"
        }
      ]
    },
    {
      "name": "set_treasury",
      "discriminator": [
        57,
        97,
        196,
        95,
        195,
        206,
        106,
        136
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "treasury",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "unwrap_fees",
      "docs": [
        "Closes a WSOL account owned by the Fees PDA (PumpSwap creator fees someone collected as WSOL to it) into the",
        "Fees PDA and books the lamports like `collect_fees`."
      ],
      "discriminator": [
        202,
        112,
        56,
        154,
        193,
        85,
        127,
        150
      ],
      "accounts": [
        {
          "name": "coin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "fees",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  101,
                  101,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "coin.mint",
                "account": "Coin"
              }
            ]
          }
        },
        {
          "name": "wsol_ata",
          "writable": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": []
    },
    {
      "name": "update_config",
      "docs": [
        "New params apply to coins, observation rings and calls created from now on; existing ones keep their copy."
      ],
      "discriminator": [
        29,
        158,
        252,
        191,
        10,
        83,
        219,
        99
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "config"
          ]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "Params"
            }
          }
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "Call",
      "discriminator": [
        62,
        231,
        169,
        58,
        154,
        150,
        83,
        196
      ]
    },
    {
      "name": "Caller",
      "discriminator": [
        93,
        21,
        55,
        107,
        149,
        124,
        16,
        235
      ]
    },
    {
      "name": "Coin",
      "discriminator": [
        215,
        195,
        53,
        238,
        217,
        196,
        213,
        51
      ]
    },
    {
      "name": "Config",
      "discriminator": [
        155,
        12,
        170,
        224,
        30,
        250,
        204,
        130
      ]
    },
    {
      "name": "Position",
      "discriminator": [
        170,
        188,
        143,
        228,
        122,
        64,
        247,
        208
      ]
    },
    {
      "name": "PriceObs",
      "discriminator": [
        213,
        57,
        9,
        43,
        33,
        19,
        56,
        221
      ]
    }
  ],
  "events": [
    {
      "name": "AdminProposed",
      "discriminator": [
        129,
        249,
        226,
        227,
        199,
        82,
        110,
        243
      ]
    },
    {
      "name": "AdminSet",
      "discriminator": [
        157,
        245,
        205,
        226,
        118,
        125,
        183,
        97
      ]
    },
    {
      "name": "BetPlaced",
      "discriminator": [
        88,
        88,
        145,
        226,
        126,
        206,
        32,
        0
      ]
    },
    {
      "name": "CallOpened",
      "discriminator": [
        80,
        97,
        83,
        218,
        46,
        113,
        128,
        51
      ]
    },
    {
      "name": "CallPending",
      "discriminator": [
        43,
        107,
        216,
        41,
        150,
        104,
        30,
        82
      ]
    },
    {
      "name": "CallSettled",
      "discriminator": [
        240,
        201,
        54,
        197,
        132,
        33,
        150,
        213
      ]
    },
    {
      "name": "Claimed",
      "discriminator": [
        217,
        192,
        123,
        72,
        108,
        150,
        248,
        33
      ]
    },
    {
      "name": "ConfigInitialized",
      "discriminator": [
        181,
        49,
        200,
        156,
        19,
        167,
        178,
        91
      ]
    },
    {
      "name": "ConfigUpdated",
      "discriminator": [
        40,
        241,
        230,
        122,
        11,
        19,
        198,
        194
      ]
    },
    {
      "name": "DevPaid",
      "discriminator": [
        108,
        221,
        137,
        38,
        39,
        247,
        120,
        194
      ]
    },
    {
      "name": "FeesCollected",
      "discriminator": [
        233,
        23,
        117,
        225,
        107,
        178,
        254,
        8
      ]
    },
    {
      "name": "Launched",
      "discriminator": [
        209,
        127,
        29,
        152,
        129,
        212,
        189,
        183
      ]
    },
    {
      "name": "Observed",
      "discriminator": [
        154,
        65,
        198,
        52,
        238,
        11,
        193,
        59
      ]
    },
    {
      "name": "PausedSet",
      "discriminator": [
        171,
        125,
        127,
        156,
        233,
        81,
        68,
        66
      ]
    },
    {
      "name": "PendingCancelled",
      "discriminator": [
        24,
        20,
        230,
        224,
        239,
        65,
        117,
        159
      ]
    },
    {
      "name": "StakeTrimmed",
      "discriminator": [
        207,
        75,
        182,
        242,
        101,
        36,
        36,
        44
      ]
    },
    {
      "name": "TreasuryPaid",
      "discriminator": [
        203,
        141,
        198,
        183,
        132,
        74,
        239,
        248
      ]
    },
    {
      "name": "TreasurySet",
      "discriminator": [
        69,
        231,
        163,
        135,
        254,
        194,
        109,
        166
      ]
    },
    {
      "name": "WinFeePaid",
      "discriminator": [
        218,
        180,
        27,
        179,
        223,
        187,
        43,
        25
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "Unauthorized",
      "msg": "Only the admin can do this"
    },
    {
      "code": 6001,
      "name": "Paused",
      "msg": "Called It is paused: no new coins, calls or bets right now (settlement and claims still work)"
    },
    {
      "code": 6002,
      "name": "BadConfig",
      "msg": "Config value out of its allowed range"
    },
    {
      "code": 6003,
      "name": "ParamsChanged",
      "msg": "The platform settings changed since you looked: reload and check the fees"
    },
    {
      "code": 6004,
      "name": "BadName",
      "msg": "Name must be 1-32 bytes, no control or invisible characters, no leading/trailing spaces"
    },
    {
      "code": 6005,
      "name": "BadSymbol",
      "msg": "Ticker must be 1-10 characters, no spaces, control or invisible characters"
    },
    {
      "code": 6006,
      "name": "BadUri",
      "msg": "Metadata uri must be ipfs://<cid> or https://ipfs.io/ipfs/<cid>"
    },
    {
      "code": 6007,
      "name": "NotAlone",
      "msg": "This instruction must be alone in its transaction (only compute-budget and SOL transfers may join it)"
    },
    {
      "code": 6008,
      "name": "BadAccounts",
      "msg": "Wrong accounts"
    },
    {
      "code": 6009,
      "name": "Math",
      "msg": "Math overflow"
    },
    {
      "code": 6010,
      "name": "NothingBought",
      "msg": "The dev buy returned no tokens"
    },
    {
      "code": 6011,
      "name": "ObserveTooSoon",
      "msg": "Price was observed less than a minute ago (readings within 30 s of it may only revise it): try again shortly"
    },
    {
      "code": 6012,
      "name": "StaleMedian",
      "msg": "No fresh price for this coin: it needs 7 observations in the last 30 minutes (the keeper adds one per minute)"
    },
    {
      "code": 6013,
      "name": "ShortPriceHistory",
      "msg": "Not enough price history yet: a call needs observations covering at least 15 minutes"
    },
    {
      "code": 6014,
      "name": "PriceUnsettled",
      "msg": "The price is still moving too much (the last 30 minutes spread more than 1.5x): wait for a calmer market"
    },
    {
      "code": 6015,
      "name": "PriceAlreadyMoving",
      "msg": "The price is already more than halfway to that target: this call would open with betting closed"
    },
    {
      "code": 6016,
      "name": "BadTarget",
      "msg": "Target must be between 1.5x and 100x"
    },
    {
      "code": 6017,
      "name": "BadWindow",
      "msg": "Window is outside the allowed range (1 hour to 7 days)"
    },
    {
      "code": 6018,
      "name": "StakeTooSmall",
      "msg": "Stake is below the minimum"
    },
    {
      "code": 6019,
      "name": "StartMoved",
      "msg": "The start price moved above what you accepted: reload and check"
    },
    {
      "code": 6020,
      "name": "PotCapReached",
      "msg": "This coin's liquidity allows no bigger pot on this call (anti-manipulation cap)"
    },
    {
      "code": 6021,
      "name": "CallNotOpen",
      "msg": "This call is not open"
    },
    {
      "code": 6022,
      "name": "BettingClosed",
      "msg": "Betting on this call is closed (too late in the window, or the price is already halfway to the target)"
    },
    {
      "code": 6023,
      "name": "DustBet",
      "msg": "Bet is below the minimum"
    },
    {
      "code": 6024,
      "name": "WrongSide",
      "msg": "Side must be 0 (YES) or 1 (NO)"
    },
    {
      "code": 6025,
      "name": "OneSideOnly",
      "msg": "You already bet the other side of this call: one side per wallet"
    },
    {
      "code": 6026,
      "name": "CallerCannotBetNo",
      "msg": "The caller cannot bet against their own call"
    },
    {
      "code": 6027,
      "name": "DevCannotBetNo",
      "msg": "The coin's dev cannot bet NO on calls about their own coin"
    },
    {
      "code": 6028,
      "name": "NotSettleable",
      "msg": "Nothing to settle yet: no hit on the median and the window is still running"
    },
    {
      "code": 6029,
      "name": "NotSettled",
      "msg": "This call is not settled yet"
    },
    {
      "code": 6030,
      "name": "NotPending",
      "msg": "This call is not waiting for activation"
    },
    {
      "code": 6031,
      "name": "PendingExpired",
      "msg": "The dev call waited too long for price history: it can only be cancelled (stake back)"
    },
    {
      "code": 6032,
      "name": "PendingNotExpired",
      "msg": "The dev call can still be activated: it cannot be cancelled yet"
    },
    {
      "code": 6033,
      "name": "NothingToClaim",
      "msg": "Nothing to claim"
    },
    {
      "code": 6034,
      "name": "BelowRentFloor",
      "msg": "Payout is below the rent floor of an empty wallet: it stays claimable, fund the wallet or wait"
    },
    {
      "code": 6035,
      "name": "BadAmount",
      "msg": "Amount must be above zero"
    }
  ],
  "types": [
    {
      "name": "AdminProposed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "current",
            "type": "pubkey"
          },
          {
            "name": "proposed",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "AdminSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "old",
            "type": "pubkey"
          },
          {
            "name": "admin",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "BetPlaced",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "call",
            "type": "pubkey"
          },
          {
            "name": "wallet",
            "type": "pubkey"
          },
          {
            "name": "side",
            "type": "u8"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "position",
            "type": "u64"
          },
          {
            "name": "yes_total",
            "type": "u64"
          },
          {
            "name": "no_total",
            "type": "u64"
          },
          {
            "name": "yes_count",
            "type": "u32"
          },
          {
            "name": "no_count",
            "type": "u32"
          },
          {
            "name": "median_q9",
            "type": "u64"
          },
          {
            "name": "cap",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Call",
      "docs": [
        "[\"call\", id u64 le]"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "id",
            "type": "u64"
          },
          {
            "name": "caller",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "coin_dev",
            "docs": [
              "who can never bet NO besides the caller: our Coin.dev, or the pump creator of the curve"
            ],
            "type": "pubkey"
          },
          {
            "name": "dev_call",
            "type": "bool"
          },
          {
            "name": "state",
            "type": "u8"
          },
          {
            "name": "refund",
            "docs": [
              "settled with one side empty (or cancelled): every position gets its amount back"
            ],
            "type": "bool"
          },
          {
            "name": "target_x_bps",
            "type": "u32"
          },
          {
            "name": "window_secs",
            "type": "i64"
          },
          {
            "name": "created_at",
            "type": "i64"
          },
          {
            "name": "open_ts",
            "type": "i64"
          },
          {
            "name": "bet_close_ts",
            "type": "i64"
          },
          {
            "name": "end_ts",
            "type": "i64"
          },
          {
            "name": "start_q9",
            "type": "u64"
          },
          {
            "name": "target_q9",
            "type": "u64"
          },
          {
            "name": "halfway_q9",
            "type": "u64"
          },
          {
            "name": "liq_open",
            "docs": [
              "liquidity value at the open (SOL side of the reserves at the start price) and the pot cap from it"
            ],
            "type": "u64"
          },
          {
            "name": "pot_cap",
            "type": "u64"
          },
          {
            "name": "bet_window_bps",
            "type": "u16"
          },
          {
            "name": "pot_cap_bps",
            "type": "u16"
          },
          {
            "name": "win_fee_bps",
            "type": "u16"
          },
          {
            "name": "hit_hold_secs",
            "type": "i64"
          },
          {
            "name": "min_bet",
            "type": "u64"
          },
          {
            "name": "pending_timeout_secs",
            "type": "i64"
          },
          {
            "name": "yes_total",
            "type": "u64"
          },
          {
            "name": "no_total",
            "type": "u64"
          },
          {
            "name": "yes_count",
            "type": "u32"
          },
          {
            "name": "no_count",
            "type": "u32"
          },
          {
            "name": "caller_amount",
            "docs": [
              "the caller's own YES lamports (stake + own bets)"
            ],
            "type": "u64"
          },
          {
            "name": "settled_at",
            "type": "i64"
          },
          {
            "name": "settle_median_q9",
            "type": "u64"
          },
          {
            "name": "hit_ts",
            "type": "i64"
          },
          {
            "name": "fee",
            "type": "u64"
          },
          {
            "name": "fee_paid",
            "type": "u64"
          },
          {
            "name": "paid_out",
            "type": "u64"
          },
          {
            "name": "claims",
            "type": "u32"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "CallOpened",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "call",
            "type": "pubkey"
          },
          {
            "name": "id",
            "type": "u64"
          },
          {
            "name": "caller",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "dev_call",
            "type": "bool"
          },
          {
            "name": "target_x_bps",
            "type": "u32"
          },
          {
            "name": "start_q9",
            "type": "u64"
          },
          {
            "name": "target_q9",
            "type": "u64"
          },
          {
            "name": "halfway_q9",
            "type": "u64"
          },
          {
            "name": "history_n",
            "type": "u8"
          },
          {
            "name": "open_ts",
            "type": "i64"
          },
          {
            "name": "bet_close_ts",
            "type": "i64"
          },
          {
            "name": "end_ts",
            "type": "i64"
          },
          {
            "name": "stake",
            "type": "u64"
          },
          {
            "name": "liquidity",
            "type": "u64"
          },
          {
            "name": "pot_cap",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "CallPending",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "call",
            "type": "pubkey"
          },
          {
            "name": "id",
            "type": "u64"
          },
          {
            "name": "caller",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "target_x_bps",
            "type": "u32"
          },
          {
            "name": "window_secs",
            "type": "i64"
          },
          {
            "name": "stake",
            "type": "u64"
          },
          {
            "name": "activate_by",
            "type": "i64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "CallSettled",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "call",
            "type": "pubkey"
          },
          {
            "name": "id",
            "type": "u64"
          },
          {
            "name": "caller",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "state",
            "type": "u8"
          },
          {
            "name": "refund",
            "type": "bool"
          },
          {
            "name": "median_q9",
            "type": "u64"
          },
          {
            "name": "above",
            "type": "u8"
          },
          {
            "name": "hit_ts",
            "type": "i64"
          },
          {
            "name": "yes_total",
            "type": "u64"
          },
          {
            "name": "no_total",
            "type": "u64"
          },
          {
            "name": "fee",
            "type": "u64"
          },
          {
            "name": "score_delta",
            "type": "i64"
          },
          {
            "name": "caller_score",
            "type": "i64"
          },
          {
            "name": "caller_hits",
            "type": "u32"
          },
          {
            "name": "caller_misses",
            "type": "u32"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Caller",
      "docs": [
        "[\"caller\", wallet]: on-chain reputation. score: +isqrt(stake / 1e6) x (target - 1) x 10 per HIT,",
        "-isqrt(stake / 1e6) x 10 per MISS (stake = the caller's own YES lamports on that call)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "wallet",
            "type": "pubkey"
          },
          {
            "name": "calls",
            "type": "u32"
          },
          {
            "name": "open_calls",
            "type": "u32"
          },
          {
            "name": "hits",
            "type": "u32"
          },
          {
            "name": "misses",
            "type": "u32"
          },
          {
            "name": "dev_calls",
            "type": "u32"
          },
          {
            "name": "staked",
            "docs": [
              "lamports the caller put on his own calls (stake + own YES bets), won from the NO side, lost on misses"
            ],
            "type": "u64"
          },
          {
            "name": "won",
            "type": "u64"
          },
          {
            "name": "lost",
            "type": "u64"
          },
          {
            "name": "score",
            "type": "i64"
          },
          {
            "name": "best_hit_x_bps",
            "type": "u32"
          },
          {
            "name": "last_call_at",
            "type": "i64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "Claimed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "call",
            "type": "pubkey"
          },
          {
            "name": "wallet",
            "type": "pubkey"
          },
          {
            "name": "side",
            "type": "u8"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "payout",
            "type": "u64"
          },
          {
            "name": "state",
            "type": "u8"
          },
          {
            "name": "refund",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "Coin",
      "docs": [
        "[\"coin\", mint]: a coin launched through the pad."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "symbol",
            "type": "string"
          },
          {
            "name": "uri",
            "type": "string"
          },
          {
            "name": "launched_at",
            "type": "i64"
          },
          {
            "name": "dev_call",
            "docs": [
              "the dev's own call from launch_with_call (default = none)"
            ],
            "type": "pubkey"
          },
          {
            "name": "fee_treasury_bps",
            "type": "u16"
          },
          {
            "name": "fees_total",
            "docs": [
              "Fees PDA ledger: fees.lamports == floor + dev_pending + treasury_pending after a collect."
            ],
            "type": "u64"
          },
          {
            "name": "dev_pending",
            "type": "u64"
          },
          {
            "name": "dev_paid",
            "type": "u64"
          },
          {
            "name": "treasury_pending",
            "type": "u64"
          },
          {
            "name": "treasury_paid",
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "fees_bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "Config",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "pending_admin",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "paused",
            "type": "bool"
          },
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          },
          {
            "name": "calls",
            "type": "u64"
          },
          {
            "name": "coins",
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "ConfigInitialized",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          }
        ]
      }
    },
    {
      "name": "ConfigUpdated",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "params",
            "type": {
              "defined": {
                "name": "Params"
              }
            }
          }
        ]
      }
    },
    {
      "name": "DevPaid",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "FeesCollected",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "collected",
            "type": "u64"
          },
          {
            "name": "booked",
            "type": "u64"
          },
          {
            "name": "dev",
            "type": "u64"
          },
          {
            "name": "treasury",
            "type": "u64"
          },
          {
            "name": "dev_pending",
            "type": "u64"
          },
          {
            "name": "treasury_pending",
            "type": "u64"
          },
          {
            "name": "total",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Launched",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "dev",
            "type": "pubkey"
          },
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "symbol",
            "type": "string"
          },
          {
            "name": "uri",
            "type": "string"
          },
          {
            "name": "dev_buy",
            "type": "u64"
          },
          {
            "name": "dev_tokens",
            "type": "u64"
          },
          {
            "name": "launch_fee",
            "type": "u64"
          },
          {
            "name": "price_q9",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "ObsSlot",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "price_q9",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Observed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "price_q9",
            "type": "u64"
          },
          {
            "name": "raw_q9",
            "type": "u64"
          },
          {
            "name": "median_q9",
            "type": "u64"
          },
          {
            "name": "on_curve",
            "type": "bool"
          },
          {
            "name": "count",
            "type": "u8"
          },
          {
            "name": "first",
            "type": "bool"
          },
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "revised",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "Params",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "launch_fee_bps",
            "docs": [
              "Launch fee in bps of the dev buy, paid on top of it to the treasury. 0..=500 (250)."
            ],
            "type": "u16"
          },
          {
            "name": "fee_treasury_bps",
            "docs": [
              "Treasury share of the creator fees of coins launched here, the rest is the dev's. 0..=3000 (2000)."
            ],
            "type": "u16"
          },
          {
            "name": "min_stake",
            "docs": [
              "Smallest caller stake, 0.01..=10 SOL (0.05)."
            ],
            "type": "u64"
          },
          {
            "name": "min_bet",
            "docs": [
              "Smallest bet (dust guard), 0.001 SOL..=min_stake (0.01)."
            ],
            "type": "u64"
          },
          {
            "name": "min_window_secs",
            "docs": [
              "Call window bounds: MIN_WINDOW (1 h mainnet) <= min <= max <= 7 d (spec: 1 h..7 d, default 24 h is the site's)."
            ],
            "type": "i64"
          },
          {
            "name": "max_window_secs",
            "type": "i64"
          },
          {
            "name": "bet_window_bps",
            "docs": [
              "Bets close at open + window x bet_window_bps / 10000. 1000..=5000 (2500)."
            ],
            "type": "u16"
          },
          {
            "name": "pot_cap_bps",
            "docs": [
              "Pot (both sides) <= pot_cap_bps of the coin's liquidity value at the median price. 50..=2000 (500)."
            ],
            "type": "u16"
          },
          {
            "name": "win_fee_bps",
            "docs": [
              "Win fee: bps of the losing pool, to the treasury. 0..=1000 (300)."
            ],
            "type": "u16"
          },
          {
            "name": "obs_band_bps",
            "docs": [
              "Observation clamp band (copied into each new ring): +-band of the median of the newest 7. 500..=3000 (1500)."
            ],
            "type": "u16"
          },
          {
            "name": "hit_hold_secs",
            "docs": [
              "A HIT needs its above-target observations (among the newest 7) to span this long. MIN_HOLD (4 min",
              "mainnet)..=MAX_HOLD (6 x OBS_MIN_GAP = 6 min mainnet) (240 s)."
            ],
            "type": "i64"
          },
          {
            "name": "pending_timeout_secs",
            "docs": [
              "A launch_with_call dev call must be activated within this. MIN_PENDING (1 h mainnet)..=7 d (24 h)."
            ],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "PausedSet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "paused",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "PendingCancelled",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "call",
            "type": "pubkey"
          },
          {
            "name": "caller",
            "type": "pubkey"
          },
          {
            "name": "stake",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Position",
      "docs": [
        "[\"pos\", call, wallet]: one wallet's side and amount on one call. Closed (rent to the wallet) by `claim`."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "call",
            "type": "pubkey"
          },
          {
            "name": "wallet",
            "type": "pubkey"
          },
          {
            "name": "side",
            "type": "u8"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "bets",
            "type": "u32"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "PriceObs",
      "docs": [
        "[\"obs\", mint]: pricing's observation ring (16 slots, newest at head - 1), for any pump coin."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "ring",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "ObsSlot"
                  }
                },
                16
              ]
            }
          },
          {
            "name": "head",
            "type": "u8"
          },
          {
            "name": "count",
            "type": "u8"
          },
          {
            "name": "band_bps",
            "docs": [
              "clamp band of this ring (config's obs_band_bps when it was created)"
            ],
            "type": "u16"
          },
          {
            "name": "created_at",
            "type": "i64"
          },
          {
            "name": "observations",
            "docs": [
              "observations ever written, and the venue price of the newest (the stored one may be clamped)"
            ],
            "type": "u64"
          },
          {
            "name": "last_raw_q9",
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "StakeTrimmed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "call",
            "type": "pubkey"
          },
          {
            "name": "caller",
            "type": "pubkey"
          },
          {
            "name": "refunded",
            "type": "u64"
          },
          {
            "name": "stake",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "TreasuryPaid",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "TreasurySet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "treasury",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "WinFeePaid",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "call",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    }
  ]
}