Skip to content

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eth-lottery

Ethereum Banner

This project features a smart contract that allows players to bet ETH in a lottery.

Lottery Banner

Lottery Contract

There are two main variables here, a manager and a player.

  1. Manager: Address of the person who created the contract
  2. Players: An array of addresses of people who have entered the raffle

With these two variables, there are also two main functions of this contract:

  1. enter: Enters a player into the lottery
  2. pickWinner: Randomly picks a winner and sends them the prize pool

Outside of these main points, there are a few small helper functions including getPlayers(), a modifier named restricted, and more... all of these can be found within the comments of lottery.sol

Tech Stack

This project utilizes Solidity & JavaScript

Resources and Credits

Credits to Stephen Grider's Ethereum and Solidity: The Complete Developer's Guide

About

An advanced smart contract that allows players to bet ETH in a raffle style

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages