Skip to Content
Foundations of Blockchain
book

Foundations of Blockchain

by Koshik Raj
January 2019
Beginner to intermediate
372 pages
11h 17m
English
Packt Publishing
Content preview from Foundations of Blockchain

Executing the smart contract

The smart contract is executed with similar steps as shown in the earlier section where we deployed the basic smart contract. The only differences are the parameters supplied to the contract and the corresponding return data.

As mentioned earlier, we will create a proof of ownership application to keep track of the documents. Each document can be uniquely identified by its digest. We will use the SHA256 hash value of the document as the asset ID. Let's consider a file that has the following content. The files are usually stored with an additional new line character that is not visible in raw text output:

This document was created by Alice. 

And the following digest represents the SHA256 hash value of the file: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Blockchain Basics

Blockchain Basics

Daniel Drescher
What Is Blockchain?

What Is Blockchain?

Sir John Hargrave, Evan Karnoupakis
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey

Publisher Resources

ISBN: 9781789139396Supplemental Content