This repository contains a Hardhat-based Lottery System that utilizes blockchain technology, Chainlink VRF, and Keepers.
- Hardhat is a development environment for building smart contracts on the Ethereum blockchain.
- Lottery System is a program that allows users to participate in a lottery by buying tickets.
- Blockchain technology is a decentralized digital ledger that allows for secure, transparent, and tamper-proof transactions.
- Chainlink VRF is a decentralized oracle that provides verifiable randomness.
- Keepers is a network of decentralized bots that perform tasks on the Ethereum blockchain.
The combination of these technologies ensures that the lottery system is fair, transparent, and secure. Hardhat provides a set of tools and features that make it easier to develop, test, and deploy smart contracts. Blockchain technology ensures that the process is transparent and tamper-proof. Chainlink VRF ensures that the selection of the winner is truly random and cannot be manipulated. Keepers can be used to automate tasks such as selecting a winner and distributing the prize.
In order to run this lottery system, you will need the following:
- Node.js
- Yarn
- Git
- Hardhat
- Hardhat Network
- Solidity
- Chainlink VRF
- Keepers
To install this lottery system, follow these steps:
- Clone the repository using
git clone https://github.com/your-username/hardhat-lottery-system.git
- Navigate to the directory using
cd hardhat-lottery-system
- Install the required packages using
yarn install
Before running the lottery system, you will need to configure the Chainlink VRF and Keepers.
- Create an account on Chainlink
- Create a VRF job on Chainlink using the provided documentation
- Copy the Job ID and Job Key and paste them in the
hardhat.config.js
file
- Create an account on Automation|Chainklink
- Fund your account with KPR tokens
- Create a job on KeeperDAO using the provided documentation
- Copy the job ID and paste it in the
hardhat.config.js
file
To run the lottery system, follow these steps:
- Start the Hardhat network using
npx hardhat node
- Deploy the smart contracts using
npx hardhat run scripts/deploy.js --network localhost
- Start the frontend using
yarn start
If you would like to contribute to this repository, please follow these guidelines:
- Fork the repository
- Create a new branch using
git checkout -b my-new-feature
- Make your changes and commit them using
git commit -am 'Add some feature'
- Push your changes to your branch using
git push origin my-new-feature
- Create a pull request
This project is licensed under the MIT License.