Skip to content

Decentralized app that emulates the typical flip a coin game using solidity smart contracts.

Notifications You must be signed in to change notification settings

miguelleonmarti/coin-flip

Repository files navigation

CoinFlip 🎲

Tests

Decentralized app that emulates the typical flip a coin game using solidity smart contracts.

How does it work?

It is a multiplayer game so you play against other online players. Once you have connected your wallet and chosen HEADS or TAILS the client will request you to pay the bet. You need to have funds in order to bet. Then the smart contract will find you another player that has chosen the opposite as you. If there are no people at that time you will be enqueue, and you will have to wait for someone to bet against your decision. Else, the smart contract will pair you with another user and flip a coin. The winner will be rewarded with the loser's money.

Tools

  • Solidity
  • web3.js
  • NextJS
  • Chai
  • Ganache

Setup

  • Clone the repository: git clone https://github.com/miguelleonmarti/coin-flip
  • Install dependencies: npm i
  • Run tests: npm run test
  • Set your environment variables (as on .env.example) on .env

About

Decentralized app that emulates the typical flip a coin game using solidity smart contracts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published