This repository contains the frontend code for a smart contract-based lottery system built using Next.js and Ethereum. It is intended to be used in conjunction with the backend smart contracts, which can be found in the hardhat-lottery-system repository.
The Next.js Smart Contract Lottery provides a user-friendly interface for participating in the lottery and viewing the current status of the lottery. Users can connect their Ethereum wallet (such as MetaMask) to the application and purchase tickets for the current lottery round. The application displays information about the current lottery round, including the number of tickets sold and the current prize pool.
The application is currently hosted on Fleek using IPFS and can be accessed at https://silent-haze-6467.on.fleek.co/.
To install and run the application locally, follow these steps:
- Clone this repository to your local machine.
- Install dependencies by running
npm install
oryarn install
in the root directory of the project. - Start the development server by running
npm run dev
oryarn dev
.
Once the development server is running, you can access the application by navigating to http://localhost:3000
in your web browser. Note that you will need to have a local Ethereum blockchain running (such as Ganache) and have deployed the smart contracts to that blockchain in order for the application to function properly.
We welcome contributions to this project! If you notice any bugs or have suggestions for new features, please open an issue or submit a pull request. Before making any contributions, please review our contributing guidelines.
This project is licensed under the MIT License.