Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Ethereum Projects for Beginners
Ethereum Projects for Beginners

Ethereum Projects for Beginners: Build blockchain-based cryptocurrencies, smart contracts, and DApps

€16.99 €10.99
Book Jul 2018 106 pages 1st Edition
eBook
€16.99 €10.99
Print
€19.99
Subscription
€14.99 Monthly
eBook
€16.99 €10.99
Print
€19.99
Subscription
€14.99 Monthly

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
Buy Now

Product Details


Publication date : Jul 25, 2018
Length 106 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781789537406
Category :
Concepts :
Table of content icon View table of contents Preview book icon Preview Book

Ethereum Projects for Beginners

Chapter 1. Workflow Setup and Thinking Blockchain

Blockchains are the new fad in the word of cryptocurrency; we have witnessed the remarkably growing popularity of Bitcoins. Ethereum uses a technology similar to Bitcoin, and the coin that it trades in is known as ether. There is not much difference between the two except for smart contracts that are nothing but the codes that are written using the Ethereum Virtual Machine (EVM), which automates as well as executes agreements in an immutable ledger. We will get to know more about this later. To dive in further, first we are going to go over some use cases—they're very interesting. Next we will provide an overview of the Ethereum blockchain and blockchain in general. We will look at some of the benefits and limitations of blockchain. Then, we are going to get into setting up an efficient workflow so that we can get into further chapters without anything holding us back.

Topics that we'll be covering in this chapter are as follows:

  • Ethereum-based projects
  • An overview of blockchain and Ethereum
  • Benefits and limitations
  • Setting up an efficient workflow

Ethereum-based projects


Ethereum is like Bitcoin, but it's for code! It's the blockchain for smart contracts and it stores immutable code and logic in the blockchain. Immutable is a very important word here. That's pretty much all you need to know about Ethereum. So, what's possible right now? Let's have a look in the following sections.

Gnosis

Gnosis is market-driven forecasting technology. It is based on proven scientific research. It has its own platform known as the Gnosis platform and you can build your own platform on top of it. It basically makes trading predictions. And correct predictions are given the tokens that were at stake for incorrect predictions. Visit https://gnosis.pm/ to access Gnosis.

The way it works is that you trade predictions or you bet on predictions. The following is the front page of Gnosis:

Gnosis front page

In the preceding screenshot, do note the question that is being asked on their home page. Will Dubai's world record for the largest New Year's Eve fireworks display get broken? You can vote yes or no, and by voting, your tokens are at stake, and an Oracle is then going to tell you whether the event happened or not. The blockchain will then check on that Oracle. Oracles are nothing but smart contracts that interact with the outside elements. They can store and retrieve data—this is just what an Ethereum transaction needs to make decisions. An Oracle is a trusted source, and after checking with this trusted source, you can determine in a blockchain whether the event really did happen or not, and you can be absolutely certain about it.

The following diagram explains exactly how this happens:

The Gnosis platform layers

FirstBlood

FirstBlood is comparable to Gnosis; it is for e-sports. In cases where you are a gamer, you can sign up for a match using tokens. You can put tokens at stake to win tokens, you can put yourself in a queue in a pool of other teams or people, and you can play against them. You can even participate in tournaments. The winner of the game gets the tokens. Oracle is used to decide the outcome of a match. Visit http://firstblood.io to access FirstBlood.

 

Dynamis

This is a peer-to-peer insurance company, meaning there are no more middlemen. Currently, they are working on unemployment insurance, wherein you get paid to be unemployed! You just have to show people that you are actively looking for a job. The way they verify this is by using an Oracle similar to Gnosis and FirstBlood, but they use it to check LinkedIn and to verify that you have been applying to jobs.

Ujo Music

This is basically a decentralized music store for artists! We all know iTunes, Spotify, and so on. These are companies that are sitting in the middle of artists and their fans, but fans can't know right away how much money artists actually make from each sale. Ujo Music takes care of this by decentralizing the music store. There are no more middlemen, which means that they are a bridge between artists and fan. This certainly means it ensures more power and money for the artists. There are no worries about licensing and it delivers music services only to verified identities. To access Ujo Music, visit https://ujomusic.com/.

The way it works work is described in the screenshot; they have multiple layers and they have their licensing and payments on Ethereum. They have a persistent identity on uPort which is also built on Ethereum:

 

