Skip to content

A blockchain based web application which conducts lottery.

Notifications You must be signed in to change notification settings

Sri0035/Lottery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Lottery

A blockchain based web application which conducts lottery.

The task given to me was to create a simple web app which is integrated with metamask wallet. Hence I created a web application which conducted lottery. The mechanism is simple, the contracts accepts ether from various players(minimum 0.01 eth) and at last the one who controls the contract randomly picks a winner. The winner is awarded all the ethers that were put in the lottery.

About the Contract

So the contract contains a manager who creates the contract and picks winner. There will be an enter function which accepts the ether given by players and subsequently adds them into the list of players. There will be a function that would help us in choosing the players honestly and randomly.

About deployment

Deployment will be done using Infura node and the transaction for deployment will be done using my metamask account.

Frontend

The frontend will look like this : Lottery

The managers address will be mentioned. Also the number of players and total amount of ether will be shown. I integrated this web app using web3 provider of web3.js module.

image

About

A blockchain based web application which conducts lottery.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published