Warning
The following is a prototype, reference implementation, and proof-of-concept. This open source code is provided for research, experimentation, and developer education only. This code has not been audited, is actively experimental, and may contain bugs, vulnerabilities, or incomplete features. Use at your own risk.
Decentralized rock-paper-scissors game, with on-chain leaderboard and game history.
- Solo — play against the computer, best-of-3
- Multiplayer — play against another player via Statement Store (commit-reveal anti-cheat)
Scoring: win +2, loss −1, draw 0.
Solo: You play locally → after the match, JSON with history is uploaded to Bulletin → contract stores CID + points.
Multiplayer: Create a room, get a code, share it with your opponent. Each round:
- Both players send
commit = SHA256(move + salt)over Statement Store - Once both commits arrive, they send
reveal = { move, salt } - Hash is verified, round winner is determined
Leaderboard: Contract on Asset Hub stores a address → (CID, points) mapping. All games live on Bulletin (off-chain, content-addressed).
npm install
# Dev server
npm run devOpen polkadot desktop on localhost.
Deploying your own copy (own contract, own
.dotname, published to the playground)? Follow the step-by-step DEPLOYMENT.md.
Account needs PAS tokens on Asset Hub (faucet) and Bulletin chain (faucet). Multiplayer requires running inside the Polkadot Desktop container (Host API).
This is a reference proof-of-concept, not a hardened production build. Before deploying it for any real use case, you are responsible for:
- Reviewing the code yourself.
- Checking that dependencies are up to date and free of known vulnerabilities.
- Securing your own fork or deployment environment (keys, secrets, network configuration).
- Tracking the latest tagged release / commits for security fixes — older releases are not backported (exceptions might apply).
For Parity's security disclosure process and Bug Bounty program, see parity.io/bug-bounty.
Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).