Introduction
Getting Started
1.
Basics of a Starknet contract
❱
1.1.
Storage
1.2.
Constructor
1.3.
Variables
1.4.
Visibility and Mutability
1.5.
Counter Example
1.6.
Mappings
1.7.
Errors
1.8.
Events
1.9.
Storing Custom Types
1.10.
Custom types in entrypoints
1.11.
Documentation
2.
Deploy and interact with contracts
❱
2.1.
Contract interfaces and Traits generation
2.2.
Calling other contracts
2.3.
Factory pattern
3.
Testing contracts
4.
Cairo cheatsheet
❱
4.1.
Felt
4.2.
LegacyMap
4.3.
Arrays
4.4.
Loop
4.5.
Match
4.6.
Tuples
4.7.
Struct
4.8.
Type casting
Applications examples
5.
Upgradeable Contract
6.
Defi Vault
7.
ERC20 Token
8.
Constant Product AMM
Advanced concepts
9.
Writing to any storage slot
10.
Storing Arrays
11.
Struct as mapping key
12.
Hash Solidity Compatible
13.
Optimisations
❱
13.1.
Storage Optimisations
14.
List
Light
Rust
Coal
Navy
Ayu
Starknet by Example
English
简体中文
Español
Optimisations
A collection of optimisation patterns to save gas and steps.