Seamless Blockchain-Powered Betting for Gamers
LuckyLotto is a decentralized betting platform that leverages blockchain technology to provide a seamless and transparent gaming experience. Gamers can engage in exciting games like dice rolling, coin flip, and wheel spin, powered by smart contracts to ensure fairness and immutability.
- Description
- Features
- Installation
- Frontend Interaction
- Smart Contracts
- Supported Games
- Contributing
- License
LuckyLotto is designed to bring transparency and excitement to online betting. By utilizing blockchain smart contracts, LuckyLotto guarantees secure and fair gameplay. The platform enables players to participate in various games, place bets, and instantly verify results—all within a decentralized environment.
- Decentralized Betting: Fully transparent and immutable, ensuring a fair gaming experience.
- Multiple Game Types: Choose from dice rolling, coin flip, and wheel spin, with more games coming soon.
- Smart Contract Powered: Game logic and payouts are handled securely on the blockchain.
- Seamless Integration: Easy-to-use frontend for interacting with the contracts.
- Next.js
- Node.js
- Hardhat
-
Clone the repository:
git clone https://github.com/rajeebkm/luckylotto.git cd luckylotto
-
Install dependencies:
npm install
-
Compile smart contracts:
npx hardhat compile
-
Deploy the contracts to your desired network:
npx hardhat run scripts/deploy.js --network <network_name>
-
Update the frontend with the deployed contract addresses (e.g., in a
app/utils/constant.ts
file).
LuckyLotto offers an intuitive user interface where players can:
- Connect their blockchain wallet (e.g., Metamask).
- Select a game type from the options (dice rolling, coin flip, or wheel spin etc.).
- Place their bet and confirm the transaction.
- View results and claim winnings, if any.
To run the frontend locally:
- Navigate to the frontend directory:
cd frontend
- Start the development server:
npm start
- Open your browser and navigate to
http://localhost:3000
.
The smart contracts are written in Solidity and handle the following functionalities:
- Game mechanics (dice rolls, coin flips, wheel spins).
- Bet placements and payouts.
- Ensuring transparency and fairness through on-chain randomness.
Contracts are located in the contracts
directory. Key files include:
LuckyDiceRoll.sol
- Dice Rolling: Roll a dice to predict the outcome and win if your prediction is correct.
- Coin Flip: Bet on heads or tails and test your luck!
- Wheel Spin: Spin the wheel for a chance to win big payouts.
More games will be added soon to enhance the platform's versatility.
Contributions are welcome! To get started:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature description"
- Push to your fork:
git push origin feature-name
- Create a pull request.