Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 1.42 KB

README.md

File metadata and controls

55 lines (33 loc) · 1.42 KB

Back End Lottery Smart Contract

Project Overview

This project serves educational purposes, offering a web application that allows users to place bets on randomly generated numbers using Ether. A smart contract manages the bets, receives Ether, and determines the winning number randomly. The participant with the correct number receives the accumulated Ether sum.

The project is divided into 3 projects:

  • Lottery Smart Contract: This handle the bets and decided the winner of the bets. Also reward the winner with all money available;
  • Back-end Lottery Smart Contract*: This handle the requests from the user and send it to the smart contract.
  • Front-end Lottery Smart Contract: This is the user interface that the use perform actions.

For this project I used

Nest: A progressive Node.js framework for building efficient and scalable server-side applications.

Execution Instructions

$ yarn install

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Run Swagger

http://localhost:3001/api-docs#/