theDefiBat / Lottery-DApp

A decentralized Lottery System build using Smart Contracts along a UI using React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lottery DApp

This repository contains all code for the smart contracts and front-end.

Requirements / Dependencies

  • Node
  • NPM
  • Truffle
  • React.js

Instructions

  • Clone the repo `cd into the repo
  • Run the following:
npm i -g truffle
npm install
cd app
npm install
  • Start the truffle local network:
truffle develop
  • Inside the network, compile the contracts and deploy them:
compile
migrate
  • Open new terminal
  • Run:
cd app
npm start

A browser window should open where you can interact with the contract

Unit test

  • Solidity unit tests are written in the tests directory, see the demo test;
  • React unit tests can be written in there relavent compondents

Solidity Unit test

  • to run solidity test
truffle test

About

A decentralized Lottery System build using Smart Contracts along a UI using React

License:MIT License


Languages

Language:JavaScript 77.7%Language:HTML 10.5%Language:Solidity 7.6%Language:CSS 4.1%