paint-brush
Smart Contract Tutorial for Beginners — Lottery dAPP [Part 1]by@api3
3,462 reads
3,462 reads

Smart Contract Tutorial for Beginners — Lottery dAPP [Part 1]

by API39mOctober 4th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In this tutorial we’ll be walking through building and deploying a decentralized lottery smart contract in Solidity using [Hardhat]. Anyone can choose a number 1–10,000 and buy a ticket to enter into a weekly lottery. Ticket revenue is collected into a pot in the contract. After 7 days, the contract will allow anyone to trigger the drawing. The contract will then call the [API3 QRNG[https://api3.org/QRNG] for a truly random number. The pot will be split amongst all users that chose this winning number.

Company Mentioned

Mention Thumbnail
featured image - Smart Contract Tutorial for Beginners — Lottery dAPP [Part 1]
API3 HackerNoon profile picture
API3

API3

@api3

First-party oracle that securely & compliantly connects smart contracts to real world data

L O A D I N G
. . . comments & more!

About Author

API3 HackerNoon profile picture
API3@api3
First-party oracle that securely & compliantly connects smart contracts to real world data

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite