Lesson 5: Assignments & Exercises

Assignments and Practical Exercises

Assignment 1:

  • Write a brief essay on how and why to use structs and mappings together in Solidity contracts to manage complex data.

Exercise 1:

  • Implement a smart contract using enums to manage the state of a simple process, like an order system.

Exercise 2:

  • Create a contract utilizing structs to store user profiles and mappings to efficiently look up profiles by Ethereum addresses.


These advanced data types are fundamental in developing robust and functional smart contracts. They enable developers to represent complex data structures and relationships, manage contract state efficiently, and implement sophisticated logic within contracts. Through the practical exercises, you'll gain hands-on experience in utilizing these data types effectively.

Last updated