Skip to content

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

DECENTRALIZED LOTTERY CONTRACT

📗 Table of Contents

📖 DECENTRALIZED LOTTERY CONTRACT

This smart contract, named Raffle, is a decentralized lottery system built on the Ethereum blockchain using Solidity. It leverages Chainlink's Verifiable Random Function (VRF) to ensure fair and transparent selection of winners. The contract allows participants to enter the raffle by sending a specified amount of Ether, and after a predefined interval, a winner is randomly selected and awarded the entire balance of the contract.

🛠 Built With

Tech Stack

(back to top)

Key Features

  • Decentralized and Transparent: The use of Chainlink VRF ensures that the selection of the winner is random and verifiable, eliminating any possibility of manipulation.

  • Automated Winner Selection: The contract automatically checks if the conditions for selecting a winner are met (e.g., time interval has passed, there are participants, and the contract has a balance). If conditions are met, it triggers the random selection process.

  • Secure and Efficient: The contract includes various checks and error handling to ensure that only valid transactions are processed, and funds are securely transferred to the winner.

  • Immutable Parameters: Key parameters such as the entrance fee, interval duration, and VRF configuration are set during contract deployment and cannot be altered, ensuring fairness and consistency.

(back to top)

💻 Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need to install the following items:

  • Foundry
  • Solidity extension

Install

Install this project by using:

git clone https://github.com/rbd3/Lottery_Contract.git
cd Lottery_Contract
make install

Run tests

To run tests, run the following command:

make test

(back to top)

👥 Authors

👤 Andry Narson

(back to top)

🔭 Future Features

Here are some potential future features that could be added to the Raffle Lottery Smart Contract to enhance its functionality and user experience:

  • User-Friendly Interface: Develop a frontend (web or mobile) to allow users to interact with the raffle contract seamlessly. Users can enter the raffle, view their entries, and check the status of the raffle without needing to interact directly with the blockchain.

  • Real-Time Updates: Display real-time updates on the raffle state, such as the number of participants, time remaining until the next draw, and the recent winner.

  • Wallet Integration: Integrate with popular wallets like MetaMask or WalletConnect to allow users to connect their wallets and participate in the raffle easily.

  • Cross-Chain Raffles: Extend the contract to support multiple blockchains (e.g., Polygon, Binance Smart Chain, Avalanche) to reach a broader audience and reduce gas fees for participants.

  • Automated Raffle Rounds: Implement a feature where the raffle automatically starts a new round after a winner is selected, without requiring manual intervention.

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

Give a star⭐️ or a thumbs up 👍 if you like this project! You can visit my GitHub profile for more of my projects.

(back to top)

🙏 Acknowledgments

  • My family who supported me
  • Patrick Collins

(back to top)

📝 License

This project is MIT licensed.

(back to top)

About

This Decentralized Lottery Contract provides a secure and transparent way to run lotteries on the Ethereum blockchain. Using Chainlink's VRF, it ensures fair and verifiable winner selection, making it ideal for decentralized raffles and chance-based systems.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages