pumpPumpDocs

Instructions

Coin creation

create_v2 accounts, arguments, and SDK snippets for SOL-paired and USDC-paired mints.


The create_v2 instruction uses the following accounts. Accounts 1-16 are present in the generated IDL. Accounts 17-19 are optional remaining_accounts and must be appended in this exact order when creating a coin with a non-native quote mint.

#AccountSeeds / derivationAdded to IDL?
1mintNew Token-2022 mint account. Signer, initialized with decimals = 6, mint_authority, token_program, and metadata pointer set to mint.Yes
2mint_authorityPump PDA: seeds [b"mint-authority"].Yes
3bonding_curvePump PDA: seeds [b"bonding-curve", mint].Yes
4associated_bonding_curveAssociated token account for mint, owned by bonding_curve, using token_program and associated_token_program.Yes
5globalPump PDA: seeds [b"global"].Yes
6userTransaction signer and payer.Yes
7system_programSystem Program: 11111111111111111111111111111111.Yes
8token_programToken-2022 Program: TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb.Yes
9associated_token_programAssociated Token Program: ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL.Yes
10mayhem_program_idMayhem Program: MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e.Yes
11global_paramsMayhem PDA: seeds [b"global-params"].Yes
12sol_vaultMayhem PDA: seeds [b"sol-vault"].Yes
13mayhem_stateMayhem PDA: seeds [b"mayhem-state", mint].Yes
14mayhem_token_vaultAssociated token account for mint, owned by sol_vault, using the Token-2022 program.Yes
15event_authorityPump PDA generated by #[event_cpi]: seeds [b"__event_authority"].Yes
16programPump program account, generated by #[event_cpi].Yes
17quote_mintOptional remaining account at index 0. Must be a supported quote mint. If left empty, or if passed as wrapped SOL (So11111111111111111111111111111111111111112), bonding_curve.quote_mint becomes Pubkey::default(), which is the correct value for a coin traded against SOL.No
18associated_quote_bonding_curveOptional remaining account at index 1. Associated token account for quote_mint, owned by bonding_curve, using the quote mint's token program. Required for non-native quote mints.No
19quote_token_programOptional remaining account at index 2. Must be the token program for quote_mint; this is not necessarily the legacy SPL Token Program.No

When any optional quote account is supplied, all three optional remaining accounts must be supplied.

Instruction Data

The create_v2 instruction takes the following instruction data arguments.

#ArgumentTypeDescription / validationOptional?
1nameStringCoin name. Maximum 32 characters.No
2symbolStringCoin symbol. Maximum 13 characters.No
3uriStringMetadata URI. Maximum 200 characters.No
4creatorPubkeyCreator address. Must not be Pubkey::default().No
5is_mayhem_modeboolEnables mayhem mode for the coin.No
6is_cashback_enabledOptionBoolEnables cashback for the coin.Yes

TS SDK

Default SOL-Paired Mint

When quoteMint is omitted, the coin is created as a SOL-paired mint.

import { PUMP_SDK } from "@pump-fun/pump-sdk";

const mintKeypair = Keypair.generate();

const createInstruction = await PUMP_SDK.createV2Instruction({
  mint: mintKeypair.publicKey,
  name: "Name",
  symbol: "symbol",
  uri: "<your ipfs uri>",
  creator,
  user,
  mayhemMode: false, // Can be set to true.
  cashback: false, // Can be set to true.
});

USDC-Paired Mint

Pass the USDC mint as quoteMint to create a USDC-paired mint.

import { PUMP_SDK } from "@pump-fun/pump-sdk";

const mintKeypair = Keypair.generate();
const quoteMint = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");

const createInstruction = await PUMP_SDK.createV2Instruction({
  mint: mintKeypair.publicKey,
  name: "Name",
  symbol: "symbol",
  uri: "<your ipfs uri>",
  creator,
  user,
  mayhemMode: false, // Can be set to true.
  cashback: false, // Can be set to true.
  quoteMint,
});

Rust SDK

The Rust client exposes create_v2_and_buy_instruction, which returns the create_v2 instruction followed by a buy_v2 instruction so the creator can seed the curve in a single transaction. Pass Pubkey::default() for a SOL-paired coin or the desired quote mint (e.g. USDC) for a non-native quote.

Default SOL-Paired Mint

use pump_rust_client::{constants, PumpSdk};
use solana_sdk::pubkey::Pubkey;

let sdk = PumpSdk::new();
let global = client.fetch_global().await.expect("fetch_global");

let ixs = sdk
    .create_v2_and_buy_instruction(
        mint.pubkey(),
        user.pubkey(),
        "Example",
        "EX",
        "https://example.com/ex.json",
        user.pubkey(),       // creator
        Pubkey::default(),   // quote_mint — default → wSOL
        false,               // mayhem_mode
        false,               // cashback
        None,                // tokenized_agent_buyback_bps
        &global,
        1_000_000_000,       // amount (token base units, 6 decimals)
        LAMPORTS_PER_SOL,    // max_quote_tokens (slippage cap, in quote base units)
    )
    .expect("create_v2_and_buy_instruction");

USDC-Paired Mint

let usdc = pubkey!("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");

let ixs = sdk
    .create_v2_and_buy_instruction(
        mint.pubkey(),
        user.pubkey(),
        "Example",
        "EX",
        "https://example.com/ex.json",
        user.pubkey(),
        usdc,                // quote_mint
        false,
        false,
        None,
        &global,
        1_000_000_000,
        max_quote_tokens,    // slippage cap, expressed in the quote mint's base units
    )
    .expect("create_v2_and_buy_instruction");

Mirrored from COIN_CREATION.md in the official docs repository.