this repo is a managment system for any form of lottery games that involves the drawing of numbers at random for a prize and handing out tickets.
the mechanism design based on token economics and insures that no prospective owner-occupant has an unfair advantage in the determination of winner.
Note: This DApp is for interview purposes only. altho it's fully functional, however, used coin has no value.
Here is a working live demo: Web3-lottery-v1
Login with your Crypto Wallet
Have a look for Deployed backend SmartContract (API) here: BackEnd API
This is how you may set up your project locally. To get a local copy up and running follow these simple steps.
MetaMask account - cryptocurrency wallet
- Get a free API Key at thirdweb.com
- Clone this repo
git clone https://github.com/omarsa999/web3-lottery.git
- Install NPM packages
cd web3-lottery npm install
- Deploy the Backend on ThirdWeb
using Thirdweb's SDK deploy feature, a Powerful SDK to integrate decentralized and Web3 technologies into the backend Read More
git clone github.com/omarsa999/lottery-smart-contract.git
- Enter your API in
config.js
const API_KEY = 'ENTER YOUR API';
- BuyTickets
- DrawWinnerTicket
- RefundAll
- WithdrawCommission
- WithdrawWinnings
- restartDraw
- CurrentWinningReward
- IsWinner
- RemainingTickets
- checkWinningsAmount
- duration
- expiration
- getTickets
- getWinningsForAddress
- lastWinner
- operatorTotalCommission
- and more ..
[@OmarSa] - hello@omarsa.tech omarsa.tech
This repository was extended from its original smart contract repo: https://github.com/drord9/Lottery