Skip to content

kuaiph/lottery-dapp-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme

Lottery Pot Screenshot

What does it do?

Lottery dApp: https://lottery.dapp.hkwtf.com/

A Youtube video demo can be seen here.

It is a lottery app where users can come and create lottery pot to play with their friends. They will specify the pot closed time, minimum stake to participate, the pot type (equal opportunity or weighted opportunity), and the stake they will take.

Then the lottery pot is open and allow anyone to participate. Once the closed time is reached, further interaction will mark the contract as closed, and winner can be determined randomly.

Finally the winner can withdraw money from the lottery pot.

How to setup a local server?

The consensys project repo are at:

To setup the local server,

  • Install Ganache and run it locally on port 7545.

  • git clone the smart contracts repo and run

    # to compile the project
    yarn compile
    
    # to migrate the smart contract to blockchain
    truffle migrate
    
    # to run all the truffle test
    yarn test

    This will build the contract artifacts under build/contracts folder.

  • Then, git clone the frontend repo, and symbolic link the contract artifact folder at src/contracts.

    Now you can

    # to run the dev version
    yarn start:dev
    
    # to build the production version
    yarn build

Other documentations

About

final-project

Resources

Stars

Watchers

Forks

Packages

No packages published