Lottery-Tutorial

所属分类:数值算法/人工智能
开发工具:Solidity
文件大小:206KB
下载次数:0
上传日期:2022-09-06 14:09:19
上 传 者sh-1993
说明:  no intro
(Lottery-Tutorial,Beginners Smart Contract Tutorial - Learn to deploy a decentralized on-chain lottery!)

文件列表:
PART1.md (9791, 2022-09-06)
PART2.md (28635, 2022-09-06)
contracts (0, 2022-09-06)
contracts\Lottery.sol (5781, 2022-09-06)
hardhat.config.js (145, 2022-09-06)
package-lock.json (717704, 2022-09-06)
package.json (332, 2022-09-06)
scripts (0, 2022-09-06)
scripts\deploy.js (1079, 2022-09-06)
test (0, 2022-09-06)
test\Lottery.js (4186, 2022-09-06)

# Beginners Smart Contract Tutorial ## [Now Available on Medium.com!](https://camron-h.medium.com/beginners-smart-contract-tutorial-part-1-e5fc3abdad1f) In this tutorial we will be walking through building and deploying a decentralized lottery smart contract using Hardhat. In this decentralized app, or dApp, anyone can choose a number 1-10000 and pay the ticket price to enter into a weekly lottery. The ticket sales revenue is collected into the pot in the contract. After 7 days, the contract will allow anyone to start the drawing. The contract will then call the [API3 QRNG](https://api3.org/QRNG) for a truly random number generated by quantum mechanics. The pot will be split amongst all users that chose this winning number. If there are no winners, the pot will be rolled over to the next week. > **By the end of this tutorial you should be able to:** Deploy a decentralized lottery smart contract to the [Goerli testnet](https://ethereum.org/en/developers/docs/networks/#goerli) that uses [Quantum Randomness](https://www.americanscientist.org/article/quantum-randomness). > **Who is this tutorial for?** Developers with a basic understanding of the Solidity and Javascript languages that would like to expand their knowledge of building with smart contracts and API3 [first-party oracles](https://docs.api3.org/airnode/v0.7/). ---- In Part 1, we create a centralized lottery smart contract. In Part 2, we decentralize our lottery by integrating the [API3 QRNG](https://api3.org/QRNG). ## [Part 1](https://github.com/camronh/Lottery-Tutorial/tree/Part1) ## [Part 2](https://github.com/camronh/Lottery-Tutorial/tree/Part2)

近期下载者

相关文件


收藏者