A Chrome extension that enhances DexScreener by replacing Ethereum addresses with corresponding Farcaster usernames. PurpleHawk seamlessly integrates Farcaster's social layer into your DeFi experience.
- 🔄 Real-time address resolution to Farcaster usernames
- 🎯 Smart detection of wallet addresses in various formats
- ⚡ Efficient caching system for rapid lookups
- 🔗 Direct links to Warpcast profiles
- 💜 Distinctive purple styling for Farcaster names
- Clone this repository
git clone https://github.com/developerfred/purplehawk.git
cd purplehawk
- Install dependencies
npm install
- Create a
.env
file in the root directory with the following variables:
CACHE_DURATION=3600000
NEYNAR_API_KEY=your_api_key_here
NEYNAR_API_URL=https://api.neynar.com
- Build the extension
npm run build
- Load the extension in Chrome:
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode"
- Click "Load unpacked"
- Select the
dist
directory from the project
- Open Chrome and navigate to
Run the development build with:
npm run dev
This will watch for file changes and rebuild automatically.
PurpleHawk works by:
- Monitoring DexScreener pages for wallet addresses
- Batch-fetching Farcaster usernames using the Neynar API
- Caching resolved names for better performance
- Replacing addresses with clickable Farcaster usernames
- Built with TypeScript for type safety
- Uses Webpack for bundling
- Implements efficient caching to minimize API calls
- Batch processes address resolution for better performance
- Uses MutationObserver for dynamic content updates
The extension can be configured via environment variables:
CACHE_DURATION
: Duration to cache resolved names (in milliseconds)NEYNAR_API_KEY
: Your Neynar API keyNEYNAR_API_URL
: Neynar API endpoint
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some purple feature'
) - Push to the branch (
git push origin feature/purple-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ using:
- Neynar API for Farcaster integration
- TypeScript
- Webpack