/eth_lottery

A smart contract on test ethereum network where players can enter by depositing a minimum amount of ether. Pseudo-random function picks a winner who received all the balance available on the contract address.

Primary LanguageJavaScript

Lottery Smart Contract

A multi-player Lottery that can be deployed on Ethereum blockchain. Written & debugged on Remix web IDE. Includes smart contract compilation and deployment files (compile.js and deploy.js).

Tests

Includes Mocha tests that validate

  • contract deployment
  • manager's address initialization
  • a single player can enter the lottery
  • multiple players can enter the lottery
  • the deposit of minimum ether

Run Locally

Clone the project

  git clone https://github.com/davit-gh/eth_lottery

Go to the project directory

  cd lottery

Install dependencies

  npm install

Run Mocha tests

  npm run test

License

MIT

Authors