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.
CODEBLOCK0
types
Cairo type system — felt252, integers, structs, enums, arrays.
CODEBLOCK1
storage
Storage variable patterns and access.
CODEBLOCK2
events
Event declaration, emission, and indexing.
CODEBLOCK3
template
Generate a starter contract template.
CODEBLOCK4
help
Show all commands.
CODEBLOCK5
Output
- - Syntax examples with explanations
- Contract boilerplate code
- Storage and event patterns
Feedback
https://bytesagain.com/feedback/
Powered by BytesAgain | bytesagain.com
Cairo — StarkNet 智能合约参考手册
Cairo语言语法、类型、存储模式、事件、合约模板及StarkNet开发测试指南的快速参考。
命令
语法
核心Cairo语法参考——变量、函数、控制流。
bash
bash scripts/script.sh syntax
类型
Cairo类型系统——felt252、整数、结构体、枚举、数组。
bash
bash scripts/script.sh types
存储
存储变量模式与访问。
bash
bash scripts/script.sh storage
事件
事件声明、触发与索引。
bash
bash scripts/script.sh events
模板
生成入门合约模板。
bash
bash scripts/script.sh template erc20
bash scripts/script.sh template ownable
帮助
显示所有命令。
bash
bash scripts/script.sh help
输出
反馈
https://bytesagain.com/feedback/
由BytesAgain提供支持 | bytesagain.com