Chapter 6: Writing Smart Contracts

Solidity is an object-oriented programming language used to write smart contracts. This chapter will discuss the design aspects of writing smart contracts, defining and implementing a contract, and deploying and creating contracts using different mechanisms—using the new keyword and contract addresses. Object orientation is based on four concepts—abstraction, encapsulation, inheritance, and polymorphism—and this chapter will delve deep into object-oriented concepts and implementations.

This chapter covers the following topics:

  • Writing a simple contract
  • Creating contracts
  • Creating contracts via the new and existing address
  • Contract constructor
  • Contract composition
  • Inheritance
  • Encapsulation
  • Polymorphism
  • Method ...

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.