duels
Description: _No description_
README
🃏 DUEL: Crypto Battle Cards
A decentralized card battle game built for the Pyth Entropy hackathon. Battle with crypto-themed NFT cards powered by real price feeds and true randomness from Pyth Entropy.
🌟 Features
- True Randomness: Deck generation powered by Pyth Entropy
- Price-Based Stats: Card stats boosted by real crypto price feeds via Pyth Network
- Staking Battles: Players stake ETH and winner takes all
- NFT Cards: 16 unique crypto-themed cards (BTC Knight, ETH Wizard, Hypurr Cat, etc.)
- Free-to-Start: Get 5 unlock tickets when you create an account
- VS Mode: Battle other players or AI opponents
🚀 Quick Start
- Install Dependencies
``bash npm install ``
- Start Development Server
``bash npm run dev ``
- Deploy Contract (Optional - for development)
``bash # Configure your network in hardhat.config.js npm run deploy ``
- Open the Game
- Navigate to http://localhost:3000 - Connect your MetaMask wallet - Claim your free tickets and generate your first deck!
🎮 How to Play
- Get Started
- Connect your wallet (MetaMask) - Claim 5 free unlock tickets - Generate your random deck of 5 cards using Pyth Entropy
- Battle Modes
- Create Battle: Stake ETH and wait for opponents - Join Battle: Join existing battles created by other players - Quick Battle: Practice against AI opponents
- Card Stats
- Cards have Attack, Defense, and HP stats - Stats are boosted based on real crypto price movements - Strategy matters - build balanced decks!
🔧 Technical Details
Smart Contract Features
- Pyth Entropy Integration: True on-chain randomness for deck generation
- Pyth Price Feeds: Real-time crypto prices affect card performance
- Battle System: Automated battle resolution with staking
- Gas Optimized: Efficient storage and computation
Cards Available
- BTC Knight, ETH Wizard, SOL Warrior, USDT Shield
- BNB Beast, DOGE Pup, ADA Phoenix, XRP Swift
- LINK Oracle, AVAX Frost, DOT Connector, LTC Silver
- BCH Fork, TRX Speed, SHIB Rocket, Hypurr Cat
🏆 Pyth Entropy Integration
This project showcases innovative use of Pyth Entropy for:
- Deck Generation: Each player gets a truly random deck
- Battle Resolution: Fair outcomes with cryptographic randomness
- Card Distribution: Ensuring rare cards remain special
📄 Contract Addresses
Update these in app.js and deploy.js:
- DuelCards:
0x7222F6872ae99662A0b6fAC469143493711a3B2f(update after deployment) - Pyth Oracle: Network-specific address
- Pyth Entropy: Network-specific address
🔗 Useful Links
🎯 Hackathon Submission
Built for the Pyth Entropy Pool Prize - demonstrating innovative use of on-chain randomness in gaming applications.
🚀 Future Enhancements
- NFT minting for cards
- Tournament system
- More complex battle mechanics
- Mobile app version
- Multiplayer lobbies
---
Ready to duel? Connect your wallet and let the battles begin! ⚔️