Skip to content

bisi-dev/metachess

 
 

Repository files navigation

MetaChess

A Play2Earn + Donate DApp.
This was submitted for ETH Shangai Hackhathon.

MetaChess is a DApp built with TypeScript, React and Solidity.
It enables users to enjoy a chess game whilst promoting a positive social impact project on the blockchain.

  • The MetaChess DApp spins up an instance where 2 players must pay a challenge fee (contribute to a pot) to play.
  • A smart contract acts as an escrow/proctor and monitors the game.
  • When the game ends, the smart contract awards the winner 90% of the total pot amount.
  • It also sends a donation fee (10% of the total pot amount) to the charity's address.

>> LIVE INTRO WEB APP
>> LIVE DAPP
>> SMART CONTRACTS - POLYGONSCAN (MUMBAI TESTNET)

>> HOW TO USE: VIDEO-DEMO
Watch the video

>> DAPP BRANCH

· How to Start DEV· Contracts· Feedback· References


How to Start DEV

Pre-Requisites: Node JS, NPM, NVM

After Forking/Cloning the chess-engine branch, you can get up and running in just a few minutes. From the project's root folder:

  1. Install all required packages.

    npm install
    
  2. Start the site.

    npm start
    

    P.S, If on Windows OS:

    npm run start-windows
    
  3. Voila! View app in any browser at http://localhost:3000/

NOTE: To interact/work directly with the DApp, please switch to the main branch for more details main

Contracts

The smart contracts are included in this branch. To work with:

  1. Create a Polygon Mumbai Wallet Address and add some funds to your address.

    >> POLYGON MUMBAI FAUCET
    Select Mumbai -> Paste wallet address -> Submit

  2. Create a project/app on Infura

    >> INFURA

  3. Edit the .env file and set your mnemonic and Infura ID.

    MNEMONIC= <12 secret words here>
    PROJECT_ID= <Infura Polygon Project ID>
    
  4. Compile Contracts

    truffle compile
    
  5. Deploy Contracts

    truffle migrate --network matic
    
  6. Copy your contract address and view on PolygonScan (Mumbai TestNet)

    https://mumbai.polygonscan.com/address/ + {contract address}
    

Feedback

I always appreciate feedback, so share your thoughts and suggestions with me: mail@bisi.dev

If you find any bugs or have feature suggestions, create a new issue or pull request 🙏

Thanks a lot! 💪

Ayodeji Olabisi – bisi.dev


References

These are my references in scaffolding this app

  • Smart Contracts : Truffle-Suite
  • Host : Infura
  • Environment : Polygon Mumbai
  • INTRO WebApp : UNISWAP Landing Page
  • DApp : UNISWAP App Utilitiy
  • Chess Engine : JSVeron Chess Engine

Contributors

  • Design - Miracle Otugo

About

Entry for ETH Shangai Hackhathon. A Play2Earn + Donate DApp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published