Exploring ownership in Solidity
Solidity has some unique features that are not available in other programming languages, and it requires us to rethink it from a design patterns perspective. Solidity provides unique constructs, such as modifiers, which have a different way of handling and throwing exceptions, and has unique concepts, such as gas, Ether, consumption of gas, payable functions, and fallback functions.
Solidity was envisioned to provide a means to write contracts, although writing a contract looks very similar to writing an object-oriented class along with its methods and variables. In essence, contracts are a completely different genre and provide implementations that are unique to contract-based languages.
In this chapter, we will investigate design patterns that do not demand a complete chapter on their own but are very important from the usage and implementation perspectives. We will first understand what ownership is, and then cover the following:
- Ownable...