Summary
This chapter, in many ways, was a continuation of previous chapters. Variables were discussed in depth in the first half of this chapter. Variable scoping and data type conversions were elaborated on, along with code examples. The latter half of the chapter focused on globally available variables and functions. Transaction- and message-related variables, such as block.coinbase
and msg.data
, were explained. The difference between msg.sender
and tx.origin
, along with their usage, was also explained in this chapter. This chapter also discussed cryptographic-, address-, and contract-level functions. However, we will focus on these functions in another chapter later in this book.
The following chapter will focus on Solidity expressions and control structures, covering programming details about loops and conditions. This will be an important chapter because every program needs some kind of looping to perform repetitive tasks, and Solidity control structures help implement these...