A real-time monitoring tool for detecting new token creations on the four.meme platform on BNB Smart Chain.
- 🕒 Real-time Monitoring: Continuously monitors new token creations
- 📊 Historical Catch-up: Scans historical blocks to catch up on past events
- 🎯 Event Filtering: Specifically targets four.meme token creation events
- 📋 Detailed Logging: Provides comprehensive information about each token creation
- 🔧 Configurable: Easy to modify RPC endpoints, block ranges, and monitoring intervals
- Node.js 18.0.0 or higher
- npm or yarn
- Clone or download this project
- Install dependencies:
npm installBefore running the detector, you need to update the configuration in fourmeme-token-detector.ts:
- Factory Address: Replace the placeholder factory address with the actual four.meme factory contract address
- Event Signature: Replace the placeholder event signature with the actual TokenCreated event signature
const CONFIG = {
// BSC RPC endpoint (you can use public endpoints or your own)
RPC_URL: 'https://bsc-dataseed.binance.org/',
// Factory contract address for four.meme
FACTORY_ADDRESS: '0x0000000000000000000000000000000000000000', // TODO: Replace with actual factory address
// Token creation event signature
TOKEN_CREATED_EVENT: '0x0000000000000000000000000000000000000000000000000000000000000000', // TODO: Replace with actual event signature
// Monitoring configuration
START_BLOCK: 30000000, // Approximate recent block number
BLOCKS_PER_BATCH: 1000, // Number of blocks to scan per batch
POLLING_INTERVAL: 10000, // Check for new blocks every 10 seconds
};You can find the required information by:
- Factory Address: Check four.meme's official documentation or smart contracts
- Event Signature: Use tools like BSCScan to examine the factory contract events
npm run devnpm startnpm run build
node dist/fourmeme-token-detector.jsWhen a new token is created, you'll see output like:
🎉 New Token Created!
📋 Details:
Token Address: 0x1234567890123456789012345678901234567890
Creator: 0x0987654321098765432109876543210987654321
Block: 31234567
Transaction: 0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890
Timestamp: 2024-12-02T10:30:45.000Z
Create Fee: 0.001 BNB
Sell Fee: 0.002 BNB
Gas Settings:
Buy Gas Price: 5000000000
Buy Gas Limit: 300000
Sell Gas Price: 5000000000
Sell Gas Limit: 300000
──────────────────────────────────
four-meme-token-detector/
├── fourmeme-token-detector.ts # Main executable file
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This file
The detector monitors the BNB Smart Chain for TokenCreated events emitted by the four.meme factory contract. Each event contains:
- Token Address: The address of the newly created token
- Creator Address: The address of the token creator
- Transaction Details: Gas price and limit used in creation
- Token Parameters: Trading fees and gas settings configured by four.meme
- Historical Catch-up: Scans past blocks in batches to process historical events
- Real-time Monitoring: Polls for new blocks at regular intervals
- Error Handling: Continues monitoring even if individual blocks fail to process
- "Cannot find module 'viem'": Run
npm installto install dependencies - No events detected: Check that the factory address and event signature are correct
- RPC errors: Try using a different BSC RPC endpoint
- Rate limiting: Increase the polling interval or use your own RPC node
You can use these public BSC RPC endpoints:
https://bsc-dataseed.binance.org/https://bsc-dataseed1.binance.org/https://bsc-dataseed2.binance.org/https://bsc-dataseed3.binance.org/
MIT License - feel free to use and modify as needed.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This tool is for educational and monitoring purposes only. Always verify token contracts and conduct your own research before interacting with any tokens on the blockchain.