Cairo — StarkNet Smart Contract Reference
Quick reference for Cairo language syntax, types, storage patterns, events, contract templates, and testing guidance for StarkNet development.
Commands
syntax
Core Cairo syntax reference — variables, functions, control flow.
bash scripts/script.sh syntax
types
Cairo type system — felt252, integers, structs, enums, arrays.
bash scripts/script.sh types
storage
Storage variable patterns and access.
bash scripts/script.sh storage
events
Event declaration, emission, and indexing.
bash scripts/script.sh events
template
Generate a starter contract template.
bash scripts/script.sh template erc20
bash scripts/script.sh template ownable
help
Show all commands.
bash scripts/script.sh help
Output
- Syntax examples with explanations
- Contract boilerplate code
- Storage and event patterns
Feedback
https://bytesagain.com/feedback/ Powered by BytesAgain | bytesagain.com