Chapter 4: Global Variables and Functions

In Chapter 3, Introducing Solidity, you learned about Solidity data types in detail. Data types can be of values or reference types. Some reference types such as structs and arrays also have data locations – memory and storage associated with them. Variables can be state variables or variables defined locally within functions. This chapter will focus on variables, their scoping rules, declaration and initialization, conversion rules, and variables available globally to all contracts. Some of the important global functions will be discussed in this chapter, while others will be discussed in subsequent chapters. These global variables are functions that are very important while authoring smart contracts. ...

Get Solidity Programming Essentials - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.