NethermindEth / StarknetByExample

A collection of examples of Cairo smart contracts for Starknet.
https://starknet-by-example.voyager.online/
MIT License
117 stars 85 forks source link

feat(enums): Enums in contract #212

Closed hudem1 closed 5 months ago

hudem1 commented 5 months ago

Issue(s): Close #209

Description

Introduce enums and how they can be used inside starknet contracts.

  1. Enum Declaration: Show how to declare enums outside of a contract for reusability and modularity.
  2. Enum Imports: Demonstrate how to import enums into contracts where they are needed.
  3. Example Use Cases: Provide practical examples of how enums can be used in cairo contracts.
  4. Comprehensive Explanation: Include detailed explanations and comments to ensure clarity.

Checklist