Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.
/ puzzler Public archive

🎲 A simple Ethereum based decentralized application demonstrating usage of ERC-721 tokens.

Notifications You must be signed in to change notification settings

probablyangg/puzzler

Repository files navigation

Puzzler 🎲

A simple Ethereum based decentralized application demonstrating usage of ERC-721 tokens.

Description

  • Answering questions would increment the level for the user.
  • Each puzzle solved mints an ERC-721 token (PZLR), which is owned by the smart contract. Called 'Spiro' in the game.
  • Each Spiro is representative of:
    • creator
    • level at which it was created
  • Each user can own a single Spiro that represents the current level of the user in the game.
  • User has an option to sell that spiro
    • would reset his/her level to 0
  • Available spiros with level strictly greater than user's level are displayed in the left. These spiros can be bought to level up.
  • Total number of questions is the number of questions available in the database - currently a .json file
    • can also be seen as the "max level reachable"
  • Contract is currently deployed on Ropsten Testnet

Usage

  • 0 PZLR or the 0th Spiro is the initial token - basically, nothing can be done with it. Think of it as a null/starting token
    • the 0th question generates 0th spiro
  • Each user can own only a single spiro
  • Answering a question
    • correctly
      • increments your level
      • generates a spiro with your address as the creator and your level
    • incorrectly
      • generates an alert on the page
  • User can buy one of the spiros owned by the contract - to level up.
  • User can sell his/her owned token - would change level and spiro to 0.

Running Locally

Clone this repo to your local machine and install the dependencies:

git clone https://github.com/nglglhtr/puzzler.git
cd puzzler
npm i

Serve the application

npm run dev

Switch to Ropsten Testnet on Metamask

Built With

(Contract Address: 0x989da6d8a9358d7de3859cf3a15303e9c673cf55)

About

🎲 A simple Ethereum based decentralized application demonstrating usage of ERC-721 tokens.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published