Chapter 12: Upgradable Smart Contracts
Writing upgradable contracts is an essential design pattern for contracts supported by blockchain. It is necessary to be familiar with and implement this pattern in relation to any contracts that developers think may need to be changed in the future. In this chapter, we will look at various ways to write upgradable smart contracts. We will learn what proxy contracts are, how to implement them for function upgradability using object-oriented concepts such as inheritance and composition, and finally learn about the patterns related to upgradable storage within smart contracts. Related concepts, such as dependency injection, will also be covered as part of the chapter.
We will cover the following topics:
- Learning what constitutes upgradability
- Understanding dependency injection
- Reviewing problematic smart contracts
- Implementing simple solutions with inheritance
- Implementing simple solutions with composition
- Implementing...