Raffle

TOOLSFINANCIAL

Contract purpose

This is a contract used for raffles. The owner of the contract can deploy it and set various parameters. Anybody can start the raffle after the minimum days have passed.

Customizable Variables

parameter nametypedetails
minDaysIntegerthe minimum number of days for the raffle to be on
maxDaysIntegerthe maximum number of days for people to be able to enter the raffle
maximumPlayersIntegermaximum numbers of players that can enter the raffle
ticketPriceIntegerticket price in wei (should be converted client side)

Exposed methods

buyTicket lets people buy a ticket to the raffle

play allows anybody to start the raffle and draw a winner if the conditions are met

getNumberOfPlayers allows people to check how many people have entered the raffle

isInRaffle allows to check if somebody is in the raffle

parameter nametypedetails
_addressaddressthe address of who you want to check

getTicketPrice returns the ticket price in wei

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract