Skip to content

sweetpea22/ethernoirs

Repository files navigation

Ethernoirs

Screen Shot 2023-09-24 at 8 30 28 AM Screen Shot 2023-09-24 at 8 36 43 AM

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.

Inspired By

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.

Technical Details

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

How to run it

  1. Clone it git clone
  2. Install dependencies npm i
  3. Start web server npm run dev

5 contracts were written for this project: