Giter Site home page Giter Site logo

abi-lottery's Introduction

ABI-Lottery Smart Contract

Overview

This Solidity smart contract implements a lottery system where participants can enter by sending a minimum amount of Ether. The winner is determined randomly using Chainlink's Verifiable Random Function (VRF), ensuring fairness and transparency.

Features

  • Allows participants to enter the lottery by sending Ether.
  • Determines the winner randomly using Chainlink's VRF.
  • Provides a transparent and decentralized method for selecting winners.
  • Implements access control to start and end lotteries, with the owner having exclusive control.

Dependencies

Usage

  1. Setup: Deploy the contract with the necessary constructor parameters, including the address of the ETH/USD price feed, VRF coordinator, LINK token address, fee, and keyhash.
  2. Starting a Lottery: Only the owner can start a new lottery using the startLottery() function.
  3. Entering the Lottery: Participants can enter the lottery by sending the required amount of Ether using the enter() function.
  4. Ending the Lottery: After participants have entered, the owner can end the lottery and determine the winner using the endLottery() function.
  5. Winner Determination: The winner is randomly selected using Chainlink's VRF and announced by the contract.
  6. Claiming Winnings: The winner can claim their winnings by withdrawing them from the contract.

abi-lottery's People

Contributors

samped avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.