Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Ethereum Smart Contract Development

You're reading from   Ethereum Smart Contract Development Build blockchain-based decentralized applications using solidity

Arrow left icon
Product type Paperback
Published in Feb 2018
Publisher Packt
ISBN-13 9781788473040
Length 288 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Mayukh Mukhopadhyay Mayukh Mukhopadhyay
Author Profile Icon Mayukh Mukhopadhyay
Mayukh Mukhopadhyay
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Blockchain Basics 2. Grokking Ethereum FREE CHAPTER 3. Hello World of Smart Contracts 4. A Noob's Guide to DApps and DAO 5. Deep-Diving into Smart Contracts 6. Solidity in Depth 7. Primer on Web3.js 8. Developing a Cryptocurrency from Scratch 9. Enterprise Use Cases 10. BaaS and the Dark Web Market 11. Advanced Topics and the Road Ahead 12. Other Books You May Enjoy

Project smartCV


In this section, we are going to develop smart-contract-based curriculum vitae. Originally designed by Ryan Hendricks, a New-York based smart contract developer, this basic contract has two crucial modules:

  • Library (cvSection)
  • Contract (cvContract)

The contract can be further subdivided into three parts:

  1. Contract definition andconstructors
  2. New profile data module
  3. Edit profile data module

Figure 10.7 depicts the library function, which is made up of various Struct datatypes:

Figure 10.7: Library definition

Each structure definition inside the library has different set of arguments. Next, we see Figure 10.8, which depicts the contract definition:

Figure 10.8: cvContract definition

This contract is capable of managing multiple CVs from different persons. This is accomplished by the setProfile and getProfile modules. Figure 10.9 depicts the setProfile module:

Figure 10.9: New profile add module

In a similar fashion, Figure 10.10 depicts the get profile data, which is used to check after any...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image