Guess The Number

TOOLSFINANCIAL

Exposed methods

bet the betting function, where anyone can join and bet, the one person that wins will get all the other bets

parameter nametypedetails
guessuintset the number guessed by the user

randomNumber function that can only be called by the owner after the conditions are set.

setConditions Allows the owner of the contract to set a minimum wage and range of the random number

parameter nametypedetails
_minwageuintset by the owner to put the minimum wage for the roulette
_rangeuintset the range from where the random number will be selected from

withdraw allows the owner to get his earnings if there a no bets in progress

checkwinner upon entering an address, the function will check if it one of the former winners or not

parameter nametypedetails
_addraddressthe address to check

getRange displays the range chosen by the owner, this function can be called by any user

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract