๐งต 6/8
๐ Events & Errors ๐ข๐ซ
Events are vital in Cairo.
Declare an enum with #[derive(starknet::Event)] and add all the event structs to it.
For indexed data, use #[key].
Emit events with self.emit(EventName) ๐ค.
To revert with an error message, use the assert! macro.
I interviewed over 50 back-end engineers in the last 2 years.
I created a Notion based "Learn Backend Development Pack" that contains a learning path to become a backend dev based on free resources.
Retweet and reply with "free" and I'll DM it to you.
(need to follow)