Skip to main content

pump_rust_client/
fixtures.rs

1//! Pump base mints we ship as cloned fixtures for local-validator tests.
2//!
3//! `clone_devnet_accounts` walks this list and pulls each mint plus every
4//! per-mint PDA the SDK touches (bonding curve, sharing/creator/v2 PDAs,
5//! and — for graduated mints — the post-migration `pump_amm` `Pool` and
6//! its base/quote/lp accounts). Tests under `tests/` reference these by
7//! name so the fixture set is the single source of truth.
8//!
9//! Adding a new fixture: append a `(label, base58_mint)` entry below, run
10//! `cargo run --features local-validator --bin clone_devnet_accounts` to
11//! refresh `artifacts/accounts_to_load.zst`, then restart the local
12//! validator.
13
14use solana_program::{pubkey, pubkey::Pubkey};
15
16/// Devnet mint that has graduated from the bonding curve onto `pump_amm`.
17/// Used by AMM buy/sell tests.
18pub const GRADUATED_DEVNET_MINT: Pubkey = pubkey!("4bYhSvpXvDQ1dXTELLtf6p9fPV3Th1PKBu4A1yN7pump");
19
20/// Devnet mint still on the bonding curve. Used by `buy_v2` / `sell_v2`
21/// tests and by the `AsyncPumpClient` fetch tests.
22pub const NOT_GRADUATED_DEVNET_MINT: Pubkey =
23    pubkey!("6Uw9RM7bxQYeGH9drfbEwTMqWJLaAsVe8wJJpq29pump");
24
25/// Stable label paired with each fixture mint. Cloning logs and test
26/// failure messages use the label so it's obvious which fixture is
27/// involved when something breaks.
28#[derive(Clone, Copy, Debug)]
29pub struct FixtureMint {
30    pub label: &'static str,
31    pub mint: Pubkey,
32}
33
34/// All fixture mints in cloning order. New entries go at the end so the
35/// indices in any test that pins by index stay stable.
36pub const FIXTURE_MINTS: &[FixtureMint] = &[
37    FixtureMint {
38        label: "graduated:devnet",
39        mint: GRADUATED_DEVNET_MINT,
40    },
41    FixtureMint {
42        label: "not_graduated:devnet",
43        mint: NOT_GRADUATED_DEVNET_MINT,
44    },
45];