An intelligent automated comment bot for Pump.fun on the Solana blockchain. Generate AI-powered comments or use manual inputs to engage with tokens on the platform.
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- Project Structure
- How It Works
- Security
- Contributing
- License
- Support
- π§ AI-Powered Comments - Generate engaging comments using OpenAI GPT-4 Mini
- βοΈ Manual Input - Add custom comments manually
- π Wallet Support - Use new wallets or existing Solana wallets
- π Proxy Rotation - Built-in proxy support with automatic rotation for reliability
- β±οΈ Configurable Intervals - Set custom delay intervals between comments
- π Automatic Retry - Proxy failover mechanism for uninterrupted operation
- π Comment Management - View and manage your comment library
- π― User Agent Rotation - Randomized user agents to avoid detection
- π¬ Interactive CLI - Easy-to-use command-line interface
Before you begin, ensure you have the following installed:
- Node.js (v16.x or higher)
- npm or yarn
- TypeScript (included in dependencies)
- OpenAI API Key - Get one here
- Solana Wallet (optional - bot can generate new ones)
-
Install dependencies
npm install # or yarn install -
Create environment file
cp .env.example .env
Create a .env file in the root directory with the following variables:
# OpenAI Configuration
OPENAI_KEY=your_openai_api_key_here
# Token Configuration
PUMP_MINT=token_mint_address_here
# Bot Wallet (optional - can use new wallet instead)
BOT_KEY=your_solana_wallet_private_key_base58
# Comment Interval Configuration (in milliseconds)
COMMENT_MIN_INTERVAL=1000
COMMENT_MAX_INTERVAL=4000| Parameter | Description | Default | Required |
|---|---|---|---|
OPENAI_KEY |
Your OpenAI API key for AI comment generation | - | Yes |
PUMP_MINT |
The token mint address on Pump.fun | - | Yes |
BOT_KEY |
Base58 encoded private key of your Solana wallet | - | No* |
COMMENT_MIN_INTERVAL |
Minimum delay between comments (ms) | 1000 | No |
COMMENT_MAX_INTERVAL |
Maximum delay between comments (ms) | 4000 | No |
*Only required if using existing wallet mode
Create a proxy_list.json file in the root directory:
[
{
"protocols": "http",
"ip": "proxy_ip_address",
"port": "proxy_port"
},
{
"protocols": "https",
"ip": "another_proxy_ip",
"port": "another_proxy_port"
}
]npm run dev
# or
yarn devOnce started, you'll see an interactive menu with the following options:
[Main Menu]
[1] Generate AI Comments
[2] Get Comment List
[3] Run Comment Bot
[4] About Pumpfun Comment Bot
[5] Exit
Generate comments using AI or add them manually:
- Select "Generate Comment with AI"
- Enter a key sentence or context about the token
- The bot will use OpenAI GPT-4 Mini to generate relevant comments
- Comments are automatically saved to
data.json
Example prompt:
"Innovative DeFi token with staking rewards and governance features. Official site: example.com"
- Select "Input Comment Manually"
- Type your comment
- Comment is saved to
data.json
View all stored comments in your library with their index numbers.
Choose between two modes:
- Bot generates a new Solana wallet for each comment
- No prior wallet setup required
- Provides better anonymity
- Uses the wallet configured in
.env(BOT_KEY) - Maintains consistent identity
- Requires pre-configured wallet
Operation:
- Bot randomly selects comments from your library
- Posts comments at random intervals (within configured range)
- Uses proxy rotation for each request
- Press
0and Enter to stop the bot
Pumpfun_AI_Trading_Bot/
βββ src/
β βββ commands/ # CLI menu commands
β β βββ index.ts # Menu exports
β β βββ clis.ts # Command definitions
β βββ funcs/ # Core functionality
β β βββ index.ts # AI generation, comment posting
β βββ bot.ts # Bot authentication and posting logic
β βββ config.ts # Environment configuration
β βββ constants.ts # Constants and strings
β βββ index.ts # Entry point
β βββ types.ts # TypeScript type definitions
β βββ utils.ts # Utility functions
β βββ test.ts # Testing utilities
βββ data.json # Comment storage
βββ proxy_list.json # Proxy configuration
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ .env # Environment variables
βββ .gitignore # Git ignore rules
βββ README.md # Documentation
-
Wallet Authentication
- Bot signs a message with wallet's private key
- Timestamp-based signature ensures freshness
- Signature is verified before sending
-
Login Process
- POST request to Pump.fun's authentication endpoint
- Returns authentication token (cookie)
-
Token Generation
- Retrieves comment thread token using auth cookie
- Token required for posting comments
-
Random Selection
- Bot randomly selects a comment from your library
-
Proxy Rotation
- Randomly selects an unused proxy
- Falls back to next proxy on failure
- Rotates through all available proxies
-
User Agent Randomization
- Randomly selects from 10+ user agent strings
- Simulates different browsers and devices
-
Post Request
- Comment posted via Pump.fun's client proxy
- Includes authentication token in headers
- 10-second timeout per request
-
Delay
- Random delay between MIN and MAX intervals
- Prevents rate limiting and detection
BOT_KEY or commit it to public repositories.
npm run test
# or
yarn testTypeScript is executed directly via ts-node. No build step required for development.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Pump.fun - The platform this bot interacts with
- OpenAI - AI comment generation
- Solana - Blockchain infrastructure
- @solana/web3.js - Solana JavaScript API
- Language: TypeScript
- Blockchain: Solana
- AI Model: GPT-4 Mini
- Version: 1.0.0
Made with β€οΈ for the Solana Community
β Star this repo if you find it helpful!