Skip to content

Code repository for Blitz of the Hidden Soldiers. Unleash Tactical Mastery, Reveal the Hidden Heroes!

License

Notifications You must be signed in to change notification settings

TobeTek/blitz-of-the-hidden-soldiers

Repository files navigation

Blitz of the Hidden Soldiers

Open in Gitpod

Blitz of The Hidden Soldiers (BoTHS), a game of incomplete information, blends the strategic depth of traditional chess with the intrigue of hidden moves and pieces. This project will implement a blind chess game on the Topos testnet, leveraging ZKPs to obscure board positions. The primary collectible, donums (Latin for gifts), bestow unique abilities upon players. In this immersive gaming experience, each player is distinctly identified by their public blockchain address, ensuring transparency and security throughout the gameplay.

Installation

Install hardhat and development dependencies with npm

  npm i

or with yarn

yarn install

Follow the online guide to install circom

Running Tests

Try running some of the following tasks:

  1. To compile all circom circuits and generate corresponding zkeys:
./scripts/check_circom.sh
  1. General HardHat/Smart Contract Commands Run Tests
npx hardhat test

Run a local node

npx hardhat node --deploy --export-all deployments.json

Deploy (using the [hardhat-deploy] (https://github.com/wighawag/hardhat-deploy) plugin)

npx hardhat deploy --export-all --network [network-name]

Upload smart contract addresses and their corresponding ABI to Firebase

npx hardhat run scripts/writeDeploymentsToFirebase.ts

Directory Structure

  • src/contracts: Solidity Smart contracts
    • ChessPieceCollection: ERC1155 Game Collectible contract
    • GameManager.sol: Create games, validate piece formations, and token stakes.
    • ChessGame.sol: All the chess-specific logic you'd expect. Was that a checkmate?
    • src/circom_verifiers: Solidity verifier contracts for circom circuits.
    • src/contracts/mocks: Mock smart contracts for testing.
  • src/circuits: Circom circuits
  • src/tests: Tests!

Interact with the Smart Contracts on the Topos Testnet

Read the DevLog

About

Code repository for Blitz of the Hidden Soldiers. Unleash Tactical Mastery, Reveal the Hidden Heroes!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published