Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

A simple lottery program to demonstrate the use of Civic to protect on-chain assets on EVM chains

Notifications You must be signed in to change notification settings

civicteam/workshop-evm-lottery

Repository files navigation

Deprecation Notice

Note

The contents of this repo have been moved to Civic Pass Demos

Civic Pass EVM Sample Lottery Project

This project demonstrates the integration of Civic Pass into an Ethereum smart contract.

It is a simple lottery contract that allows users to enter the lottery for free.

The contract owner can then draw a winner and pay out the prize.

By adding Civic's Uniqueness Pass to the contract, we can ensure that each user can only enter the lottery once.

Getting started

Install dependencies:

yarn

Run a local hardhat node: (This project uses hardhat-deploy to set up a lottery contract.)

yarn local:start

Start the frontend:

yarn app:start

Deploy to testnet:

PRIVATE_KEY=${YOUR_PRIVATE_KEY} yarn deploy:testnet

Start the frontend pointing to testnet:

yarn app:start:testnet

About

A simple lottery program to demonstrate the use of Civic to protect on-chain assets on EVM chains

Resources

Stars

Watchers

Forks

Packages

No packages published