Building Games with Ethereum Smart Contracts by Kedar Iyer & Chris Dannen
Author:Kedar Iyer & Chris Dannen
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA
// Reset contract state
lastCreditorPayedOut = 0;
lastTimeOfNewCredit = block.timestamp;
profitFromCrash = 0;
creditorAddresses = new address[](0);
creditorAmounts = new uint[](0);
round += 1;
return false;
Listing 5-28Governmental Payout Code
The two lines in bold required updating a large amount of storage in the state tree. Hundreds of people had participated in the game, so hundreds of addresses and amounts had to be set to zero. The gas fee for this transaction was so high that it exceeded the block gas limit at the time, and the payout couldn’t be claimed by the winner . The winner had to wait for the block gas limit to increase before claiming the reward.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Mastering Bitcoin: Programming the Open Blockchain by Andreas M. Antonopoulos(2525)
Dawn of the New Everything by Jaron Lanier(2446)
Blockchain: Ultimate Step By Step Guide To Understanding Blockchain Technology, Bitcoin Creation, and the future of Money (Novice to Expert) by Keizer Söze(2146)
Alibaba by Duncan Clark(1760)
Owning Bitcoin: The Illustrated Guide to Security, Privacy, and Potential by Apodaca Richard(1722)
Foundations of Blockchain by Koshik Raj(1658)
Significant Zero by Walt Williams(1637)
The Mastermind by Evan Ratliff(1602)
Bitcoin: The Basics of Blockchain and Investing in Cryptocurrency by K. Connors(1567)
Mastering Blockchain by Imran Bashir(1442)
Attack of the 50 Foot Blockchain by David Gerard(1434)
Bitcoin: The Ultimate Guide to the World of Bitcoin, Bitcoin Mining, Bitcoin Investing, Blockchain Technology, Cryptocurrency (2nd Edition) by Ikuya Takashima(1426)
The Bitcoin Standard: The Decentralized Alternative to Central Banking by Saifedean Ammous(1426)
Shaping the Fourth Industrial Revolution by Klaus Schwab & Nicholas Davis & Satya Nadella(1362)
Dawn of the New Everything: Encounters with Reality and Virtual Reality by Jaron Lanier(1339)
Turing's Cathedral by George Dyson(1331)
Cryptocurrency by Neil Hoffman(1330)
The Bitcoin Guidebook by Ian DeMartino(1296)
Bill Gates by Michael Becraft(1268)