GithubHelp home page GithubHelp logo

howellsy / smart-contract-lottery Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 39 KB

A provably fair and verifiably random lottery using Chainlink VRF and Chainlink Automation.

Home Page: https://sepolia.etherscan.io/address/0xf714e378541ab176a8d7681aa33e981c9e85f41d

Solidity 94.42% Makefile 5.58%
chainlink-automation chainlink-vrf foundry solidity

smart-contract-lottery's Introduction

Smart Contract Lottery

A provably fair and verifiably random lottery written in Solidity leveraging:

  • Chainlink VRF for randomness
  • Chainlink Automation for time based trigger

You can see this smart contract deployed on Sepolia here.

⚒️ Built with Foundry

This project is built with Foundry a portable and modular toolkit for Ethereum application development, which is required to build and deploy the project.

🏗️ Getting started

Create a .env file with the following entries:

SEPOLIA_RPC_URL=<sepolia_rpc_url>
PRIVATE_KEY=<private_key>
ETHERSCAN_API_KEY=<etherscan_api_key>

Install project dependencies

make install

Deploy the smart contract on Anvil

make anvil
make deploy

Deploy the smart contract on Sepolia

make deploy ARGS="--network sepolia"

🧪 Running tests

To run against a local Anvil Ethereum node:

forge test

To run against a forked environment (e.g. a forked Sepolia testnet):

forge test --fork-url <sepolia_rpc_url>

smart-contract-lottery's People

Contributors

howellsy avatar

Stargazers

 avatar

Watchers

 avatar  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.