Skip to content

engrsadaqath/Bullshot

Repository files navigation

🚀 Bullshot - Decentralized Token Launchpad & Trading Platform

React Vite Ethers.js Base Network

Bullshot is a comprehensive decentralized token launchpad and trading platform built on the Base blockchain (Ethereum L2). It enables users to create, launch, and trade tokens with advanced features including real-time analytics, bonding curve mechanics, and professional trading interfaces.

🌟 Features

🪙 Token Creation & Launch

  • One-Click Token Creation: Deploy tokens with customizable parameters
  • Bonding Curve Mechanics: Automated price discovery and liquidity provision
  • PancakeSwap Integration: Seamless DEX listing when tokens reach 98% sold
  • Token Customization: Name, symbol, initial supply, and metadata

📊 Advanced Trading Interface

  • Professional TradingView Charts: Real-time price charts with technical indicators
  • Dual Pricing System: Bonding curve (pre-launch) and DEX (post-launch)
  • Real-time Updates: Live transaction monitoring and price updates
  • Mobile-Responsive Design: Optimized for all devices

📈 Analytics & Insights

  • Comprehensive Analytics Dashboard: Platform statistics and metrics
  • Volume Tracking: 24h, 1w, 1m, and all-time volume analysis
  • Token Performance Metrics: Progress tracking, holder analysis
  • Transaction History: Detailed buy/sell transaction logs

🏆 Community Features

  • Leaderboard System: User rankings based on activity and referrals
  • Referral Rewards: Points-based incentive system
  • Social Integration: Twitter, Telegram, and website links
  • Comment System: Community discussions and threads

🔐 Security & Wallet Integration

  • MetaMask Support: Seamless wallet connection
  • Multi-Chain Compatibility: Base, Ethereum, BSC support
  • Secure Transactions: Smart contract-based token operations
  • Real-time Balance Tracking: Live wallet balance updates

🏗️ Architecture

Frontend Stack

  • React 18.3.1: Modern React with hooks and functional components
  • Vite 5.3.4: Fast build tool and development server
  • React Bootstrap: UI components and responsive design
  • React Router DOM: Client-side routing
  • Chart.js & TradingView: Professional charting solutions

Blockchain Integration

  • Ethers.js 6.13.5: Ethereum library for smart contract interaction
  • Web3.js: Additional blockchain functionality
  • Base Network: Primary blockchain (Ethereum L2)
  • BSC Support: Binance Smart Chain compatibility

Real-time Features

  • Pusher/Laravel Echo: WebSocket connections for live updates
  • TradingView Data Feeds: Real-time price and volume data
  • Indexer Integration: Automated transaction tracking

Smart Contracts

  • Solidity: Smart contract development
  • ERC-20 Standard: Token implementation
  • Bonding Curve: Automated market maker
  • Factory Pattern: Token creation and deployment

📁 Project Structure

bullshot/
├── public/
│   ├── charting_library/     # TradingView library files
│   ├── datafeeds/           # UDF data feed implementation
│   └── index.html
├── src/
│   ├── components/
│   │   ├── Analytics/       # Analytics dashboard components
│   │   ├── BlockChainFunctions/ # Blockchain utilities
│   │   ├── Create/          # Token creation components
│   │   ├── Header/          # Navigation components
│   │   ├── Home/            # Home page components
│   │   ├── Leaderboard/     # Leaderboard components
│   │   ├── Profile/         # User profile components
│   │   ├── translation/     # Internationalization
│   │   ├── Buy.jsx          # Token buying interface
│   │   ├── Sell.jsx         # Token selling interface
│   │   ├── Table.jsx        # Transaction/holder tables
│   │   ├── TokenContent.jsx # Main token page content
│   │   └── TradingViewWidget.jsx # TradingView integration
│   ├── pages/
│   │   ├── Home.jsx         # Main landing page
│   │   ├── Token.jsx        # Individual token page
│   │   ├── Finalized.jsx    # Token creation page
│   │   ├── Analytics.jsx    # Analytics dashboard
│   │   ├── Leaderboard.jsx  # User leaderboard
│   │   └── Profile.jsx      # User profile page
│   ├── assets/              # Images, styles, and static files
│   ├── App.jsx              # Main application component
│   ├── main.jsx             # Application entry point
│   ├── config.js            # Configuration settings
│   └── web3.js              # Web3 initialization
├── falttend.sol             # Smart contract code
├── package.json             # Dependencies and scripts
└── vite.config.js           # Vite configuration

