The Solidity Programmer's Handbook
()
About this ebook
The book also introduces cryptocurrencies, their valuation and design via a smart contract.
This book is intended for student and/or professional programmers that would like to learn the solidity programming language and its application to smart contract design.
Related to The Solidity Programmer's Handbook
Related ebooks
Ethereum Blockchain Developer - The Bootcamp Rating: 5 out of 5 stars5/5Solidity Smart Contracts: Build DApps In The Ethereum Blockchain Rating: 4 out of 5 stars4/5Smart Contract Development with Solidity and Ethereum: Building Smart Contracts with the Azure Blockchain Rating: 0 out of 5 stars0 ratingsBuilding Blockchain Projects Rating: 2 out of 5 stars2/5Mastering Blockchain Rating: 4 out of 5 stars4/5Blockchain: Real-World Applications And Understanding Rating: 4 out of 5 stars4/5Blockchain Fundamentals for Web 3.0: - Rating: 0 out of 5 stars0 ratingsEthereum: Your Guide To Understanding Ethereum, Blockchain,and Cryptocurrency: Ethereum Rating: 5 out of 5 stars5/5Exploring Web3 Rating: 5 out of 5 stars5/5Blockchain: The Ultimate Guide to Understanding the Technology Behind Bitcoin and Cryptocurrency Rating: 5 out of 5 stars5/5Blockchain for Business with Hyperledger Fabric: A complete guide to enterprise blockchain implementation using Hyperledger Fabric Rating: 0 out of 5 stars0 ratingsBlockchain From Concept to Execution Rating: 0 out of 5 stars0 ratingsBlockchain Unlocked: Business Transformation with Blockchain Technology Rating: 0 out of 5 stars0 ratingsQuick Guide for Smart Contracts Creation and Deployment on Ethereum Blockchain Rating: 0 out of 5 stars0 ratingsDeFi and the Future of Finance Rating: 0 out of 5 stars0 ratingsThink Blockchain: A Student's Guide to Blockchain's Evolution from Bitcoin, Ethereum, Hyperledger to Web3. Rating: 5 out of 5 stars5/5Summary of Erina Azmi's How to DeFi Rating: 0 out of 5 stars0 ratingsEthereum: A New World of Possibilities Rating: 5 out of 5 stars5/5Blockchain: The complete guide to understanding Blockchain Technology for beginners in record time Rating: 4 out of 5 stars4/5Building RESTful Python Web Services Rating: 4 out of 5 stars4/5RESTful API Design - Best Practices in API Design with REST: API-University Series, #3 Rating: 5 out of 5 stars5/5Node.js Design Patterns Rating: 4 out of 5 stars4/5
Computers For You
Storytelling with Data: Let's Practice! Rating: 4 out of 5 stars4/5Elon Musk Rating: 4 out of 5 stars4/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 4 out of 5 stars4/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 4 out of 5 stars4/5The Self-Taught Computer Scientist: The Beginner's Guide to Data Structures & Algorithms Rating: 0 out of 5 stars0 ratingsCompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsComputer Science I Essentials Rating: 5 out of 5 stars5/5Fundamentals of Programming: Using Python Rating: 5 out of 5 stars5/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5CompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution Rating: 4 out of 5 stars4/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5Get Into UX: A foolproof guide to getting your first user experience job Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5UX/UI Design Playbook Rating: 4 out of 5 stars4/5CompTia Security 701: Fundamentals of Security Rating: 0 out of 5 stars0 ratingsExcel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsThe Musician's Ai Handbook: Enhance And Promote Your Music With Artificial Intelligence Rating: 5 out of 5 stars5/5Becoming a Data Head: How to Think, Speak, and Understand Data Science, Statistics, and Machine Learning Rating: 5 out of 5 stars5/5Mindhacker: 60 Tips, Tricks, and Games to Take Your Mind to the Next Level Rating: 4 out of 5 stars4/5Technical Writing For Dummies Rating: 0 out of 5 stars0 ratingsMicrosoft Azure For Dummies Rating: 0 out of 5 stars0 ratingsQuantum Computing For Dummies Rating: 3 out of 5 stars3/5An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5ITIL Foundation Essentials ITIL 4 Edition - The ultimate revision guide Rating: 5 out of 5 stars5/5
Reviews for The Solidity Programmer's Handbook
0 ratings0 reviews
Book preview
The Solidity Programmer's Handbook - Tony Hontzeas
The Solidity Programmer's Handbook
By : Tony Hontzeas
Includes a section on Cryptocurrency Valuation
Copyright
Copyright © 2018 by Antonis Tony
Hontzeas
All rights reserved.
This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold with the understanding that the author is not engaged in rendering professional services. If legal, accounting, medical, psychological, or any other expert assistance is required, the services of a competent professional person should be sought. The author makes no representations or warranties including without limitation warranties of fitness for a particular purpose.
The advice and strategies contained herein may not be suitable for every situation. The author shall not be liable for damages arising herefrom.
Library of Congress Cataloging-in-Publication Data:
Hontzeas, Antonis
The Solidity Programmer’s Handbook : Includes a special section on Cryptocurrency Validation
Includes resource references.
1. Solidity (Programming Language) I. Hontzeas, Antonis II. Title
ISBN #: 978-1-387-89551-9
Foreword
Dedicated to Chrysippus, Epictetus and Marcus Aurelius
We are at a dawn of a new age, a digital age. In the next 20 years we will see more changes taking place, than humanity has experienced in the last 300 years[1]. Self driving vehicles, biometric identification, preventive health through advanced predictive models, deep learning and machine intelligence and eventually a world wide seamless decentralized virtual computing platform.
About 2000 years ago Plato presented in The Republic
the dangers of consolidating power and information to a single individual or an oligarchy, unless these individuals were ethically perfect. In Plato’s world the dilemma referred to as Who will watch the Watchers
would only be solvable by a Philosopher King; historically the only individual to come close to this was Roman Emperor Marcus Aurelius.
In his celebrated book Voltaire’s Bastards
John Raulston Saul reiterates Plato’s concern and further goes on to question the hierarchical rational
organizational superstructures that the west has relied on for its administrative prowess. These superstructures aside from being slow and inefficient have also led to information concentration (amongst other things) and have led to accidents
such as the 2008 crisis confirming Marx’s stipulation that Capitalism is its own worst enemy.
The market economy will survive only through transaction fluidity and healthy credible risk minimum transactions. Continued crises such as the 2008 world crisis breed anxiety and anxiety breeds insecurity which in itself breeds unrest, and unrest as Nicholas II of Russia had the misfortune to discover, brings about a series of unfortunate events.
Blockchain systems are peer to peer ledgers that automate in a risk free manner wealth transfer and eliminate the need for custodians, clearing houses, and any other types of bureaucracy that is intended to instill trust in a transaction. The blockchain’s inherent architecture provides a seamless peer to peer transparent to all distributed ledger system which stems from the fact that holdings and transactions are traceable, irrefutable, incorruptible and transparently open to viewing. Any type of digital asset whether digital currency, contracts such as trust funds and rental leases, birth certificates and so forth, can be coded as a smart contract and uploaded on a blockchain and remain there for all time –or as is necessary- thus allowing traceability, generation after generation.
Where other technologies bring local layered societal efficiencies, the blockchain as a concept implies an institutional change to the way we work and think about organizations, society, commerce and the general realization of value; gone are hierarchies and organizational superstructures in favor of organizational flat efficient computer intercommunication. Where other technologies may be considered optional, implementation of blockchain-like concepts are a must if commerce is to survive and flourish!
This book attempts to bring to light the important features of the blockchain and Ethereum and to introduce the reader to the Ethereum smart contact programming language known as Solidity.
The philosophy of this book is to introduce the reader to small snippets of Solidity code to enable quick understanding and to also permit the programmer to mix and match the code in various permutations; by learning simple parts, one can then build a complex whole whose sum of parts adds more value than the parts themselves.
We hope you enjoy this book, and we promise that the time invested will be well worth it.
Happy Trekking!
Tony Hontzeas
September 11th, 2018
linkedin Antonis Hontzeas
[1] Attributed to futurist Gerd Leonhard
The Big Picture
A blockchain is a growing list of records called blocks, which are linked using cryptography. Cryptography outlines techniques for secure communication in the presence of third parties and since its conception every blockchain, beginning with block 0 known as the Genesis node, is resistant to any change in the block data. The blockchain represents an open distributed ledger within a peer to peer network that can record transactions between two parties efficiently and in a verifiable and permanent way. Once recorded, the data in any given block cannot be altered retroactively without alteration of all subsequent blocks, which requires consensus of the network majority. As such, blockchains are distributed computing systems which are considered generally secure and with a high degree of Byzantine fault tolerance.
Blockchains can be public, private, or a consortium or federated blockchain.
Public blockchains allow universal accessibility where anyone can participate in the process that determines which blocks get added to the chain and what the current shape and size of the blockchain is. Examples of public blockchains include BitCoin, Ethereum, Litecoin, etc.
In a private Blockchain, write permissions are kept centralized to one organization. Read permissions may be public or restricted to any degree. Example applications of private blockchains include database management, auditing, etc. which are internal to a single company, and so public readability may be undesirable.
A