Ujo Music 

The files themselves are stored in decentralized file storage, InterPlanetary File System (IPFS), and the metadata uses constellate which is also built on Ethereum.

The next project is one of my favorites.

Golem

It is a decentralized supercomputer! It does off-chain calculations. Off-chain calculations are calculations that do not happen on the blockchain; calculations are done outside of the blockchain. Then on the on-chain, it will verify these calculations. This means you can rent out your spare computing power or you can hire extra computing power if you need it. You can do this for 3D rendering, computational chemistry, AI machine learning—anything you like. To visit Golem, go to https://golem.network/.

 

In the following screenshot, you can see the Golem GUI. On the left, you can see a basic wallet; you can also see how much CPU, RAM, and disk space are being used. To the right, you can see a little proof of concept of three tasks being put out there, it's three Blender tasks, in this case, 3D rendering tasks:

Golem GUI

Overview of blockchain and Ethereum


Here, we will provide a short overview of Ethereum and blockchain in general. We will have a little look under the hood so that you can get a better understanding of how Ethereum and blockchain make these great products—these great use cases that we've seen are possible.

Going from Bitcoin to Ethereum

Bitcoin was the first blockchain, but Bitcoin was only meant for payments. People started discovering that Bitcoin could be used for other scenarios; we call this Colored Coins. Bitcoin had a surprisingly open design and one guy, Vitalik Buterin, decided to start developing Ethereum on top of the Bitcoin blockchain. But, due to limitations in Bitcoin, Ethereum now has its own blockchain.

The following table shows the differences between Bitcoin and Ethereum:

Bitcoin

Ethereum

Used for payments

Used for code and logic

It is a digital currency

It is a smart contract platform

Average block time/transaction processing time of 10 minutes

Average block time/transaction processing time of only 17.5 seconds

It is not Turing complete

It is Turing complete

Bitcoin and Ethereum are both blockchains. They both rely heavily on private/public-key cryptography, and even though Bitcoin is primarily a form of payment, both can be used to transfer value, although, with the Ethereum blockchain, value will be processed with logic. Both are completely immutable.

The following are the things to remember for blockchains:

  • When something is in the blockchain, it's final. That means there's no rolling back of anything you do, so even with your code, you have to find special way to update it.
  • Your private key is your digital identity, so don't lose it!
  • Blockchain is not standalone; it's usually used in conjunction with other technologies, mostly frontend technology or backend technology.

The benefits and limitations


Now that we've looked at an overview of blockchain, we will be having a look at some of the benefits of blockchain. We will also have a look at some of the limitations when you are developing a blockchain application, and we will have a look at how we can overcome these limitations or how we can work around them.

Benefits of blockchain and Ethereum

The following are some of the benefits of blockchain:

  • Decentralization
  • Trustlessness—you don't have to trust or put all your money in a single point of failure
  • It can be very cost effective
  • It can also present itself to be the backbone of IoT and electric vehicles, a power grid, or a decentralized identity in your smartphone or an electric ID card

Limitations of blockchain and Ethereum

The following are some difficulties one can face while using blockchains:

  • If you try to use blockchain where you don't need it, it can be very costly.
  • Blockchains don't really do private data that well because blockchains are supposed to be public.
  • Sometimes, centralization is required, and blockchains are always decentralized; that doesn't fit.
  • Most blockchains don't really scale well to high usage.
  • Storing big files is not really recommended because more computation means more power and more money on a public blockchain; on a private blockchain it just means more power—and you need to invest more in your infrastructure so that is also more money.

Overcoming limitations

Sometimes, you just can't overcome limitations because you just have to use blockchain where you need it. Some things can be overcome, such as storing private data on a public chain. This can be done by adding some extra encryption to your data. You can store big files on the IPFS which is also decentralized—it is not a blockchain, but it is decentralized file storage and it works really well with Ethereum. The problem of scalability is solved by Ethereum's sharding: sharding means splitting the space of accounts, such as contracts, into smaller subspaces. Private chains are also available if you need them, such as J.P. Morgan's Quorum, Monax, and Bletchley. They are all Ethereum based.

Setting up the workflow


Here, we will be doing some workflow setup so we can get started with developing.

Requirements

