Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Mastering Blockchain Programming with Solidity
Mastering Blockchain Programming with Solidity

Mastering Blockchain Programming with Solidity: Write production-ready smart contracts for Ethereum blockchain with Solidity

eBook
$29.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Mastering Blockchain Programming with Solidity

Introduction to Blockchain

Blockchain technology was born with the invention of Bitcoin—a new form of peer-to-peer (P2P) electronic cashback in 2008. The Bitcoin white paper was released on October 31, 2008 and the first release of Bitcoin came on January 3, 2009. The blockchain space is still a toddler in terms of adoption and the tools available. It has some unique properties that did not exist before in any of the previous systems or software applications. The most important property of blockchain is establishing trust between two or multiple parties without needing any intermediaries, which opens a new era in programming.

Ethereum is one of the implementations of blockchain. Ethereum is an open source, public, and distributed computing platform. On Ethereum, developers can deploy smart contracts written in the Solidity...

Understanding blockchain

A blockchain is a timestamped series of immutable transactions that is managed by a cluster of computers using special computer algorithms. These immutable records are not owned by any single entity. A blockchain is a decentralized P2P network of nodes. Each node in a blockchain shares the same copy of data, also called the digital ledger. Each node present in the network uses the same algorithm to reach a consensus.

A blockchain, by design, is resistant to the modification of data. The ledger can record transactions between two parties in a verifiable and permanent way. Whenever there is a change in the ledger using transactions, changes are distributed to all the nodes, to verify and update their own copy of the ledger. Once a transaction is stored and verified by all the nodes in the network, then it is not feasible...

Introduction to Ethereum

Ethereum was proposed in 2013 by Vitalik Buterin, a cryptocurrency researcher and programmer. The first production release launched in 2015. Ethereum is an implementation of blockchain, and is an open source, public, and decentralized computing platform. Ethereum gained popularity because of its smart contract's features. Developers can program their smart contracts and execute them on the blockchain platform so that the full potential of the blockchain's different properties can be used.

Ethereum is for writing decentralized applications

As discussed before, Bitcoin uses blockchain technology for payments using bitcoins as a currency. Bitcoin also supports a scripting language, with which...

Smart contracts

Nick Szabo coined the term smart contract in 1994. Smart contracts are self-executing contracts. They eliminate intermediaries and allow direct P2P transactions. A smart contract has the power to automatically enforce some obligations. One of the best examples of this is a vending machine: when you need an item from a vending machine, you pay into it and it gives you that item without needing any middleman.

Smart contracts are very different from traditional software programs. Smart contract code is immutable once deployed on the blockchain. Because of this immutable property, we have to think twice before deploying it; otherwise, it could end up with critical flaws in production. A different mindset is required for writing smart contracts. Some smart contracts present in decentralized applications handle the flow of ETH or other ERC20 tokens, which have real...

Introduction to the Solidity language

Solidity is high-level language oriented for smart contracts. It is a Turing-complete language, influenced by C++, Python, and JavaScript.

Solidity is a statically typed language that supports inheritance, libraries, and complex user-defined types. Solidity is a bit different from the other languages; for example, Solidity does not have null values. Variables are initialized with their default values. Solidity also does not have any exception-handling mechanism to propagate exceptions.

Solidity support different data types including uint, int, address, and many more. As developers, we must know that Solidity does not have boundary checks for the uint and int data types. This makes these data types vulnerable to overflow or underflow.

At the time of writing this book, a major release of Solidity, version 0.5.0, has come...

Solidity data types

The Solidity language is statically typed. When writing a contract or library definition, all of the state variables and local variables must have the data type specified along with its declaration. There are many data types supported by Solidity. You can create your own custom type by using the data types supported by Solidity; for example, you can define your complex struct variable.

Solidity also has a support for the var keyword, used for dynamic data type. However, since Solidity version 0.4.20, the var keyword has been deprecated because of security concerns.

If we look at the Java language, it has primitive data types and reference data types. For reference data types, especially for instantiable class, the default value is null while initialization. However, in Solidity, there is no concept of null values. Instead of null, the...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Delve into Solidity and understand control structures, function calls, and variable scopes
  • Explore tools for developing, testing, and debugging your blockchain applications
  • Learn advanced design patterns and best practices for writing secure smart contracts

Description

