Skip to content

A decentralized web3 application (JavaScript React App) connected to a Solidity Smart Contract. Users can enter by connecting their Meta-mask wallet and then sending 0.15 ETH. Only the smart contract owner can randomly draw the winner.

Notifications You must be signed in to change notification settings

petermartens98/Web3-Lottery-dApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 

Repository files navigation

Web3-Lottery-dApp

A decentralized web3 application (JavaScript React App + CSS styling) connected to a Solidity Smart Contract. Users can enter by connecting their Meta-mask wallet and then sending 0.15 ETH. Only the smart contract owner can randomly draw the winner.

Here's how the various components work together:

The JavaScript React app provides the user interface for the web3 application. This is the part of the application that users will interact with. It's responsible for displaying information about the current state of the contract (e.g., the current price to enter the lottery) and for handling user inputs (e.g., the user's MetaMask wallet address and the amount of ETH they want to send to enter the lottery).

The CSS styling is used to make the application look visually appealing and easy to use.

The MetaMask wallet is used to connect the user's Ethereum account to the application. This allows the user to send and receive ETH and interact with the smart contract.

The Solidity smart contract is the heart of the application. It defines the rules for the lottery, including the entry fee, the number of participants, and how the winner is chosen. When a user sends ETH to the contract address, the contract verifies that they have sent the correct amount and adds them to the list of participants. When the owner of the contract decides to draw the winner, the contract randomly selects a winner from the list of participants and sends them the prize.

Overall, this is a simple but effective way to create a decentralized lottery application on the Ethereum blockchain. However, it's important to note that there are many security considerations to take into account when designing and deploying a smart contract-based application, and that careful testing and auditing are essential to ensure that the application is secure and reliable.

Example Image:

image

About

A decentralized web3 application (JavaScript React App) connected to a Solidity Smart Contract. Users can enter by connecting their Meta-mask wallet and then sending 0.15 ETH. Only the smart contract owner can randomly draw the winner.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published