Chapter 5. Programming smart contracts in Solidity

 

This chapter covers

  • Understanding EVM languages
  • Understanding the structure of a contract
  • Learning core Solidity syntax

Thanks to SimpleCoin, the basic cryptocurrency you’ve been building, you’ve learned the basics of Solidity through example. By now, you know Solidity is a high-level EVM language that allows you to write contracts. You also know a smart contract (or, simply, contract) is equivalent to a class in other languages and contains state variables, a constructor, functions, and events. In this chapter, you’ll learn Solidity’s main language constructs in a more structured way and develop a progressively deeper understanding of the language.

This chapter lays the foundation for the next chapter, where you’ll learn how to implement complex contracts and multicontract Dapps in Solidity. By the end of this chapter, you’ll be able to improve and extend SimpleCoin’s functionality with the knowledge you’ve acquired.

5.1. EVM contract languages

5.2. High-level contract structure

5.3. Solidity language essentials

5.4. Time to improve and refactor SimpleCoin

Summary