├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cairo | Useful resources 2 | 3 | A curated list of awesome Cairo resources, libraries, tools and more. 4 | 5 | **Join [Cairo Gang](https://t.me/+XUKxiUisflE0MTRk) – Telegram community of Cairo Devs 🚀** 6 | 7 | ## TL;DR 8 | 9 | This list is created to help learn Cairo & Starknet ecosystem projects. This is not a unique list, you may found some alternative resources here: 10 | 11 | - [Awesome Starknet](https://github.com/gakonst/awesome-starknet) – a curated list of StarkNet projects 12 | - [Cairo Goldmine](https://github.com/beautyisourbusiness/cairo-goldmine) – A comprehensive, annotated list of repositories of the Starknet ecosystem 13 | - [starknet-libs](https://github.com/ZkPad-Labs/starknet-libs) - The ZkPad team will make sure to maintain a curated list of useful libraries to develop on Starknet 14 | 15 | ## Community 16 | 17 | - [Cairo Gang](https://t.me/+XUKxiUisflE0MTRk) – Telegram community of Cairo Devs 🚀 18 | - [Cairo Lang Twitter](https://mobile.twitter.com/cairolang) 19 | - [StarkNet Discord](https://discord.com/invite/starknet)  – The ***StarkNet*** server is where all ***StarkNet*** participants discuss and share 20 | - [Cairo Resource Guide](https://www.cairo-lang.org/resource-guide/) – Official list with documentation, playground, whitepaper and many other resources 21 | - StarkNet Сhina [https://t.me/starknet_zh](https://t.me/starknet_zh) 22 | - StarkNet ecosystem [https://t.me/starknet_ecosystem](https://t.me/starknet_ecosystem) 23 | - StarkNet Discord [https://discord.com/invite/qypnmzkhbc](https://discord.com/invite/qypnmzkhbc) 24 | - StarkNet Paris [https://t.me/+wsO2W_-K7HgzZjBk](https://t.me/+wsO2W_-K7HgzZjBk) 25 | - StarkNet India [https://t.me/starknetindia](https://t.me/starknetindia) 26 | - StarkNet LA group: [https://t.me/+84DqakqR-vowYjY0](https://t.me/+84DqakqR-vowYjY0) 27 | - StarkNet NY: [https://t.me/+bYjV51CM1SIxY2Q0](https://t.me/+bYjV51CM1SIxY2Q0) 28 | - StarkNet Sydney: [https://t.me/+XL7WrK9S1MYxZTk0](https://t.me/+XL7WrK9S1MYxZTk0) 29 | - Cairo Vietnam [https://t.me/+dL-oY6-slrY3NDU1](https://t.me/+dL-oY6-slrY3NDU1) 30 | - StarkNet versions update channel [https://t.me/+EkT8aCg9R-xjZGU0](https://t.me/+EkT8aCg9R-xjZGU0) 31 | - For those going at Token2049 Singapore [https://t.me/starknetToken2049Singapore_2022 /](https://t.me/starknetToken2049Singapore_2022) [https://t.me/+Vzci6ob7QzphZTQ0](https://t.me/+Vzci6ob7QzphZTQ0) 32 | - For those going at DevCon Bogota [https://t.me/starknetDevcon_2022](https://t.me/starknetDevcon_2022) 33 | - EthLisbon – [https://t.me/starknetEthLisbon_2022](https://t.me/starknetEthLisbon_2022) 34 | - zkGraph telegram – [https://t.me/+b9d7ytd9BQ5lZDA1](https://t.me/+b9d7ytd9BQ5lZDA1) 35 | - DeFi and StarkNet – [https://t.me/c/1676230148/7118](https://t.me/c/1676230148/7118) 36 | - [Checkpoint.fyi](http://Checkpoint.fyi) group [https://t.me/+dk7Q7FAVJ1oyMDFl](https://t.me/+dk7Q7FAVJ1oyMDFl) 37 | - Index Queries group: [https://t.me/+NcG5Y4M6_kczMDVh](https://t.me/+NcG5Y4M6_kczMDVh) 38 | - StarkNet Ecosystem [non-tech]: [https://t.me/+e8IlIwMUsI9kY2E0](https://t.me/+e8IlIwMUsI9kY2E0) 39 | - Starknet Core Stars Amsterdam: [https://t.me/+S9iJ-F5g6302N2Y0](https://t.me/+S9iJ-F5g6302N2Y0) 40 | - Math for Cairo [https://t.me/+M40ddcHHRDgzZjBk](https://t.me/+M40ddcHHRDgzZjBk) 41 | - StarkNet Boston meetup [https://t.me/+OIb9fn3Bmpc3Yjg0](https://t.me/+OIb9fn3Bmpc3Yjg0) 42 | - StarkNet Education [for edu projects]: [https://t.me/+g3YrPwFimOdkN2Rh](https://t.me/+g3YrPwFimOdkN2Rh) 43 | 44 | # Resources 45 | 46 | # Learn Cairo 47 | 48 | ### Resources 49 | 50 | - [Intro Presentation from StarkNet Hackathon, 2022](https://docs.google.com/presentation/d/1E1b2uecN4Fr1S94hPQx-s7vb4EoNVk2Qv-jiJ6eUwB4/edit?usp=sharing) – pdf with some useful exercises 51 | - [starknet-erc721](https://github.com/starknet-edu/starknet-erc721) – Learn how to deploy and customize an ERC721 token on StarkNet 52 | - [Awesome Starknet](https://github.com/gakonst/awesome-starknet) – useful resources about Starknet, Cairo 53 | - [StarkNet and Cairo Documentation](https://www.cairo-lang.org/docs/index.html) - Official Documentation. 54 | - [Setting up the environment](https://www.cairo-lang.org/docs/quickstart.html) - How to install Cairo and StarkNet. 55 | - [How Cairo Works](https://www.cairo-lang.org/docs/how_cairo_works/index.html) - Low-level explanation of Cairo's mechanics. 56 | - [Hello StarkNet](https://www.cairo-lang.org/docs/hello_starknet/index.html) - Tutorial for writing and deploying a contract. 57 | - [Hello Cairo](https://www.cairo-lang.org/docs/hello_cairo/index.html) - Tutorials for writing various simple Cairo contracts. 58 | - [Cairo Reference](https://www.cairo-lang.org/docs/reference/index.html) - Explanation of Cairo's syntax 59 | - [Cairo – a Turing-complete STARK-friendly CPU architecture](https://eprint.iacr.org/2021/1063.pdf) - Cairo Whitepaper 60 | - [A verified algebraic representation of Cairo program execution](https://arxiv.org/abs/2109.14534) - Proof Cairo's soundness using the [Lean proof assistant](https://en.wikipedia.org/wiki/Lean_(proof_assistant)) 61 | - [Cairo Playground](https://www.cairo-lang.org/playground/) - In-browser Cairo IDE, examples and puzzles 62 | - [YouTube channel](https://www.youtube.com/channel/UCnDWguR8mE2oDBsjhQkgbvg/playlists) - Official StarkWare YouTube channel. 63 | - [Building a game fully on-chain](https://youtu.be/3_WLjLsYUbM) – Ronan Sandford lecture from EthCC 3 64 | - [Ctrlc03 Cairo Security Guide](https://ctrlc03.github.io) - a comprehensive guide about Cairo Security for beginners and advanced users 65 | - [StarkNet Cairo 写合约](https://www.youtube.com/playlist?list=PLrxZweTBwVCtjAJIzZWrZATuhekC9eIjX) - Video tutorial for writing and deploying a contract using Cairo in Mandarin 66 | 67 | ### **Articles** 68 | 69 | - [Going all in - starknet](https://www.notion.so/going-all-in-starkware-f250983d562c454384384a5408bddf9c) Notion site of helpful resources 70 | - [Perama's Blog](https://perama-v.github.io/cairo/intro/) - Large set of educational StarkNet / Cairo resources 71 | - [Practical StarkNet lessons learned](https://hackmd.io/@RoboTeddy/BJZFu56wF) - Helpful tips for new StarkNet/Cairo programmers 72 | - [Cairo Common Library](https://perama-v.github.io/cairo/cairo-common-library/) - Docs for the Cairo Common Library (stdlib equivalent) 73 | - [Cairo Concepts Overview](https://perama-v.github.io/cairo/description/) - High level overview of concepts encountered in the Cairo ecosystem (Ethereum, Smart Contracts, Decentralization, Scaling, L2, Rollups, ZKPs etc.) 74 | - [Account Abstraction](https://perama-v.github.io/cairo/account-abstraction/) - Explanation of StarkNet's account abstraction 75 | - [Test Accounts](https://perama-v.github.io/cairo/examples/test_accounts/) - Explanation of building test accounts 76 | - [ZK-SNARK 介绍](https://mirror.xyz/0x93158035d2FF0f03ea0686B508162EA3E62c8815/V89AljpttCmNM_vgJDtGZwwGmRWfTga6JmxFfqWhlUk) - ZK-SNARK Introduction 77 | - [ZK-STARK 介绍](https://mirror.xyz/0x93158035d2FF0f03ea0686B508162EA3E62c8815/7o0kE6pylEN_GRUuXYkq8GXgXhZ3FoWQn_RgaOILbbM) - ZK-STARK Introduction 78 | 79 | ### **Examples** 80 | 81 | - [Cairo by Example](https://perama-v.github.io/cairo/by-example/) - An introduction to [Cairo](https://www.cairo-lang.org/) with simple examples. 82 | - [starknet-cairo-101](https://github.com/l-henri/starknet-cairo-101) - Interactive Cairo workshop using [Voyager](https://voyager.online/) with puzzles and tokens as prizes. 83 | - [Skeleton for StarkNet](https://perama-v.github.io/cairo/examples/building_blocks/skeleton/program_starknet.html) 84 | - Quick example of a Minimum verifiable program 85 | - [Skeleton for SHARP](https://perama-v.github.io/cairo/examples/building_blocks/skeleton/program_sharp.html) 86 | - SHARP programs differ from Cairo programs, this shows how to use SHARP for your own custom Cairo deploys (e.g. if you'd use StarkEx) 87 | - [Contracts Wizard for Cairo](https://wizard.openzeppelin.com/cairo) - Interactive smart contract generator based on OpenZeppelin Contracts for Cairo. 88 | 89 | ## **Libraries** 90 | 91 | - [get-starknet](https://github.com/starknet-community-libs/get-starknet) - wallet <-> dApp bridge. 92 | - [starknet.js](https://github.com/seanjameshan/starknet.js) - Javascript library 93 | - [starknet.py](https://github.com/software-mansion/starknet.py) - Python library 94 | - [starknet-rs](https://github.com/xJonathanLEI/starknet-rs) - Rust library 95 | - [starknet-hardhat-plugin](https://github.com/Shard-Labs/starknet-hardhat-plugin) - A plugin for integrating Starknet tools into Hardhat projects 96 | - [cairo-contracts](https://github.com/OpenZeppelin/cairo-contracts) - OpenZeppelin Contracts written in Cairo 97 | - [cairomate](https://github.com/a5f9t4/cairomate) - Structured, dependable legos for Starknet development. 98 | - [cairo-lang-rs](https://github.com/mattsse/cairo-lang-rs) - Rust support for the Cairo programming language 99 | - [warp-to-cairo](https://github.com/kootsZhin/warp-to-cairo) - A command line interface tool converting starknet warp transpiled outputs into readable cairo contracts 100 | - [tree-sitter-cairo](https://github.com/pscott/tree-sitter-cairo) - Tree sitter for CairoLang 101 | - [caigo](https://github.com/dontpanicdao/caigo) - Golang Library. 102 | - [starknet-react](https://github.com/auclantis/starknet-react) - React hooks library. 103 | - [cairo_kernel](https://github.com/ankitchiplunkar/cairo-jupyter) - Jupyter kernel for Cairo 104 | 105 | **Bridging** 106 | 107 | - [Warp](https://github.com/NethermindEth/warp) – Solidity to StarkNet, making it possible to transpile Ethereum smart contracts to StarkNet Cairo Contracts. 108 | - [skyro-compiler](https://github.com/skyro-compiler/skyro) - Skyro compiles programs written in Idris2 to Cairo 109 | - [Starknet Message Bridge](https://github.com/starknet-edu/starknet-messaging-bridge) – This is an automated workshop that will explain how to use the StarkNet L1 <-> L2 messaging bridge to create powerful cross layer applications. 110 | 111 | ### IDE 112 | 113 | **Vim** 114 | 115 | - [cairo.vim](https://github.com/miguelmota/cairo.vim) - (Outdated) vim syntax plugin for Cairo 116 | 117 | **Visual Studio Code** 118 | 119 | - [Cairo VS Code](https://www.cairo-lang.org/docs/quickstart.html#visual-studio-code-setup) - VS Code syntax support for Cairo (requires manual installation) 120 | - [Cairo language support](https://marketplace.visualstudio.com/items?itemName=ericglau.cairo-ls) - Code assistance and compile error highlighting in VS Code. 121 | 122 | **Sublime** 123 | 124 | - [Ethereum](https://packagecontrol.io/packages/Ethereum) – Ethereum Solidity, Vyper, Yul and StarkNet Cairo language syntaxes 125 | 126 | ## Jobs 127 | 128 | - [Cairo engineers at Immutable](https://discord.com/channels/793094838509764618/898210860030386178/898330663281905725). 129 | 130 | ## Gaming 131 | 132 | - [RYO](https://github.com/dopedao/RYO) - A modular game engine architecture for the StarkNet L2 roll-up. 133 | - [realms-contracts](https://github.com/BibliothecaForAdventurers/realms-contracts) - Realms Monorepo for Ethereum Contracts and Starknet contracts. 134 | - [chess-cairo](https://github.com/greenlucid/chess-cairo) - A Cairo contract to play chess in Starknet. 135 | - [Ogame-Cairo](https://github.com/ametel01/Ogame-Cairo) - Ogame implementation written in cairo 136 | - [contract](https://github.com/age-of-eykar/contract) - The StarkNet Eykar smartcontract. A decentralized game of conquest powered by blockchain. An almost infinite territory that can be conquered through alliances and wars. 137 | - [axelrod](https://github.com/lucadonnoh/axelrod) - Iterated prisoner's dilemma tournaments implemented with Cairo 138 | - [tictactoe-on-starknet](https://github.com/guiltygyoza/tictactoe-on-starknet) - RL-driven agent playing tic-tac-toe on starknet against challengers. 139 | - [physics-puzzle-starknet](https://github.com/guiltygyoza/physics-puzzle-starknet) - Physics puzzle on StarkNet 140 | - [GoL2](https://github.com/perama-v/GoL2) - Cellular automata on replicated state machine 141 | - [cryptsandcaverns](https://github.com/threepwave/cryptsandcaverns) - Crypts and Caverns monorepo 142 | - [STARK-Combat](https://github.com/KillariDev/STARK-Combat) - Verifying complex auto battler calculation on Ethereum 143 | - [MatchBox-Hackathon-StarkDeck](https://github.com/AdeptusDigitales/MatchBox-Hackathon-StarkDeck) - A (very) minimalistic PoC controller for game dynamics 144 | - [TINIH](https://github.com/exp-table/TINIH) - A (very) minimalistic PoC controller for game dynamics 145 | - [starknet-indexer](https://github.com/BibliothecaForAdventurers/starknet-indexer) - StarkNet Indexer for the Loot ecosystem 146 | - [zk-stark-sudoku-prover](https://github.com/gsgalloway/zk-stark-sudoku-prover) - Proves knowledge of solutions to Sudoku puzzles without disclosing the solutions 147 | - [starknet-upgradeable-template](https://github.com/micksabox/starknet-upgradeable-template) - Inspired/copied from DOPE wars architecture: Starter initialized with nile CLI with a arbiter-controller-module skeleton 148 | - [QuantumQuests](https://github.com/Meph1587/QuantumQuests) - Forgotten Quests implementation in Cairo 149 | - [starkworld_hackathon](https://github.com/0xbohu/starkworld_hackathon) - StarkWorld is a 3D game built on StarkNet, player can mint a land NFT (ERC721) and build on the land 150 | - [Dragon Quest](https://github.com/0xAsten/dragon-quest) - Dragon Quest is a dungeon game designed for Realms adventurers, player can mint an adventurer then go to slay dragons. 151 | --------------------------------------------------------------------------------