Summary
This chapter was a deep dive into writing smart contracts that can upgrade and evolve in the future. Dependency injection is an important concept for writing upgradable smart contracts, and this was also explained at the beginning of the chapter. Almost every contract will change at some point in time and will need to be upgraded. Writing upgradable contracts is generally a non-functional requirement for any mission-critical contract and a must-have skill for any serious smart contract author. In this chapter, we saw multiple ways of writing upgradable smart contracts, from simple implementations to complex approaches involving assembly code.
In the next chapter, we will get into the details of writing secure smart contracts. It is one of the most important aspects of writing quality smart contracts and plays an important role in taking them to production.