Description
In Lesson 2, Chapter 2 (Mappings and Addresses), the tutorial description explicitly states that zombieToOwner should be a public mapping. However, for the second assignment (ownerZombieCount), the text does not mention the public modifier.
The issue is that the automated test checker allows the user to pass the chapter even if ownerZombieCount is declared without the public modifier (e.g., mapping (address => uint) ownerZombieCount;), whereas the frontend would realistically require it to be public for external queries.
Exploit/Incorrect Behavior Scenario
- Go to Lesson 2, Chapter 2.
- Provide the second mapping without the
public visibility modifier.
- Click "Check Answer".
- The system grants a green light and accepts the code, despite the missing visibility modifier.
Recommendation
Update the validation script for Lesson 2, Chapter 2 to strictly enforce the public modifier for both mappings, or clarify the text instructions in the second task to avoid confusing students who notice the difference in the compilation checks.
Description
In Lesson 2, Chapter 2 (Mappings and Addresses), the tutorial description explicitly states that
zombieToOwnershould be apublicmapping. However, for the second assignment (ownerZombieCount), the text does not mention thepublicmodifier.The issue is that the automated test checker allows the user to pass the chapter even if
ownerZombieCountis declared without thepublicmodifier (e.g.,mapping (address => uint) ownerZombieCount;), whereas the frontend would realistically require it to be public for external queries.Exploit/Incorrect Behavior Scenario
publicvisibility modifier.Recommendation
Update the validation script for Lesson 2, Chapter 2 to strictly enforce the
publicmodifier for both mappings, or clarify the text instructions in the second task to avoid confusing students who notice the difference in the compilation checks.