Skip to content

A proof of post system that keep X post proof on-chain forever

License

Notifications You must be signed in to change notification settings

ClipXonchain/clipx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

.

ClipX Twitter Bot πŸ“Έ

A powerful Twitter bot that captures screenshots of tweets, registers them on the opBNB blockchain for immutable proof, and stores them on IPFS via Pinata.

🌟 Features

  • Automated Mention Monitoring: Continuously monitors Twitter mentions and responds automatically
  • High-Quality Screenshot Capture: Uses Playwright for accurate tweet rendering with fallback to API-based generation
  • Blockchain Verification: Registers every screenshot on opBNB (Layer 2 for BNB Smart Chain) with transaction proof
  • Decentralized Storage: Uploads screenshots to IPFS via Pinata for permanent, censorship-resistant storage
  • Smart Duplicate Prevention: Tracks processed mentions and parent posts to avoid spam
  • Flexible Configuration: Supports both testnet and mainnet deployment
  • Rate Limit Handling: Built-in cooldowns and scheduling to respect Twitter API limits

🎯 How It Works

  1. User mentions the bot on a tweet they want to capture
  2. Bot captures a screenshot of the original tweet (not the mention)
  3. Screenshot is uploaded to IPFS via Pinata
  4. Proof is registered on opBNB blockchain with the IPFS CID and tweet ID
  5. Bot replies to the original tweet with the screenshot and blockchain transaction link
  6. Attribution is included: "Requested by @username" in the reply

πŸš€ Getting Started

Prerequisites

  • Python 3.8 or higher
  • Twitter Developer Account with API access
  • opBNB wallet with BNB for gas fees
  • Pinata account for IPFS storage
  • Playwright browser binaries

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/clipx-bot.git
    cd clipx-bot
  2. Install Python dependencies

    pip install -r requirements.txt
  3. Install Playwright browsers

    playwright install chromium
  4. Configure your credentials

    • Copy config.example.py to config.py
    • Fill in all required API keys and credentials
    • See Configuration section below

Configuration

Edit the config.py file with your credentials:

Twitter API Credentials

  • TWITTER_API_KEY: Your Twitter API consumer key
  • TWITTER_API_SECRET: Your Twitter API consumer secret
  • TWITTER_ACCESS_TOKEN: Your Twitter access token
  • TWITTER_ACCESS_SECRET: Your Twitter access token secret
  • TWITTER_BEARER_TOKEN: Your Twitter bearer token (required for v2 API)
  • BOT_USERNAME: Your bot's Twitter handle (e.g., "@ClipX0_")

opBNB Configuration

  • OPBNB_PRIVATE_KEY: Your wallet private key (keep this secure!)
  • OPBNB_CONTRACT_ADDRESS: Your deployed smart contract address
  • OPBNB_USE_TESTNET: Set to True for testnet, False for mainnet

Pinata Configuration

  • PINATA_API_KEY: Your Pinata API key
  • PINATA_SECRET_API_KEY: Your Pinata secret API key

Bot Behavior Settings

  • CHECK_INTERVAL_SECONDS: How often to check for mentions (default: 280)
  • REPLY_COOLDOWN_SECONDS: Delay between replies (default: 30)
  • MAX_MENTION_AGE_SECONDS: Ignore mentions older than this (default: 1500)
  • QUEUE_WINDOW_SECONDS: Time window for collecting mentions (default: 300)

`

πŸ“ž Support

For support, please open an issue in the GitHub repository or contact @ClipX0_ on Twitter.

⚠️ Disclaimer

This bot is provided as-is. Use at your own risk. Always comply with Twitter's Automation Rules and opBNB network policies.


Built on BNBCHAIN

About

A proof of post system that keep X post proof on-chain forever

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published