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.
Syscalls
1.10.
Strings and ByteArrays
1.11.
Storing Custom Types
1.12.
Custom types in entrypoints
1.13.
Documentation
2.
Deploy and interact with contracts
❱
2.1.
How to deploy
2.2.
Contract interfaces and Traits generation
2.3.
Calling other contracts
2.4.
Factory pattern
3.
Testing contracts
4.
Cairo cheatsheet
❱
4.1.
Felt
4.2.
Map
4.3.
Arrays
4.4.
loop
4.5.
while
4.6.
if let
4.7.
while let
4.8.
Enums
4.9.
Match
4.10.
Tuples
4.11.
Struct
4.12.
Type casting
4.13.
Dict
Components
5.
Components How-To
6.
Components Dependencies
7.
Storage Collisions
8.
Ownable
Applications
9.
Upgradeable Contract
10.
Defi Vault
11.
ERC20 Token
12.
NFT Dutch Auction
13.
Constant Product AMM
14.
TimeLock
15.
Staking
16.
Merkle Tree
17.
Simple Storage with Starknet-js
18.
Crowdfunding Campaign
19.
AdvancedFactory: Crowdfunding
20.
Random Number Generator
Advanced concepts
21.
Writing to any storage slot
22.
Struct as mapping key
23.
Hashing
24.
Optimisations
❱
24.1.
Storage Optimisations
25.
Account Abstraction
❱
25.1.
Account Contract
26.
Library Calls
27.
Plugins
28.
Signature Verification
Light
Rust
Coal
Navy
Ayu
Latte
Frappé
Macchiato
Mocha
Starknet by Example
English
Español
简体中文
Optimisations
A collection of optimisation patterns to save gas and steps.