Welcome to the 8 Ball Pool On-Chain ZK-Enabled Game, where you can play 8 ball pool on the blockchain with zero-knowledge proofs (ZKPs) for enhanced privacy and security!
This project aims to bring the classic game of 8 ball pool to the blockchain, allowing players to compete in a secure and transparent environment. By leveraging zero-knowledge proofs, players can verify game actions without revealing sensitive information, ensuring fair gameplay. All the Smart contracts are deployed and verified(on ScrollScan) with the contract addresses as follow:
- BallPool.sol : 0x74586B4482e94EC89a030cf171886b61aB2cd665.
- TurnVerifier: 0x332C5Ce79F04a3FC44895eF21A7c6A505416dE13.
- PocketBallVerifier: 0xeAA57325e6fb04616346B83A355b0560975163E1.
- StateVerifier: 0x05a7bc653BC228dBAD8dF36Dd206bB42f0a40802.
- GameOutcomeVerifier: 0xAd5766018731A611628D9dBD5F04a0a4EBac7968.
- Zero-Knowledge Proofs: Verify game actions without revealing sensitive information, such as pocketed balls or player turns with noirs ZKPs.
- Secure Gameplay: Play 8 ball pool on the blockchain, ensuring the integrity of game actions and outcomes.
- Transparent Smart Contracts: Smart contracts govern the game rules, ensuring fairness and transparency for all players.
- Global Leaderboard: Compete against players from around the world and climb the global leaderboard.
- Game Setup: Players join a game and set up the game board.
- Turn-Based Gameplay: Players take turns hitting the cue ball and attempting to pocket their assigned balls.
- Zero-Knowledge Proofs: After each move, players can generate and verify zero-knowledge proofs to ensure the validity of their actions.
- Game Completion: The game ends when a player pockets all of their balls and the 8 ball, or when a player commits a foul.
- Blockchain Verification: Game outcomes are verified on the blockchain, ensuring fair play and preventing cheating.
To get started with the 8 Ball Pool On-Chain ZK-Enabled Game, follow these steps:
- Install Dependencies: Install the necessary dependencies for running the game.
- Deploy Smart Contracts: Deploy the smart contracts to your preferred blockchain network.
- Play the Game: Join a game, make your moves, and verify them using zero-knowledge proofs.
- Compete and Win: Compete against other players and climb the global leaderboard!
- Blockchain: Scroll Sepolia Testnet Network.
- Smart Contracts: Solidity for writing smart contracts.
- Zero-Knowledge Proofs: Noir-lang for implementing zero-knowledge proofs.
We welcome contributions from the community to improve the 8 Ball Pool On-Chain ZK-Enabled Game. If you have ideas for new features, bug fixes, or enhancements, please submit a pull request or open an issue on GitHub.
This project is licensed under the MIT License, which means you are free to use, modify, and distribute the code as you see fit. See the LICENSE file for more details.