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
AU$33.99 AU$48.99
Paperback
AU$60.99
Subscription
Free Trial
Renews at AU$24.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $24.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781839218262
Category :
Languages :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $24.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
AU$24.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
AU$249.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 AU$5 each
Feature tick icon Exclusive print discounts
AU$349.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 AU$5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total AU$ 282.97
Learn Ethereum
AU$97.99
Mastering Blockchain
AU$123.99
Mastering Blockchain Programming with Solidity
AU$60.99
Total AU$ 282.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

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.