Solidity by Example
-
- Hello World
- First App
- Primitive Data Types
- Variables
- Constants
- Immutable
- Reading and Writing to a State Variable
- Ether and Wei
- Gas and Gas Price
- If / Else
- For and While Loop
- Mapping
- Array
- Enum
- Structs
- Data Locations - Storage, Memory and Calldata
- Transient Storage
- Function
- View and Pure Functions
- Error
- Function Modifier
- Events
- Constructor
- Inheritance
- Shadowing Inherited State Variables
- Calling Parent Contracts
- Visibility
- Interface
- Payable
- Sending Ether - Transfer, Send, and Call
- Fallback
- Call
- Delegatecall
- Function Selector
- Calling Other Contract
- Creating Contracts from a Contract
- Try / Catch
- Import
- Library
- ABI Encode
- ABI Decode
- Hashing with Keccak256
- Verifying Signature
- Gas Optimizations
- Bitwise Operators
- Unchecked Math
- Assembly Variable
- Assembly Conditional Statements
- Assembly Loop
- Assembly Error
- Assembly Math
- Ether Wallet
- Multi Sig Wallet
- Merkle Tree
- Iterable Mapping
- ERC20
- ERC721
- ERC1155
- Gasless Token Transfer
- Simple Bytecode Contract
- Precompute Contract Address with Create2
- Minimal Proxy Contract
- Upgradeable Proxy
- Deploy Any Contract
- Write to Any Slot
- Uni-directional Payment Channel
- Bi-directional Payment Channel
- English Auction
- Dutch Auction
- Crowd Fund
- Multi Call
- Multi Delegatecall
- Time Lock
- Assembly Binary Exponentiation
- Re-Entrancy
- Arithmetic Overflow and Underflow
- Self Destruct
- Accessing Private Data
- Delegatecall
- Source of Randomness
- Denial of Service
- Phishing with tx.origin
- Hiding Malicious Code with External Contract
- Honeypot
- Front Running
- Block Timestamp Manipulation
- Signature Replay
- Bypass Contract Size Check
- Deploy Different Contracts at Same Address
- Vault Inflation Attack
- WETH Permit
- EVM Storage Layout
- EVM Memory Layout
- Echidna
- Uniswap V2 Swap
- Uniswap V2 Add Remove Liquidity
- Uniswap V2 Optimal One Sided Supply
- Uniswap V2 Flash Swap
- Uniswap V3 Swap
- Uniswap V3 Liquidity
- Uniswap V3 Flash Loan
- Uniswap V3 Flash Swap Arbitrage
- Chainlink Price Oracle
- DAI Proxy
- Staking Rewards
- Discrete Staking Rewards
- Vault
- Constant Sum AMM
- Constant Product AMM
- Stable Swap AMM