beginner

Multi-Value Storage

25 min
3 objectives
Let's expand on storage by working with multiple values of different types. This challenge introduces you to various storage types available in Stylus. ## Your Task Create a contract that stores: 1. An owner address using `StorageAddress` 2. A boolean flag using `StorageBool` 3. A name string using `StorageString` Implement functions to get and set each value. ## Key Concepts - `StorageAddress` stores Ethereum addresses - `StorageBool` stores boolean values - Different storage types have different methods

Learning Objectives

  • Use multiple storage types together
  • Work with Address type
  • Understand different getter/setter patterns
lib.rs

Click "Run Code" to validate your solution