This is a decentralized lottery application (DApp) developed on the Polygon network. Participants can enter the lottery by depositing a minimum of 0.01 MATIC. The contract owner can then call the function to pick a winner, which will be selected through a secure random number generated by Chainlink VRF.
Before you begin, ensure you have met the following requirements:
- You have installed Node.js
- You have installed Truffle
- You have a basic understanding of Solidity, JavaScript, and Blockchain.
- You have MetaMask installed and configured for the Matic Mumbai Testnet.
- You have testnet LINK and MATIC tokens in your wallet. You can get them from the Matic Faucet.
To install and run the DApp, follow these steps:
- Clone this repository:
git clone https://github.com/jlautenbach/polylotto.git
cd polylotto
- Install the dependencies:
npm install
- Compile and migrate the smart contract:
truffle compile
truffle migrate --network matic
- Replace the contract address in app.js with the address of your deployed contract.
- Open the index.html file in your browser to interact with the DApp.
To contribute to Polygon Lottery DApp, follow these steps:
- Fork this repository.
- Create a branch: git checkout -b main.
- Make your changes and commit them: git commit -m '<commit_message>'
- Push to the original branch: git push origin polylotto main
- Create the pull request.
This project uses the GNU General Public License v3.0. You can find the full text of the license here.