Giter Site home page Giter Site logo

rafaell416 / lottery-pool Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 90 KB

Ethereum & Reactjs based game to play a lottery by interacting with a smart contract

HTML 16.39% CSS 0.54% JavaScript 83.07%
ethereum smart-contracts blockchain dapp solidity

lottery-pool's Introduction

Lottery Pool

Lottery pool is a simple web based game where you can enter to compete with other players to win money

You need to have Metamask installed to use this app

you can play here

The game works as follows:

  1. A manager starts the game
  2. Players has to pay a least 0.1 ether to enter the game
  • You need to have metamask installed in your browser then create an account and get some ether to your account at rinkeby-faucet
  1. The game prize is created by collecting all the ether paid by players
  2. The smart contract behind the game pick randomly a winner and sends the money to its account

For devs

This game is interacting with a tested and deployed smart contract placed in this repo, where you can find the smart contract solidity code, a compile and a deploy script, together with lots of test cases. lottery

The contract was deployed to Rinkeby Test Network using infura and is located at this address 0xbEca329eBF7583cE37966f1de407a145B801944d

Running the app locally

git clone [email protected]:Rafaell416/lottery-pool.git

cd lottery-pool

yarn install

yarn start

lottery-pool's People

Contributors

rafaell416 avatar

Stargazers

0xelisa avatar

Watchers

James Cloos avatar  avatar

lottery-pool's Issues

TypeError: Cannot read property 'currentProvider' of undefined

Bug Report

Chrome Version

Version 81.0.4044.129 (Official Build) (64-bit)

Mac Version

Version 10.15.4 (19E287)

Affected Platform(s)

  • Android
  • iOS
  • Web

Current Behavior

  • Fatal crash
  • In red: TypeError: Cannot read property 'currentProvider' of undefined

Expected Behavior

  • Open successfully the content

Reproduction Steps

  • Open: https://lottery-react-yfboggvjse.now.sh/

Sample Code or Sample Application Repo

import Web3 from 'web3'
const web3 = new Web3(window.web3.currentProvider)
export default web3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.