The following are the things we will need for setting up the workflow:

  • Google Chrome.
  • MetaMask, which is a Chrome extension. We will use this to connect to and to test the blockchain.
  • Node Package Manager (NPM).
  • Truffle, which is our first framework. We will be using it to develop our first decentralized application.
  • Ethereum-JS ganache-cli, which is a test blockchain.

 

 

Getting started

Follow these steps to set up the workflow:

  1. Get the NPM. It is part of Node.js. You can get it at www.npmjs.com/get-npm, as shown in the following screenshot:

Getting the NPM

  1. Select the latest version displayed on their web page:
  2. Click on GET CHROME EXTENSION.
    • Then click on Add to Chrome.
  3. The preceding tool that we will be used to test our blockchain applications. Once you've installed it, a new tab will open up with a video explaining in depth how to use it and what it is.
  4. It is important for you to remember during this book that you can connect to the main network as well as three test networks, but you can also set up your own network, your own blockchain, and run on that. The following screenshot shows this:

MetaMask Main Network

  1. Install the Ethereum blockchain simulator called ganache-cli.
  2. This can be done as explained in the following screenshot:

Command to install Ethereum blockchain simulator

  1. You can install this as a node package by just copying this command and pasting it in your terminal. Once you've pasted it in your terminal, it will start installing, as shown here:

Installing Ethereum Simulator

 

Once that is done, it will tell you that it has succeeded; quit this for now because I have already reinstalled this. You can go ahead and verify it by typing ganache-cli into your Command Prompt and verifying that it runs. The following will be the output you will get if you have installed the simulator correctly:

Ethereum Simulator

  1. Installing and downloading Truffle.
  2. Truffle also is a simple node package from truffleframework.com that you can install by copying and pasting a command into your terminal, as shown here:

Command for installing Truffle

  1. Once that's done installing, you can verify it by typing truffle, as shown in the following screenshot, and now you can use any of these commands:

Truffle

  1. You can use init to initialize a new project, which we will be doing in the next chapter. Hence, we have successfully completed the installation.

 

 

Summary


We have discussed different projects running on Ethereum and gained an overview of blockchain; after this, we moved on to its benefits and limitations, and how to overcome the limitations. In the end, we created a setup for our own Ethereum workflow.

In the next chapter, we will be developing our first simple decentralized payment application with Ethereum.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • •Build your own decentralized applications using real-world blockchain examples
  • •Implement Ethereum for building smart contracts and cryptocurrency applications with easy-to-follow projects
  • •Enhance your application security with blockchain

Description

Ethereum enables the development of efficient, smart contracts that contain code. These smart contracts can interact with other smart contracts to make decisions, store data, and send Ether to others.Ethereum Projects for Beginners provides you with a clear introduction to creating cryptocurrencies, smart contracts, and decentralized applications. As you make your way through the book, you’ll get to grips with detailed step-by-step processes to build advanced Ethereum projects. Each project will teach you enough about Ethereum to be productive right away. You will learn how tokenization works, think in a decentralized way, and build blockchain-based distributed computing systems. Towards the end of the book, you will develop interesting Ethereum projects such as creating wallets and secure data sharing.By the end of this book, you will be able to tackle blockchain challenges by implementing end-to-end projects using the full power of the Ethereum blockchain.

What you will learn

•Develop your ideas fast and efficiently using the Ethereum blockchain •Make writing and deploying smart contracts easy and manageable •Work with private data in blockchain applications •Handle large files in blockchain applications •Ensure your decentralized applications are safe •Explore how Ethereum development frameworks work •Create your own cryptocurrency or token on the Ethereum blockchain •Make sure your cryptocurrency is ERC20-compliant to launch an ICO

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
Buy Now

Product Details


Publication date : Jul 25, 2018
Length 106 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781789537406
Category :
Concepts :

Table of Contents

12 Chapters
Title Page Chevron down icon Chevron up icon
Copyright and Credits Chevron down icon Chevron up icon
Packt Upsell Chevron down icon Chevron up icon
Contributor Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
Workflow Setup and Thinking Blockchain Chevron down icon Chevron up icon
Developing Your First Decentralized Application with Ethereum Chevron down icon Chevron up icon
Creating Your Own Cryptocurrency on the Ethereum Blockchain Chevron down icon Chevron up icon
Signing Legal Documents on Blockchains and Identity Verification Chevron down icon Chevron up icon
Ethereum Outside the PC/Web Environment Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
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.