Le langage de programmation Cairo
Avant-propos
Introduction
1.
Bien démarrer
1.1.
Installation
1.2.
Hello, World!
2.
Concepts généraux de programmation
2.1.
Variables et mutabilité
2.2.
Types de données
2.3.
Fonctions
2.4.
Commentaires
2.5.
Structures de contrôle
3.
Les collections communes
3.1.
Arrays
3.2.
Dictionaries
3.3.
Custom Data Structures
4.
Comprendre le concept de possession (ownership)
4.1.
Qu'est-ce que la possession ?
4.2.
Références et snapshots
5.
Utiliser des structs pour structurer des données liées
5.1.
Définition et instanciation des structs
5.2.
Un exemple de programme utilisant des structs
5.3.
Method Syntax
6.
Enums and Pattern Matching
6.1.
Enums
6.2.
The Match Control Flow Construct
7.
Gérer des projets Cairo avec des packages, des crates et des modules
7.1.
Packages et crates
7.2.
Defining Modules to Control Scope
7.3.
Paths for Referring to an Item in the Module Tree
7.4.
Bringing Paths into Scope with the 'use' Keyword
7.5.
Separating Modules into Different Files
8.
Generic Types
8.1.
Generic Functions
8.2.
Traits in Cairo
9.
Testing Cairo Programs
9.1.
How To Write Tests
9.2.
Testing Organization
10.
Error Handling
10.1.
Unrecoverable Errors with panic
10.2.
Recoverable Errors with Result
11.
Advanced Features
11.1.
Operator Overloading
11.2.
Macros
11.3.
Working with Hashes
12.
Starknet Smart Contracts
12.1.
Introduction to smart-contracts
12.2.
A simple contract
12.3.
A deeper dive into contracts
12.3.1.
Contract Storage
12.3.2.
Contract Functions
12.3.3.
Contract Events
12.3.4.
Reducing boilerplate
12.3.5.
Optimizing storage costs
12.4.
Components
12.4.1.
Under the hood
12.4.2.
Component dependencies
12.4.3.
Testing components
12.5.
ABIs and Cross-contract Interactions
12.5.1.
ABIs and Interfaces
12.5.2.
Contract Dispatchers, Library Dispachers and system calls
12.6.
Other examples
12.6.1.
Deploying and Interacting with a Voting contract
12.7.
L1 <> L2 Messaging
12.8.
Security Considerations
13.
Appendix
13.1.
A - Keywords
13.2.
B - Operators and Symbols
13.3.
C - Derivable Traits
13.4.
D - Useful Development Tools
13.5.
E - Common Types & Traits and the Cairo Prelude
13.6.
F - Installing Cairo binaries
Light
Rust
Coal
Navy
Ayu
The Cairo Programming Language
English
Español
Français
简体中文
Appendix
The following sections contain reference material you may find useful in your Cairo journey.