{"id":34827396,"url":"https://github.com/profullstack/ethshot-web","last_synced_at":"2026-01-20T18:05:49.079Z","repository":{"id":306175574,"uuid":"1024788478","full_name":"profullstack/ethshot-web","owner":"profullstack","description":"A viral Ethereum-powered game where users pay 0.001 ETH per shot for a 1% chance to win the jackpot.","archived":false,"fork":false,"pushed_at":"2025-08-13T13:45:58.000Z","size":1756,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-27T00:52:43.460Z","etag":null,"topics":["eth","games","jackbot","smart-contracts"],"latest_commit_sha":null,"homepage":"https://ethshot.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/profullstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-23T08:47:59.000Z","updated_at":"2025-08-13T13:46:01.000Z","dependencies_parsed_at":"2025-07-24T05:36:50.855Z","dependency_job_id":"1b4031e0-bb38-49a0-a4da-acd2e64effb7","html_url":"https://github.com/profullstack/ethshot-web","commit_stats":null,"previous_names":["profullstack/ethshot-web"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/profullstack/ethshot-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fethshot-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fethshot-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fethshot-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fethshot-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/profullstack","download_url":"https://codeload.github.com/profullstack/ethshot-web/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profullstack%2Fethshot-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28608047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eth","games","jackbot","smart-contracts"],"created_at":"2025-12-25T15:21:05.761Z","updated_at":"2026-01-20T18:05:49.074Z","avatar_url":"https://github.com/profullstack.png","language":"JavaScript","readme":"# ETH Shot 🎯\n\n\u003c!-- BADGES_START --\u003e\n[![Node.js](https://img.shields.io/badge/Node.js-20+-339933?style=flat\u0026logo=node.js\u0026logoColor=white)](https://nodejs.org/)\n[![SvelteKit](https://img.shields.io/badge/SvelteKit-Latest-FF3E00?style=flat\u0026logo=svelte\u0026logoColor=white)](https://kit.svelte.dev/)\n[![Ethers.js](https://img.shields.io/badge/Ethers.js-v6-627EEA?style=flat\u0026logo=ethereum\u0026logoColor=white)](https://ethers.org/)\n[![Supabase](https://img.shields.io/badge/Supabase-Database-3ECF8E?style=flat\u0026logo=supabase\u0026logoColor=white)](https://supabase.com/)\n[![Mocha+Chai](https://img.shields.io/badge/Testing-Mocha+Chai-8D6748?style=flat\u0026logo=mocha\u0026logoColor=white)](https://mochajs.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Deploy with Vercel](https://img.shields.io/badge/Deploy-Vercel-000000?style=flat\u0026logo=vercel\u0026logoColor=white)](https://vercel.com/)\n[![Sepolia Network](https://img.shields.io/badge/Network-Sepolia-FFC947?style=flat\u0026logo=ethereum\u0026logoColor=white)](https://sepolia.etherscan.io/)\n[![Ethereum Mainnet](https://img.shields.io/badge/Network-Mainnet-627EEA?style=flat\u0026logo=ethereum\u0026logoColor=white)](https://etherscan.io/)\n\u003c!-- BADGES_END --\u003e\n\nA viral Ethereum-powered game where users pay 0.0005 ETH per shot for a 1% chance to win the jackpot.\n\n## 🎮 Game Overview\n\nETH Shot is a decentralized gambling game built on Ethereum where players take shots at winning the jackpot. Each shot costs 0.0005 ETH with a 1% chance of winning the entire pot. The game features real-time updates, social sharing, sponsor integration, and a viral referral system with discount rewards.\n\n## ✨ Features\n\n- **🎯 Smart Contract Game**: Built on Ethereum with provably fair 1% win probability\n- **💰 Dynamic Jackpot**: Pot grows with each shot, 90% goes to winner\n- **🔒 Wallet Integration**: Connect with MetaMask, WalletConnect, and other Web3 wallets\n- **⚡ Real-time Updates**: Live pot updates and winner announcements via Supabase\n- **⏰ Cooldown System**: 1-hour cooldown between shots per wallet address\n- **🎪 Sponsor Rounds**: Businesses can sponsor rounds for 0.001 ETH with custom branding\n- **🎯 Referral System**: Invite friends and earn discount rewards for viral growth\n- **💰 Discount Rewards**: 20% discounts on shots earned through referrals with 30-day expiration\n- **📱 Social Sharing**: Share wins and referral links on Twitter\n- **🎨 Winner Animations**: Confetti and celebration effects for jackpot wins\n- **📊 Leaderboards**: Track top players, recent winners, and referral champions\n- **📱 Responsive Design**: Optimized for desktop and mobile devices\n\n## 🛠 Tech Stack\n\n### Smart Contract\n- **Solidity**: Smart contract development\n- **OpenZeppelin**: Security libraries (ReentrancyGuard, Pausable, Ownable)\n- **Hardhat**: Development environment and testing\n\n### Frontend\n- **SvelteKit**: Modern web framework with SSR\n- **Vite**: Fast build tool and dev server\n- **Tailwind CSS**: Utility-first CSS framework\n- **Ethers.js v6**: Ethereum interaction library\n- **Web3Modal**: Multi-wallet connection\n\n### Backend \u0026 Database\n- **Supabase**: PostgreSQL database with real-time subscriptions\n- **Real-time subscriptions**: Live updates for winners, shots, and sponsors\n\n### Testing \u0026 Quality\n- **Mocha + Chai**: JavaScript testing framework\n- **Hardhat**: Smart contract testing\n- **ESLint + Prettier**: Code formatting and linting\n- **Sinon**: Mocking and stubbing for tests\n\n### Deployment\n- **Vercel**: Frontend hosting and deployment\n- **Sepolia Testnet**: Ethereum testnet for testing\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Node.js 20+\n- pnpm (recommended) or npm\n- MetaMask or other Web3 wallet\n- Infura/Alchemy API key\n- Supabase account\n\n### Installation\n\n1. **Clone the repository:**\n```bash\ngit clone https://github.com/your-username/ethshot-web.git\ncd ethshot-web\n```\n\n2. **Install dependencies:**\n```bash\npnpm install\n```\n\n3. **Set up environment variables:**\n```bash\ncp .env.example .env\n```\n\nEdit `.env` with your configuration:\n```env\n# Smart Contract Configuration\nVITE_CONTRACT_ADDRESS=0x1234567890123456789012345678901234567890\nVITE_RPC_URL=https://sepolia.infura.io/v3/your-infura-key\n\n# Supabase Configuration\nVITE_SUPABASE_URL=https://your-project.supabase.co\nVITE_SUPABASE_ANON_KEY=your-anon-key\n\n# Application Configuration\nVITE_APP_URL=https://ethshot.io\nVITE_NETWORK_NAME=Sepolia Testnet\nVITE_CHAIN_ID=11155111\n```\n\n4. **Start the development server:**\n```bash\npnpm dev\n```\n\n5. **Open [http://localhost:5173](http://localhost:5173) in your browser.**\n\n## 📋 Smart Contract\n\nThe game is powered by a Solidity smart contract with the following specifications:\n\n### Game Mechanics\n- **Shot Cost**: 0.0005 ETH per shot (0.0004 ETH with 20% referral discount)\n- **Win Probability**: 1% chance to win the jackpot\n- **Payout Split**: 90% to winner, 10% to contract owner\n- **Cooldown Period**: 1 hour (3600 seconds) between shots per wallet\n- **Sponsor Cost**: 0.001 ETH to sponsor a round with custom branding\n- **Referral Discounts**: 20% discount for both referrer and referee\n\n### Key Functions\n- `takeShot()`: Take a shot at the jackpot (payable)\n- `sponsorRound(string name, string logoUrl)`: Sponsor a round (payable)\n- `getCurrentPot()`: Get current jackpot amount\n- `getPlayerStats(address)`: Get player statistics\n- `canTakeShot(address)`: Check if player can take a shot\n- `getCooldownRemaining(address)`: Get remaining cooldown time\n\n### Security Features\n- **ReentrancyGuard**: Prevents reentrancy attacks\n- **Pausable**: Emergency pause functionality\n- **Ownable**: Access control for admin functions\n- **Randomness**: Uses block hash and timestamp for randomness\n\n## 🧪 Testing\n\n### Run Smart Contract Tests\n```bash\npnpm test:contracts\n```\n\n### Run Frontend Tests\n```bash\npnpm test\n```\n\n### Run All Tests\n```bash\npnpm test:all\n```\n\n### Test Coverage\n```bash\npnpm coverage\n```\n\n## 🚀 Deployment\n\n### 1. Smart Contract Deployment\n\n**Deploy to Sepolia Testnet:**\n```bash\n# Configure your private key in hardhat.config.js\npnpm deploy:testnet\n```\n\n**Verify Contract on Etherscan:**\n```bash\npnpm verify:testnet\n```\n\n### 2. Database Setup\n\n1. Create a new Supabase project\n2. Run the SQL schema from `supabase/schema.sql`\n3. Configure Row Level Security (RLS) policies\n4. Update environment variables with Supabase credentials\n\n### 3. Frontend Deployment\n\n**Deploy to Vercel:**\n```bash\n# Install Vercel CLI\nnpm i -g vercel\n\n# Deploy\nvercel --prod\n```\n\n**Environment Variables in Vercel:**\n- `VITE_CONTRACT_ADDRESS`\n- `VITE_RPC_URL`\n- `VITE_SUPABASE_URL`\n- `VITE_SUPABASE_ANON_KEY`\n- `VITE_APP_URL`\n- `VITE_NETWORK_NAME`\n- `VITE_CHAIN_ID`\n\n## 📊 Database Schema\n\nThe application uses Supabase PostgreSQL with the following tables:\n\n- **shots**: Records all shot attempts with discount tracking\n- **winners**: Tracks jackpot winners\n- **sponsors**: Manages sponsorship rounds\n- **players**: Player statistics and rankings\n- **referral_codes**: User referral codes for viral growth\n- **referrals**: Tracks referral relationships\n- **referral_discounts**: Manages discount rewards and usage\n\nReal-time subscriptions provide live updates for:\n- New winners\n- Shot attempts\n- Sponsor activations\n\n## 🎨 Components\n\n### Core Components\n- **GameButton**: Main \"Take the Shot\" button with loading states\n- **PotDisplay**: Real-time jackpot amount display\n- **WalletConnect**: Multi-wallet connection interface\n- **WinnerAnimation**: Confetti and celebration effects\n- **Leaderboard**: Top players and statistics\n- **RecentWinners**: Live winner feed\n- **SponsorBanner**: Sponsor branding display\n- **ReferralSystem**: Referral code management and sharing\n- **DiscountButton**: Apply referral discounts to shots\n- **ReferralLeaderboard**: Top referrers and statistics\n\n### Stores (State Management)\n- **gameStore**: Game state, contract interactions, database integration\n- **walletStore**: Wallet connection and Web3 functionality\n- **toastStore**: User notifications and feedback\n\n## 🔧 Development Scripts\n\n```bash\n# Development\npnpm dev              # Start dev server\npnpm build            # Build for production\npnpm preview          # Preview production build\n\n# Testing\npnpm test             # Run frontend tests\npnpm test:contracts   # Run smart contract tests\npnpm test:all         # Run all tests\npnpm coverage         # Generate test coverage\n\n# Smart Contract\npnpm compile          # Compile contracts\npnpm deploy:testnet   # Deploy to Sepolia\npnpm verify:testnet   # Verify on Etherscan\n\n# Code Quality\npnpm lint             # Run ESLint\npnpm format           # Format with Prettier\n```\n\n## 🚨 Security Considerations\n\n### Smart Contract Security\n- **Audited Libraries**: Uses OpenZeppelin's battle-tested contracts\n- **Reentrancy Protection**: ReentrancyGuard prevents reentrancy attacks\n- **Access Control**: Ownable pattern for admin functions\n- **Emergency Pause**: Pausable functionality for emergency stops\n- **Input Validation**: Proper validation of all inputs\n\n### Frontend Security\n- **Environment Variables**: Sensitive data stored in environment variables\n- **HTTPS Only**: All production traffic over HTTPS\n- **Content Security Policy**: Implemented via Vercel headers\n- **XSS Protection**: Framework-level XSS protection\n\n## 📈 Performance Optimizations\n\n- **Database Indexing**: Optimized queries with proper indexes\n- **Real-time Subscriptions**: Efficient WebSocket connections\n- **Caching**: Strategic caching of contract calls\n- **Code Splitting**: Lazy loading of components\n- **Image Optimization**: Optimized assets and images\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Make your changes\n4. Add tests for new functionality\n5. Run the test suite: `pnpm test:all`\n6. Commit your changes: `git commit -m 'Add amazing feature'`\n7. Push to the branch: `git push origin feature/amazing-feature`\n8. Submit a pull request\n\n### Development Guidelines\n- Follow the existing code style\n- Write tests for new features\n- Update documentation as needed\n- Use conventional commit messages\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## ⚠️ Disclaimer\n\n**Important**: This is a game of chance involving real cryptocurrency. Please consider the following:\n\n- **Gambling Risk**: Only gamble with funds you can afford to lose\n- **Smart Contract Risk**: Smart contracts may contain bugs or vulnerabilities\n- **Regulatory Compliance**: Ensure compliance with local gambling laws\n- **No Guarantees**: No guarantees of winnings or returns\n- **Educational Purpose**: This project is primarily for educational purposes\n\n## 🆘 Support\n\n- **Documentation**: Check this README and inline code comments\n- **Issues**: Report bugs via GitHub Issues\n- **Discussions**: Join discussions in GitHub Discussions\n- **Community**: Follow updates on Twitter [@profullstackinc](https://twitter.com/profullstackinc)\n- **Discord**: Join our community on [Discord](https://discord.gg/w5nHdzpQ29)\n\n## 🎯 Roadmap\n\n### Phase 1 (Current)\n- [x] Core game mechanics\n- [x] Smart contract deployment\n- [x] Frontend application\n- [x] Database integration\n- [x] Real-time updates\n\n### Phase 2 (Planned)\n- [ ] Mobile app development\n- [ ] Advanced analytics dashboard\n- [ ] NFT rewards for winners\n- [x] Referral system with discount rewards\n- [ ] Multiple game modes\n\n### Phase 3 (Future)\n- [ ] Layer 2 integration (Polygon, Arbitrum)\n- [ ] DAO governance\n- [ ] Tournament system\n- [ ] Cross-chain compatibility\n\n---\n\n**Built with ❤️ by the ETH Shot team**","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofullstack%2Fethshot-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprofullstack%2Fethshot-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofullstack%2Fethshot-web/lists"}