Lottery Contract - Ethereum Smart Contract
This repository contains the source code for a simple lottery smart contract developed in Solidity for the Ethereum blockchain platform. The contract allows participants to enter a lottery by sending 1 ether, with the winner being randomly selected after a certain period of time.
Usage:
-
Setup Environment: Ensure you have a development environment set up with an Ethereum client like Ganache or a testnet like Ropsten.
-
Deploy Contract: Deploy the Lottery.sol contract to your chosen Ethereum network using tools like Remix, Truffle, or Hardhat.
-
Interact with the Contract: Participants can enter the lottery by sending 1 ether to the contract address. The manager can check the contract balance and other administrative functions.
-
Winner Selection: After a certain period of time, the manager can execute a function to select a winner randomly from the list of participants.