A comprehensive Solana dApp for creating memecoins on pump.fun and managing liquidity pools on swap.pump.fun.
🔥 Now with Python Backend using Ankr SDK!
Built with React, Material-UI, Solana Web3.js, and a Python FastAPI backend using the official Ankr SDK for advanced blockchain operations.
- 🚀 Create new tokens on pump.fun with custom metadata
- 🎨 Upload token images
- 🔗 Add social links (Twitter, Telegram, Website)
- 💰 Optional initial buy to bootstrap liquidity
- 🏊 Create new liquidity pools on swap.pump.fun
- ➕ Add liquidity to existing pools
- ➖ Withdraw all LP tokens back to wallet
- 💱 Buy/Sell tokens through the pool
- 🔌 Connect with Phantom, Solflare, or other Solana wallets
- 💎 View SOL and token balances
- ✅ Secure transaction signing
- ⚡ High-performance Solana RPC via Ankr (Direct Solana endpoint)
- 📦 Batch request support for multiple accounts
- 📊 Token balance aggregation
- 📜 Transaction history queries
- 🔍 Health monitoring and latency tracking
- 🐍 Python SDK for advanced blockchain operations
- Framework: React 18 + TypeScript
- UI Library: Material-UI (MUI) v5
- Blockchain: Solana Web3.js + SPL Token
- Wallet: Solana Wallet Adapter
- Build Tool: Vite
- Framework: FastAPI
- SDK: Ankr SDK (Python)
- RPC Provider: Ankr Multichain
- Server: Uvicorn
- API Docs: Auto-generated OpenAPI/Swagger
┌─────────────────┐ HTTP/WebSocket ┌──────────────────┐
│ React Frontend │ ◄────────────────────► │ Python Backend │
│ (Port 5173) │ │ (Port 8000) │
└─────────────────┘ └────────┬─────────┘
│ │
│ Direct RPC │ Ankr SDK
│ │
└──────────────┬───────────────────────────────┘
│
┌───────▼─────────┐
│ Ankr Solana │
│ RPC Endpoint │
│ (Mainnet) │
└─────────────────┘
- Node.js 18+
- npm or yarn
- Python 3.9+ (for backend)
- A Solana wallet (Phantom, Solflare, etc.)
# Clone or navigate to the project
cd pumpfun-token-creator
# Install frontend dependencies
npm install
# Start frontend development server
npm run devThe frontend will be available at http://localhost:5173
The Python backend uses the official Ankr SDK for advanced Solana operations.
# Navigate to backend directory
cd backend
# Install Python dependencies
pip install -r requirements.txt
# Or with virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Create .env file (optional)
echo "ANKR_API_KEY=your_key_here" > .env
# Start the Python backend server
python main.pyThe backend will be available at http://localhost:8000
Backend Features:
- ⚡ Ankr SDK integration for optimized RPC calls
- 📦 Batch request support for multiple accounts
- 💰 Real-time token price data
- 📊 Token holder queries
- 📜 Transaction history with pagination
- 🔌 WebSocket support for real-time updates
Access the backend API docs at: http://localhost:8000/docs
npm run buildThis project uses Ankr Solana RPC for reliable mainnet access.
RPC Endpoint: https://rpc.ankr.com/solana/{API_KEY}
- Network: Solana Mainnet
- Free Tier: 1M requests/day, 30 req/sec
- Documentation: https://www.ankr.com/docs/rpc-service/chains/chains-list/solana/
The API key is extracted from the endpoint and configured in:
- Frontend:
VITE_ANKR_API_KEYin.env - Backend:
ANKR_API_KEYin.env
To use your own Ankr API key:
- Sign up at https://www.ankr.com/rpc/
- Copy your API key
- Update the
.envfiles:
# frontend/.env
VITE_ANKR_API_KEY=your_api_key_here
# backend/.env
ANKR_API_KEY=your_api_key_hereThe following program IDs are used:
- Pump.fun Program:
6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P - swap.pump.fun Program: Replace with actual program ID in
src/utils/swapPump.ts
- Connect your wallet
- Fill in token details:
- Name (e.g., "Moon Rocket")
- Symbol (e.g., "MOON")
- Description
- Upload token image (required)
- Optional: Add social links
- Set initial buy amount (optional)
- Click "Create Token"
- Approve the transaction in your wallet
- Switch to the "Create LP" tab
- Enter the token mint address
- Specify:
- SOL amount to deposit
- Token amount to deposit
- Click "Create Liquidity Pool"
- You'll receive LP tokens representing your pool share
- Switch to the "Add Liquidity" tab
- Enter the token mint address
- Specify amounts to add
- Click "Add Liquidity"
- Switch to the "Withdraw LP" tab
- Enter the token mint address
- Click "Check LP Balance" to see your position
- Click "Withdraw All LP" to remove all liquidity
- You'll receive both SOL and tokens back to your wallet
- Switch to the "Swap" tab
- Select Buy or Sell
- Enter token mint address
- Specify amount
- Click "Buy Tokens" or "Sell Tokens"
src/
├── components/ # React components
│ ├── Header.tsx # App header with wallet
│ ├── TokenCreationForm.tsx
│ ├── LiquidityManager.tsx
│ └── WalletButton.tsx
├── hooks/ # Custom React hooks
│ ├── usePumpFun.ts # Pump.fun interactions
│ ├── useSwapPump.ts # swap.pump.fun interactions
│ └── useWalletBalance.ts
├── utils/ # Utility functions
│ ├── pumpfun.ts # Pump.fun program interactions
│ └── swapPump.ts # swap.pump.fun program interactions
├── App.tsx # Main app component
└── main.tsx # Entry point
Uses pump.fun's bonding curve program to create tokens with:
- Associated token accounts
- Bonding curve PDA
- Metadata upload (IPFS/Arweave integration needed for production)
Implements AMM-style liquidity pools on swap.pump.fun:
- LP token minting
- Proportional deposits/withdrawals
- Constant product formula for swaps
- This is a template/demo application
- Always verify transaction details before signing
- Test thoroughly on devnet before mainnet use
- Review and audit smart contract interactions
The pump.fun program ID is publicly known. However, swap.pump.fun program details may need to be updated based on the actual deployed contracts. Always verify program IDs from official sources.
- Token creation: ~0.02 SOL
- LP creation: Variable based on accounts created
- Swaps: Small fee (typically 0.3%)
Modify the theme in src/main.tsx:
const theme = createTheme({
palette: {
primary: {
main: '#your-color',
},
// ... other customizations
},
})- Create new components in
src/components/ - Add hooks in
src/hooks/ - Implement utility functions in
src/utils/ - Update
App.tsxto include new features
-
"Program not found"
- Verify program IDs are correct
- Check network connection
-
"Insufficient funds"
- Ensure wallet has enough SOL for rent and fees
- Check token account rent exemption
-
Transaction fails
- Check slippage settings
- Verify token accounts exist
- Review transaction simulation
Enable detailed logging:
// In browser console
localStorage.setItem('debug', 'solana:*')MIT License - Use at your own risk.
This software is provided as-is without any warranties. Cryptocurrency transactions are irreversible. Always test on devnet first and verify all contract interactions. The authors are not responsible for any losses incurred through the use of this software.