Lesson 7: Assignments & Exercises

Assignments and Practical Exercises

Assignment 1:

  • Analyze a popular smart contract framework (e.g., OpenZeppelin) to identify how they use inheritance and interfaces to provide reusable contract libraries. Discuss the benefits of their approach.

Exercise 1:

  • Create a contract that inherits from multiple base contracts and also implements an interface. This exercise will help solidify your understanding of how inheritance and interfaces can work together in Solidity.

Exercise 2:

  • Design a simple dApp architecture using both inheritance and interfaces to demonstrate the modular design. For example, a voting system where base contracts provide common functionalities and interfaces ensure interoperability between different components.


This lesson aims to equip you with a deeper understanding of inheritance and interfaces in Solidity, laying the foundation for developing advanced smart contracts that are both modular and interoperable.

Last updated