·
In the first day of the mentorship, we jumped straight into the Sukukfi contest on Code4rena. Only 4 days left, so we decided to still go through it for the learning experience and also to try to cover at least some of the contracts.
Lesson Summary:
- Start with base contracts after cloning the repo (e.g., System Config, Decimals, Tokens) to build foundational understanding.
- Memorize basic variables, mappings, and structs early—they provide essential context for complex parts.
- When opening a contract, review imports one-by-one: ask "Why this import? What's its purpose?"
- With OpenZeppelin libraries, always call the initializer for every inherited contract.
- Ownable2Step doesn't set owner automatically—check if OwnableUpgradeable's initialize is used instead.
- Learn OZ libraries only as needed in the moment; avoid preemptive deep dives.
- Avoid docs early to prevent bias—use them later to verify your understanding and spot discrepancies for further exploration.
- Examine inheritance: ask "Why this contract? What's its purpose?" similar to imports.
- Study state variables closely—memorize them and use them to anticipate function behavior and data flow.
- Overall approach: go line-by-line, building incremental understanding of the codebase.