Pump.fun Token Launcher
Launch new tokens on the Pump.fun protocol using the local Pump SDK toolchain.
Prerequisites
- Solana wallet configured (
solanaos birth) HELIUS_RPC_URLorSOLANA_RPC_URLset in vault- Sufficient SOL balance for transaction fees (~0.05 SOL)
How It Works
The Pump SDK provides offline instruction builders for token creation. This skill uses the PumpSdk.createV2Instruction() method to build a token creation transaction.
Token Creation Flow
- Generate a new mint keypair
- Upload metadata JSON to Arweave/IPFS (name, symbol, image, description)
- Build the
createV2instruction viaPUMP_SDK.createV2Instruction() - Optionally build a combined
createV2AndBuyto purchase initial supply - Sign and send the transaction
Example Usage
import { Keypair, Connection } from "@solana/web3.js";
import { PUMP_SDK, OnlinePumpSdk, getBuyTokenAmountFromSolAmount } from "@nirholas/pump-sdk";
const connection = new Connection(process.env.HELIUS_RPC_URL!);
const mintKeypair = Keypair.generate();
const creator = wallet.publicKey;
// Create token
const createIx = await PUMP_SDK.createV2Instruction({
mint: mintKeypair.publicKey,
name: "My Token",
symbol: "MYTKN",
uri: "https://arweave.net/metadata.json",
creator,
user: creator,
mayhemMode: false,
});
// Or create + buy in one transaction
const sdk = new OnlinePumpSdk(connection);
const global = await sdk.fetchGlobal();
const ixs = await PUMP_SDK.createV2AndBuyInstructions({
global,
mint: mintKeypair.publicKey,
name: "My Token",
symbol: "MYTKN",
uri: "https://arweave.net/metadata.json",
creator,
user: creator,
amount: new BN(1_000_000_000), // tokens to buy
solAmount: new BN(100_000_000), // 0.1 SOL
mayhemMode: false,
});
Mayhem Mode
Set mayhemMode: true for tokens with randomized bonding curve parameters. This creates unpredictable pricing dynamics.
Safety Notes
- Always test on devnet first — never launch tokens with real funds without testing
- Use mock keypairs for development — never commit real wallet keys
- Token creation is irreversible — once created, the bonding curve is live
On-Chain Programs
| Program | Address |
|---|---|
| Pump | 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P |
| PumpAMM | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA |
| PumpFees | pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ |