Skip to content

This is a Smart contract based on Chinese Lottery with VRF integration

Notifications You must be signed in to change notification settings

KevinH2810/Chinese-Lottery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lottery

About

This is a Lottery Contract inspired from chinese lottery version by implementing VRF for getting random number to pick the winner.

Guide

  1. see documentation from VRF if you want to deploy this contract as you need to fund it some LINK to make it work. if you want to test this on Rinkeby Network you can get some test coin from Chain link too, see documentation for details.

How To Usage

  1. You can send 0.001 ETH to contract below (any other amount will be rejected) and when the bet is still open
  2. The manager can then start for requesting randomWords from VRF for choosing the winner
  3. then the maanger can do chooseWinner to pick the winner.
  4. when the manager want to start next bid round, he can use startNewBid function to reset the settings.

Note: if any problem occurs, please check if the VRF subscription has enough LINK to fund

Sample Contract

Rinkeby : 0xe308533960200bbef632c9f7184d7ffc931bb591

Tech Stack

VRF Chainlink

Solidity

About

This is a Smart contract based on Chinese Lottery with VRF integration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published