Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Ethereum smart contract lottery: 5 people send 0.2 ether, contract sends 0.8 ethers to one of the senders at random and 0.2 ethers to givedirectly

Notifications You must be signed in to change notification settings

CrazybutSolid/ethereum-lottery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Ethereum Lottery (Ropsten)

How to play:

  1. Send 0.2 ether (exact) to address 0x20b8c246DCaF8Dd2c739A49c02D0dDfC752C1c07 1a) If you send more or less than 0.2 ether, the contract will reject the transaction
  2. After 5 people have sent 0.2 ether, the contract chooses one address at random and sends 0.8 ethers to it + 0.2 ethers to Give Directly's address
  3. The lottery restarts

I'm a terrible developer! Doing this for fun and to understand ethereum. Any suggestions to the code are highly encouraged and recommended.

Smart contract code is in the /contracts directory

About

Ethereum smart contract lottery: 5 people send 0.2 ether, contract sends 0.8 ethers to one of the senders at random and 0.2 ethers to givedirectly

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages