https://github.com/thedefibat/lottery-dapp
A decentralized Lottery System build using Smart Contracts along a UI using React
https://github.com/thedefibat/lottery-dapp
Last synced: 12 months ago
JSON representation
A decentralized Lottery System build using Smart Contracts along a UI using React
- Host: GitHub
- URL: https://github.com/thedefibat/lottery-dapp
- Owner: theDefiBat
- License: mit
- Created: 2020-07-16T07:30:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-16T07:40:11.000Z (almost 6 years ago)
- Last Synced: 2025-01-21T19:44:19.831Z (over 1 year ago)
- Language: JavaScript
- Size: 377 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](./test/simpleContract.test.js);
* React unit tests can be written in there relavent compondents
## Solidity Unit test
* to run solidity test
```
truffle test
```