{"id":19602815,"url":"https://github.com/wtfacademy/wtf-cairo","last_synced_at":"2025-08-23T06:05:12.543Z","repository":{"id":138973295,"uuid":"569983863","full_name":"WTFAcademy/WTF-Cairo","owner":"WTFAcademy","description":"学习Starknet Cairo智能合约。 Learn to write smart contracts on Starknet. Based on Cairo 2.2.","archived":false,"fork":false,"pushed_at":"2024-10-02T15:20:33.000Z","size":3794,"stargazers_count":141,"open_issues_count":1,"forks_count":51,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-20T06:04:35.062Z","etag":null,"topics":["blockchain","cairo","cairo-lang","ethereum","layer2","learning","solidity","starknet","starkware","web3"],"latest_commit_sha":null,"homepage":"https://wtf.academy","language":"Cairo","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WTFAcademy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-24T04:15:05.000Z","updated_at":"2025-04-09T11:48:28.000Z","dependencies_parsed_at":"2023-12-28T12:27:02.359Z","dependency_job_id":"58c56a8e-f6a1-43d7-a719-b3fc81aa0b56","html_url":"https://github.com/WTFAcademy/WTF-Cairo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WTFAcademy/WTF-Cairo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-Cairo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-Cairo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-Cairo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-Cairo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WTFAcademy","download_url":"https://codeload.github.com/WTFAcademy/WTF-Cairo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTFAcademy%2FWTF-Cairo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745661,"owners_count":24813515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","cairo","cairo-lang","ethereum","layer2","learning","solidity","starknet","starkware","web3"],"created_at":"2024-11-11T09:26:23.797Z","updated_at":"2025-08-23T06:05:12.517Z","avatar_url":"https://github.com/WTFAcademy.png","language":"Cairo","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](./img/wtfcairo_banner.png)\n\n# WTF Cairo\n我最近在学`cairo-lang`，巩固一下细节，也写一个`WTF Cairo极简教程`，供小白们使用。教程基于`cairo 2.2.0`版本。\n\n推特: [@0xAA_Science](https://twitter.com/0xAA_Science)｜[@WTFAcademy_](https://twitter.com/WTFAcademy_)\n\n社群：[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)\n\n\n---\n\n## 入门\n\n**第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)】\n\n**第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)】\n\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n## 进阶\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第23讲: Trait \u0026 Implementation 特质和实现**：【[Code](https://github.com/WTFAcademy/WTF-Cairo/blob/main/23_Trait)】｜【[教程](https://github.com/WTFAcademy/WTF-Cairo/blob/main/23_Trait/readme.md)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n## 应用\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n**第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)】\n\n\n## WTF Cairo Contributors\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch4 align=\"center\"\u003e\n    Contributors are the Basis of WTF Academy\n  \u003c/h4\u003e\n  \u003ca href=\"https://github.com/WTFAcademy/WTF-Cairo/graphs/contributors\"\u003e\n    \u003cimg src=\"https://contrib.rocks/image?repo=WTFAcademy/WTF-Cairo\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\n## Reference\n\n1. [Cairo Docs](https://www.cairo-lang.org/docs/v1.0/)\n2. [Starkling Cairo1](https://github.com/shramee/starklings-cairo1)\n3. [Starknet Cairo 101](https://github.com/starknet-edu/starknet-cairo-101)\n4. [Cairo tutorial by Starknet Africa Edu](https://github.com/Starknet-Africa-Edu/Cairo1.0)\n5. [Rust Book](https://doc.rust-lang.org/stable/book/)\n6. [Cairo Book](https://book.cairo-lang.org/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtfacademy%2Fwtf-cairo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwtfacademy%2Fwtf-cairo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtfacademy%2Fwtf-cairo/lists"}