Skip to Content
Ethereum Cookbook
book

Ethereum Cookbook

by Manoj P R
August 2018
Intermediate to advanced
404 pages
11h 19m
English
Packt Publishing
Content preview from Ethereum Cookbook

How it works...

EVM is the runtime environment for Ethereum smart contracts. Contracts running inside EVM have no access to the network, filesystem, or other processes. This is because of the isolated and sandboxed nature of EVM.

The first line in this smart contract tells us that the source code is written for compiler version 0.4.21 or anything newer (such as <0.5.0) that does not break any functionality. The pragma keyword is used because pragmas are instructions for the compiler about how to treat the source code. 

The line string textToPrint = "hello world"; declares a state variable called textToPrint and assigns a value to it. You can think of it as a slot in a database that can be queried and altered by calling the functions in the ...

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

Building Ethereum Dapps

Building Ethereum Dapps

Roberto Infante
Ethereum For Dummies

Ethereum For Dummies

Michael G. Solomon

Publisher Resources

ISBN: 9781789133998Supplemental Content