EOS DApps is a comprehensive gambling and gaming smart contract platform built on the EOS blockchain. This project implements multiple casino-style games with provably fair mechanics, sophisticated banking systems, and player engagement features.
Game | Description | Features |
---|---|---|
Dice | Number prediction game | Simple betting, configurable odds |
Blackjack | Classic 21 card game | Hit, stand, double, surrender |
Baccarat | Traditional card game | Banker/Player betting |
Roulette | Wheel spinning game | Multiple bet types |
Slots | Slot machine | Multi-line betting |
Bullfight | Card-based game | Traditional Chinese game |
Quick3 | Fast betting game | Quick rounds |
Red/Black | Color prediction | Simple 50/50 game |
Scratch | Lottery scratch cards | Instant win mechanics |
- House Contract - Central banking and payment system
- Game Contracts - Individual game implementations
- Common Libraries - Shared utilities and templates
- Token Integration - Multi-token support
- โ Provably Fair Gaming - Cryptographic randomness verification
- ๐ฆ Multi-Token Support - Various cryptocurrency betting
- ๐ Player Statistics - Comprehensive tracking system
- ๐ Referral System - 0.5% bonus payments
- ๐ Security First - Multiple authorization layers
- โก Scalable Design - Modular contract architecture
- EOSIO development environment
- CMake 3.5+
- C++17 compatible compiler
git clone https://github.com/mason0510/eosDapps.git
cd eosDapps
mkdir build && cd build
cmake ..
make -j4
- Deploy the house contract first:
cleos set contract house ./house -p house@active
- Deploy individual game contracts:
cleos set contract dice ./dice -p dice@active
cleos set contract blackjack ./blackjack -p blackjack@active
# ... repeat for other games
- Initialize the house contract:
cleos push action house init '[]' -p house@active
The platform uses a sophisticated random number generation system:
- Seed Generation - Combines block data with game-specific parameters
- House Signature - Private key signing for verifiable randomness
- Hash Verification - SHA256 ensures tamper-proof results
- Public Verification - Players can verify game outcomes
Player โ Game Contract โ House Contract โ Payout Processing
โ
Referral Bonuses & Statistics
// Configure token support
cleos push action house addtoken '["EOS", "4,EOS", "eosio.token"]' -p house@active
// Set betting limits
cleos push action house setlimits '["EOS", "1.0000 EOS", "1000.0000 EOS"]' -p house@active
Each game supports customizable parameters through memo fields:
- Betting amounts
- Game-specific options
- Player preferences
- Central banking and token management
- Player statistics and history
- Referral system implementation
- Delayed payment handling
Each game directory contains:
*.cpp
- Main contract logic*.hpp
- Contract interface and tables- Game-specific mechanics and rules
cards.hpp
- Card game utilitiesrandom.hpp
- Cryptographic RNGutils.hpp
- General utilitiestables.hpp
- Database helpers
- Authorization Checks - Multi-level permission system
- Betting Limits - Configurable per token and game
- Balance Verification - Pre-transaction validation
- Emergency Controls - Contract pause mechanisms
- Audit Trail - Comprehensive logging system
- Total games played
- Win/loss ratios
- Betting history
- Performance analytics
- Bonus point accumulation
- Chest opening mechanics
- Referral bonuses
- Loyalty rewards
- Create game directory with contract files
- Implement game logic using provided templates
- Add to CMakeLists.txt
- Register with house contract
# Run unit tests
make test
# Deploy to testnet
./scripts/deploy_testnet.sh
- Scalable Architecture - Handles high transaction volumes
- Efficient Storage - Circular buffer history management
- Gas Optimization - Minimal resource usage
- Multi-Index Tables - Fast data retrieval
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This software is provided for educational and development purposes. Gambling may be illegal in your jurisdiction. Users are responsible for compliance with local laws and regulations.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: See
ๆถๆ่ฎพ่ฎก.md
for detailed architecture information
- EOS.IO team for the blockchain platform
- Community contributors and testers
- Open source libraries and tools used
Built with โค๏ธ on EOS blockchain