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

$15.99 per month
Book Jul 2018 106 pages 1st Edition
eBook
$21.99 $14.99
Print
$25.99
Subscription
$15.99 Monthly
eBook
$21.99 $14.99
Print
$25.99
Subscription
$15.99 Monthly

What do you get with a Packt Subscription?

Free for first 7 days. $15.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 : 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 a Packt Subscription?

Free for first 7 days. $15.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 : 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

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.