hackquest logo

GUESSING GAME

A blockchain-based number guessing game where players submit guesses with Ether, and correct guesses win the contract balance automatically.

Description

The Number Guessing Game is a smart contract written in Solidity that enables players to guess a secret number. The contract operates as follows:

  1. Setting the Secret Number – The owner (first user to set the number) defines the secret number.

  2. Submitting a Guess – Players send Ether along with their number guess using the guess() function.

  3. Winning Condition – If the guess matches the secret number, the player wins and receives the entire contract balance.

  4. Bet Management – The contract ensures that players send at least the required bet amount.

  5. Resetting the Game – The owner can reset the game with a new secret number.

  6. Security Measures – Only the owner can modify the game settings, and the contract prevents unauthorized actions.

The contract is deployed on Ethereum, and interactions are managed using Web3.js for frontend or script-based execution.

Progress During Hackathon

30

Tech Stack

Solidity

Fundraising Status

0