Skip to content

danitome24/lens-battle

Repository files navigation

⚔️ Lens Battle

⚠️ WIP - WORK IN PROGRESS
This project is currently under development. Features and documentation may change.

What is Lens Battle?

Lens Battle is a retro arcade–inspired dapp where your Lens Protocol profile becomes a unique fighter in a global battle arena. Each fighter's stats are derived from real Lens activity—followers, collects, tips, account age, and more—making every profile truly unique and resistant to spam or gaming.

Players can:

  • Register their Lens profile as a fighter and see their stats visualized.
  • Open challenge or direct challenges to other fighters, with battles resolved by a mix of stats and randomness (Chainlink VRF).
  • Watch results posted on Lens and climb a global leaderboard.
  • See a history of battles and stats evolve as they interact more on Lens.

The project combines:

  • Smart contracts for secure, transparent battle logic and event emission.
  • A fun, arcade-style frontend for a playful, competitive experience.

Lens Battle is designed to:

  • Showcase the power and creativity of Lens Protocol social data.
  • Encourage healthy competition and engagement on Lens.
  • Provide a tamper-resistant, anti-spam metric system for fighter stats.
  • Be extensible for new game modes, stat sources, and integrations.

🏗️ Monorepo Structure

apps/
  hardhat/      # Smart contracts (BattleArena.sol, tests, deploy scripts)
  web/          # Next.js frontend (arcade UI)
packages/
  abi/          # Exported contract ABIs for frontend
scripts/        # Utility scripts (export ABI, etc)
supabase/       # Supabase config & migrations

⚡ Getting Started

Prerequisites

  • Node.js >= 18
  • pnpm (recommended)
  • Foundry (for Solidity tests)
  • Supabase CLI (for local DB)

1. Install dependencies

pnpm install

2. Start Supabase locally

supabase start

3. Deploy DB migrations

supabase db push

4. Compile & test smart contracts

cd apps/hardhat
pnpm compile
pnpm test

5. Export contract ABIs

pnpm run export-abi

6. Start the frontend

cd apps/web
pnpm dev

💡 Contributing

PRs welcome! Please open issues for bugs or feature requests.


👥 Contributors

Special thanks to everyone who has contributed to Lens Battle:

  • @danitome24 — Project lead & main developer

Want to contribute? Open a PR, suggest features, or report bugs. All ideas and help are welcome!


📝 License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors