Smart contracts can be inherited to extend the functionality. Solidity also supports multiple inheritance and polymorphism. We will look into each of them in detail with this recipe.
Contract inheritance in solidity
Getting ready
You need to have a working Ethereum installation for deploying and testing the smart contract. You can also use the Remix IDE to write and test the solidity code.
It is required to have a basic knowledge of solidity to understand this recipe. Go through Chapter 2, Smart Contract Development, for more information.
How to do it...
- Inherit contracts...