EtherNoirs is a text-based, on-chain, multi-player strategy game, where players must interact with NPCs and find evidence to complete their objective. The story goes, a shady protocol hires blackhats to aggressively increase their power, only to have it ruled by blackhat mafiosos a month later. You are hired by the protocol to identify the killer and turn these mafias against each other with logic and cunning.
The intent of this project is to explore how the evolving smart contract, ZK & NFT standards will change how we play games. This game is inspired by the aspect of darkforest that enabled permissionless story-building and trading of information.
EtherNoirs is pretty much fully on-chain.
It features:
- The front-end is built in Typescript, Tailwind and Nextjs.
- Each NPC is a ERC-6551 Tokenbound account in possession of alibis and information (1155s).
- Every move in the game in recorded on-chain to funnel into a leaderboard, this is the multiplayer component.
- There is a "superuser mode" which checks if an account was active during "NFT cannon events" in crypto history. Eligible accounts are given special abilities in the game to increase entropy in the game by being able to release new information. I used Axiom SDK to do this.
- To ensure fairness, I used the snarkjs library and circom compiler to create a circuit and use snark proofs to verify that a player has correctly deduced the murderer, without revealing it to others.
- Web3Modal v3 is used to handle Auth. -Deployed a subgraph to index the NFTs, but didn't have much luck querying what I wanted. Def a skill issue on my part, not theGraph. -All nft metadata is uploaded to IPFS via Pinata <3
- Clone it
git clone
- Install dependencies
npm i
- Start web server
npm run dev
5 contracts were written for this project:
-
A 721 contract to mint NPCs. I used tokenbound.org to turn them into ERC-6551 smart contract wallets Goerli Base Goerli
-
An 1155 contract to mint the tips and information. Goerli Mantle Scroll Sepolia Base Goerli
-
A game logic contract to track each game move so that people can win by score if they do not figure out who the killer was. Goerli Mantle Scroll Sepolia
-
A superuser contract to generate proof of historical on-chain behaviour and mint new game tokens. (forked from axiom basically) Goerli Scroll Sepolia Base Goerli
-
A verifier contract for the zkp. Goerli Base Goerli