🚀 Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • MetaMask browser extension
  • Base Network configured in MetaMask

Installation

  1. Clone the repository
git clone <repository-url>
cd bullshot
  1. Install dependencies
npm install
  1. Configure environment
# Copy and configure environment variables
cp .env.example .env
  1. Start development server
npm run dev
  1. Build for production
npm run build

Smart Contract Deployment

  1. Deploy smart contracts
# Deploy to Base network
npx hardhat deploy --network base
  1. Update contract addresses
# Update contract addresses in config files

🔧 Configuration

API Configuration

// src/config.js
const config = {
    baseUrl: 'https://api.bullshot.org',
    apiBaseURL: 'https://api.bullshot.org/api',
    socket: {
        host: 'live.bullshot.org',
        port: 6001,
        key: 'bullshotkeysocket',
        cluster: 'mt1',
        forceTLS: true,
        broadcaster: 'pusher',
        encrypted: true,
    }
};

Blockchain Configuration

// Base Network Configuration
const baseChainID = '0x2105';
const baseRpcUrl = 'https://mainnet.base.org';

📊 Key Features Explained

Token Creation Process

  1. User connects wallet and navigates to token creation
  2. Token parameters are set (name, symbol, initial supply)
  3. Smart contract deployment creates token and bonding curve
  4. Initial liquidity is provided through bonding curve
  5. Token becomes tradeable on the platform

Trading Mechanics

  1. Pre-Launch: Tokens trade on bonding curve with automated pricing
  2. Progress Tracking: Real-time monitoring of tokens sold
  3. DEX Launch: Automatic PancakeSwap listing at 98% sold
  4. Post-Launch: Trading continues on DEX with market pricing

Real-time Updates

  • WebSocket Integration: Live transaction and price updates
  • Transaction Streaming: Real-time transaction history
  • Price Updates: Live price changes and market cap calculations
  • Holder Updates: Real-time holder balance changes

🎨 UI/UX Features

Responsive Design

  • Mobile-First: Optimized for mobile devices
  • Desktop Experience: Full-featured desktop interface
  • Touch-Friendly: Optimized for touch interactions
  • Cross-Platform: Works on all modern browsers

Trading Interface

  • Professional Charts: TradingView integration with technical indicators
  • Real-time Data: Live price, volume, and transaction data
  • Order Management: Buy/sell interface with slippage protection
  • Portfolio Tracking: User token holdings and performance

Analytics Dashboard

  • Platform Metrics: Total tokens, transactions, users
  • Volume Analysis: Time-based volume tracking
  • Performance Charts: Visual data representation
  • Trend Analysis: Market trend identification

🔒 Security Features

Smart Contract Security

  • Audited Contracts: Professional security audits
  • Access Controls: Owner-only functions
  • Emergency Stops: Circuit breakers for emergencies
  • Upgradeable Contracts: Modular contract architecture

Frontend Security

  • Input Validation: Client-side data validation
  • XSS Protection: Cross-site scripting prevention
  • CSRF Protection: Cross-site request forgery protection
  • Secure Communication: HTTPS and encrypted WebSocket

🌐 API Endpoints

Token Management

  • GET /api/tokens - List all tokens
  • GET /api/tokens/{address} - Get token details
  • POST /api/tokens - Create new token
  • GET /api/tokens-trending - Get trending tokens

Transaction Data

  • GET /api/transactions/{address} - Get token transactions
  • POST /api/transaction - Save transaction
  • GET /api/transactions-holc/{address} - Get HOLC data
  • GET /api/transactions-holders/{address} - Get holder data

Analytics

  • GET /api/tokens-created - Token creation analytics
  • GET /api/transactions-created - Transaction analytics
  • GET /api/leaderboard/points - Leaderboard data

🚀 Deployment

Production Build

npm run build
npm run preview

Environment Variables

VITE_API_BASE_URL=https://api.bullshot.org
VITE_SOCKET_HOST=live.bullshot.org
VITE_SOCKET_KEY=bullshotkeysocket
VITE_CHAIN_ID=0x2105

Docker Deployment

docker build -t bullshot .
docker run -p 3000:3000 bullshot

🤝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

🙏 Acknowledgments

  • TradingView for professional charting library
  • Base Network for L2 scaling solution
  • PancakeSwap for DEX integration
  • OpenZeppelin for secure smart contracts
  • React Community for excellent documentation

Built with ❤️ by the Bullshot Team

Empowering the future of decentralized token trading

About

Bullshot Data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •