A web3 implementation of a lottery using Chainlink VRF and Chainlink alarm clock to have a totally decentralized lottery
You can play with this in remix here
A web3 implementation of a decentralized provably random lottery using Chainlink VRF and Chainlink alarm clock to have a totally decentralized lottery. Check the ETH readme for how to do the truffle stuff.
init
with the lottery address, followed by the randomness address as parametersstart_new_lottery
function, with a duration you'd like it to last in seconds.You'll notice there are a few permission hiccups, but this is a beta so whatever.
git clone <this_repo>
cd chainlink-lottery
npm install
Make sure you have RPC_URL
and MNEMONIC
in your environment variables
Setup:
npx create-react-app chainlink-lottery
cd chainlink-lottery
mkdir ethereum
cd ethereum
truffle unbox smartcontractkit/box
truffle migrate --network live