Updated 139 days ago

Scroll Fighter

Bringing fighting and violence on-chain using Scroll and Aztec

🎮 Scroll Fighter is an innovative, blockchain-based fighting game that lives on the Scroll network. This game uses Scroll smart contracts and Noir contracts on Aztec to ensure secure and proofably fair fights..

⚙️ Built on Scroll, Aztec, The Graph and NextJS.

Partner Bounties

Aztec

A contract written in Noir is used to verify the validity of the challenger's committed strategy. By providing a proof generated by Noir, the game smart contract can use the on-chain verifier to ensure the strategy is valid. The Noir verifier checks if the fighter exists and if the moves are valid.

Sindri

Scroll Fighter uses Noir and Sindri to generate proofs using the Sindri API. A very smooth and developer friendly way to interact with zk-proofs.

The Graph

A subgraph is created to query created games on the ScrollFighter contract. Check out the games tab to see a nice overview of games that are retrieved from the subgraph. Please check out the screenshot below to see the games overview (it's not part of the demo video, because I completed this part very last minute).

Ankr

This project uses Ankr RPC to deploy the game smart contracts. See the hardhat config file here.

Next steps

Due to the limited time, I could not complete everything I set out to do. Additional features that I plan to add are:

  • Allow challengers to start open games (anyone can join/accept)
  • Complete and polish up game display animations

Links

Verified smart contracts

Team

This project was build for the Scroll VORTEx 1 hackathon by: