/polylotto

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.

Primary LanguageSolidityGNU General Public License v3.0GPL-3.0

Polygon Lottery DApp

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.

Prerequisites

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.

Installing and Running the DApp

To install and run the DApp, follow these steps:

  1. Clone this repository:
git clone https://github.com/jlautenbach/polylotto.git
cd polylotto
  1. Install the dependencies:
npm install
  1. Compile and migrate the smart contract:
truffle compile
truffle migrate --network matic
  1. Replace the contract address in app.js with the address of your deployed contract.
  2. Open the index.html file in your browser to interact with the DApp.

Contributing to Polygon Lottery DApp

To contribute to Polygon Lottery DApp, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b main.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the original branch: git push origin polylotto main
  5. Create the pull request.

License

This project uses the GNU General Public License v3.0. You can find the full text of the license here.