Solidity is among the most popular and contract-oriented programming languages used for writing decentralized applications (DApps) on Ethereum blockchain. If you’re looking to perfect your skills in writing professional-grade smart contracts using Solidity, this book can help. You will get started with a detailed introduction to blockchain, smart contracts, and Ethereum, while also gaining useful insights into the Solidity programming language. A dedicated section will then take you through the different Ethereum Request for Comments (ERC) standards, including ERC-20, ERC-223, and ERC-721, and demonstrate how you can choose among these standards while writing smart contracts. As you approach later chapters, you will cover the different smart contracts available for use in libraries such as OpenZeppelin. You’ll also learn to use different open source tools to test, review and improve the quality of your code and make it production-ready. Toward the end of this book, you’ll get to grips with techniques such as adding security to smart contracts, and gain insights into various security considerations. By the end of this book, you will have the skills you need to write secure, production-ready smart contracts in Solidity from scratch for decentralized applications on Ethereum blockchain.

Who is this book for?

This book is for developers and data scientists who want to learn Ethereum, blockchain, and Solidity to write smart contracts and develop production-ready code. Basic knowledge of Solidity is assumed.

What you will learn

  • Test and debug smart contracts with Truffle, Ganache, Remix, and MetaMask
  • Gain insights into maintaining code quality with different tools
  • Get up to speed with ERC standards such as ERC-20 and ERC-721
  • Become adept at using design patterns while writing smart contracts
  • Use MultiSignature (MultiSig) wallets and improve the security of contracts
  • Use Oracle services to fetch information from outside the blockchain

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 02, 2019
Length: 486 pages
Edition : 1st
Language : English
ISBN-13 : 9781839218637
Category :
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : Aug 02, 2019
Length: 486 pages
Edition : 1st
Language : English
ISBN-13 : 9781839218637
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 204.97
Learn Ethereum
$70.99
Mastering Blockchain
$89.99
Mastering Blockchain Programming with Solidity
$43.99
Total $ 204.97 Stars icon

Table of Contents

20 Chapters
Section 1: Getting Started with Blockchain, Ethereum, and Solidity Chevron down icon Chevron up icon
Introduction to Blockchain Chevron down icon Chevron up icon
Getting Started with Solidity Chevron down icon Chevron up icon
Control Structures and Contracts Chevron down icon Chevron up icon
Section 2: Deep Dive into Development Tools Chevron down icon Chevron up icon
Learning MetaMask and Remix Chevron down icon Chevron up icon
Using Ganache and the Truffle Framework Chevron down icon Chevron up icon
Taking Advantage of Code Quality Tools Chevron down icon Chevron up icon
Section 3: Mastering ERC Standards and Libraries Chevron down icon Chevron up icon
ERC20 Token Standard Chevron down icon Chevron up icon
ERC721 Non-Fungible Token Standard Chevron down icon Chevron up icon
Deep Dive into the OpenZeppelin Library Chevron down icon Chevron up icon
Using Multisig Wallets Chevron down icon Chevron up icon
Upgradable Contracts Using ZeppelinOS Chevron down icon Chevron up icon
Building Your Own Token Chevron down icon Chevron up icon
Section 4: Design Patterns and Best Practices Chevron down icon Chevron up icon
Solidity Design Patterns Chevron down icon Chevron up icon
Tips, Tricks, and Security Best Practices Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.9
(8 Ratings)
5 star 37.5%
4 star 0%
3 star 12.5%
2 star 12.5%
1 star 37.5%
Filter icon Filter
Top Reviews

Filter reviews by




corey magin Jan 31, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
For the discount, the book is in amazing condition.
Amazon Verified review Amazon
Dominguez De La Torre Dec 19, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Produit bien reçu livraison rapide
Amazon Verified review Amazon
Yalo Oct 02, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book is well structured and written in simple language. The book provides a complete perspective of Solidity language and tools. It consists of- different properties of the blockchain- Ethereum terminologies and concepts with real life examples- how smart contracts are different from other programming language, how should a programmer's mindset needs to be changed for writing smart contracts- usage of Solidity development tools and commands- different Solidity design patterns, different types of security attacksI like the chapters related to ERC standards, Open Zeppelin, ZOS as many tips are provided, There is a chapter which teaches you how to create your own ERC-20 token or cryptocurrency from scratch.Print quality of the book is good. There are some commands in screenshots where text is smaller, but you can read with little bit of focus.
Amazon Verified review Amazon
Ryan G. Aug 13, 2021
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Alright book. Several lazy/sloppy mistakes, including nonsensical sentences that were just not reviewed prior to publishing. The content is decent, but presented in a very interesting or compelling way. I'd suggest just following online tutorials over buying...
Amazon Verified review Amazon
kagaya Jan 03, 2022
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
sample codes in this book using -> pragma solidity 0.5.3That's pretty old, and library talked in this book like openzeppelin which current name openzeppelin-contracts is too old.So basically you need to learn by yourself with the newest documents github, after that you are able to know what changed.It's a good book to get the knowledge for ethereum in a certain degree, but not to do code work practically.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.