Skip to content

Lottery related smart contrat dApp using solidity,hardhat and vite react

Notifications You must be signed in to change notification settings

stoXmod/Lottery-Forge-Smart-Contract

Repository files navigation

LotteryForge

This repository contains the smart contract code and front-end application for a decentralized lottery application built on Ethereum. Participants can enter the lottery by paying an entry fee, and a winner is randomly selected to receive the prize amount when the lottery ends.

Project Structure

  • contracts/: Solidity smart contracts for the lottery system.
    • Lottery.sol: Main contract for the lottery logic.
  • artifacts/: Contains build artifacts and contract ABIs generated by Hardhat.
  • lottery-dapp/: Front-end application for interacting with the lottery contract.
    • src/: Source code for the React application.
    • public/: Public assets like icons and manifest files.
  • scripts/: Deployment scripts for deploying the contracts to a network.
  • test/: Contains tests for the smart contracts.
  • typechain-types/: TypeScript typings for the smart contracts, generated by TypeChain.

Features

  • Smart Contract Interaction: Users can participate in the lottery, view current participants, and see the winner once the lottery ends.
  • Metamask Integration: The front-end application integrates with Metamask for Ethereum transactions.
  • Localization Support: The application supports multiple languages, enhancing accessibility for a wider audience.

Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone <repository-url>
  1. Change to the project directory:
cd lottery-dapp
yarn install

3.Compile the smart contracts:

npx hardhat compile
  1. Deploy the contracts to a network (e.g., testnet):
npx hardhat run scripts/deploy.ts --network <network-name>
  1. Start the front-end application:
yarn start
  1. Testing To run the tests for the smart contracts, use:
npx hardhat test

About

Lottery related smart contrat dApp using solidity,hardhat and vite react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published