Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wtfacademy/wtf-cairo
学习Starknet Cairo智能合约。 Learn to write smart contracts on Starknet. Based on Cairo 2.2.
https://github.com/wtfacademy/wtf-cairo
blockchain cairo cairo-lang ethereum layer2 learning solidity starknet starkware web3
Last synced: 2 days ago
JSON representation
学习Starknet Cairo智能合约。 Learn to write smart contracts on Starknet. Based on Cairo 2.2.
- Host: GitHub
- URL: https://github.com/wtfacademy/wtf-cairo
- Owner: WTFAcademy
- License: mit
- Created: 2022-11-24T04:15:05.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-03T09:57:15.000Z (3 months ago)
- Last Synced: 2024-08-03T10:55:42.002Z (3 months ago)
- Topics: blockchain, cairo, cairo-lang, ethereum, layer2, learning, solidity, starknet, starkware, web3
- Language: Cairo
- Homepage: https://wtf.academy
- Size: 3.61 MB
- Stars: 131
- Watchers: 5
- Forks: 50
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](./img/wtfcairo_banner.png)
# WTF Cairo
我最近在学`cairo-lang`,巩固一下细节,也写一个`WTF Cairo极简教程`,供小白们使用。教程基于`cairo 2.2.0`版本。推特: [@0xAA_Science](https://twitter.com/0xAA_Science)|[@WTFAcademy_](https://twitter.com/WTFAcademy_)
社群:[Discord](https://discord.gg/5akcruXrsk)|[Wechat](https://docs.google.com/forms/d/e/1FAIpQLSe4KGT8Sh6sJ7hedQRuIYirOoZK_85miz3dw7vA1-YjodgJ-A/viewform?usp=sf_link)|[Website](https://wtf.academy)
---
## 入门
**第1讲:Hello Cairo**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/01_HelloCairo)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/01_HelloCairo/readme.md)】
**第2讲:Primitive Types 基础数据类型**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/02_PrimitiveTypes)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/02_PrimitiveTypes/readme.md)】
**第3讲: Local and Storage Variables 局部和状态变量**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/03_Variables)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/03_Variables/readme.md)】
**第4讲: Varible Mutability 变量可变性**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/04_Mutability)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/04_Mutability/readme.md)】
**第5讲: Function 函数**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/05_Function)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/05_Function/readme.md)】
**第6讲: Tuple 元组**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/06_Tuple)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/06_Tuple/readme.md)】
**第7讲: Array 数组**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/07_Array)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/07_Array/readme.md)】
**第8讲: Struct 结构体**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/08_Struct)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/08_Struct/readme.md)】
**第9讲: Enum 枚举**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/09_Enum)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/09_Enum/readme.md)】
**第10讲: Mapping 映射**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/10_Mapping)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/10_Mapping/readme.md)】
**第11讲: Control Flow 控制流**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/11_ControlFlow)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/11_ControlFlow/readme.md)】
**第12讲: Pattern Matching 模式匹配**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/12_PatternMatching)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/12_PatternMatching/readme.md)】
**第13讲: Option**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/13_Option)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/13_Option/readme.md)】
**第14讲: Type Conversion 类型转换**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/14_TypeConversion)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/14_TypeConversion/readme.md)】
## 进阶
**第15讲: Constructor 构造函数**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/15_Constructor)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/15_Constructor/readme.md)】
**第16讲: Events 事件**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/16_Events)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/16_Events/readme.md)】
**第17讲: Error Handling 异常处理**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/17_Errors)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/17_Errors/readme.md)】
**第18讲: Ownership I Scope 范围**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/18_Scope)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/18_Scope/readme.md)】
**第19讲: Ownership II Move 移动**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/19_Move)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/19_Move/readme.md)】
**第20讲: Ownership III Preserve 保留所有权**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/20_Preserve)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/20_Preserve/readme.md)】
**第21讲: Ownership IV Reference 引用**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/21_Reference)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/21_Reference/readme.md)】
**第22讲: Ownership V Snapshot 快照**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/22_Snapshot)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/22_Snapshot/readme.md)】
**第23讲: Trait & Implementation 特质和实现**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/23_Trait)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/23_Trait/readme.md)】
**第24讲: Generics 泛型**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/24_Generics)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/24_Generics/readme.md)】
**第25讲: Interface/ABI 接口/ABI**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/25_Interface)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/25_Interface/readme.md)】
**第26讲: Dispatcher 合约调度器**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/26_Dispatcher)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/26_Dispatcher/readme.md)】
**第27讲: Library 库调度器**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/27_Library)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/27_Library/readme.md)】
## 应用
**第28讲: ERC20**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/28_ERC20)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/28_ERC20/readme.md)】
**第29讲: 抽象钱包 Account Abstraction**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/29_AA)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/29_AA/readme.md)】
**第30讲: 组件 Component**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/30_Component)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/30_Component/readme.md)】
**第31讲: ERC721**:【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/31_ERC721)】|【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/31_ERC721/readme.md)】
## WTF Cairo Contributors
## Reference
1. [Cairo Docs](https://www.cairo-lang.org/docs/v1.0/)
2. [Starkling Cairo1](https://github.com/shramee/starklings-cairo1)
3. [Starknet Cairo 101](https://github.com/starknet-edu/starknet-cairo-101)
4. [Cairo tutorial by Starknet Africa Edu](https://github.com/Starknet-Africa-Edu/Cairo1.0)
5. [Rust Book](https://doc.rust-lang.org/stable/book/)
6. [Cairo Book](https://book.cairo-lang.org/)