WTF Solidity
Recently, I have been relearning Solidity, consolidating the finer details, and writing a "WTF Solidity Tutorial" for newbies. Lectures are updated 1~3 times weekly.
Twitter: @WTFAcademy_ | @0xAA_Science
Community: Discord | Website: wtf.academy
Tutorials and codes are open-sourced on github: github.com/AmazingAng/WTF-Solidity
NOTE: the English Version of WTF Solidity is preliminary and requires further community review.
Intro​
Chapter 1: HelloWeb3 (3 lines of code):Code | Tutorial
Chapter 2: Value Type:Code | Tutorial
Chapter 3: Function (external/internal/public/private, pure/view, payable):Code | Tutorial
Chapter 4: Function Return (returns/return):Code | Tutorial
Chapter 5: Data Location (storage/memory/calldata):Code | Tutorial
Chapter 6: Array and Struct:Code | Tutorial
Chapter 7: Mapping:Code | Tutorial
Chapter 8: Default Value:Code | Tutorial
Chapter 9: Constant (constant/immutable):Code | Tutorial
Chapter 10: Control Flow:Code | Tutorial
Chapter 11: Modifier:Code | Tutorial
Chapter 12: Event:Code | Tutorial
Chapter 13: Inheritance:Code | Tutorial
Chapter 14: Interface:Code | Tutorial
Chapter 15: Errors:Code | Tutorial
Advanced​
Chapter 16: Function Overloading:Code | Tutorial
Chapter 17: Library:Code | Tutorial
Chapter 18: Import:Code | Tutorial
Chapter 19: Receive ETH (fallback/receive):Code | Tutorial
Chapter 20: Send ETH (transfer/send/call):Code | Tutorial
Chapter 21: Call Other Contracts:Code | Tutorial
Chapter 22: Call:Code | Tutorial
Chapter 23: Delegatecall:Code | Tutorial
Chapter 24: Create Contracts in Another Contract:Code | Tutorial
Chapter 25: Create2:Code | Tutorial
Chapter 26: Delete Contract:Code | Tutorial
Chapter 27: ABI Encode/Decode:Code | Tutorial
Chapter 28: Hash:Code | Tutorial
Chapter 29: Function Selector:Code | Tutorial
Chapter 30: Try-Catch:Code | Tutorial
Application​
Chapter 31: ERC20:Code | Tutorial
Chapter 32: Token Faucet:Code | Tutorial
Chapter 32: Airdrop:Code | Tutorial
Chapter 34: ERC721:Code | Tutorial
Chapter 35: Dutch Auction:Code | Tutorial
Chapter 36: Merkle Tree:Code | Tutorial
Chapter 37: Signature:Code | Tutorial
Chapter 38: NFT Swap:Code | Tutorial
Chapter 39: Random Number:Code | Tutorial
Chapter 40: ERC1155:Code | Tutorial
Chapter 41: WETH:Code | Tutorial
Chapter 42: Payment Split:Code | Tutorial
Chapter 43: Linear Vesting:Code | Tutorial
Chapter 44: Token Lock:Code | Tutorial
Chapter 45: Time Lock:Code | Tutorial
Degen​
Chapter 46: Proxy Contract:Code | Tutorial
Chapter 47: Upgradeable Contract:Code | Tutorial
Chapter 48: Transparent Proxy:Code | Tutorial
Chapter 49: UUPS:Code | Tutorial
Chapter 50: Multisig Wallet:Code | Tutorial
Chapter 51: ERC4626 Tokenized Vault:Code | Tutorial
Security​
Chapter S1: Reentrancy Attack:Code | Tutorial
Chapter S2: Selector Clash:Code | Tutorial
Chapter S3: Centralization:Code | Tutorial
Chapter S4: Centralization Risks:Code | Tutorial
Chapter S5: Integer Overflow:Code | Tutorial
Chapter S6: Signature Replay:Code | Tutorial
Chapter S7: Bad Randomness:Code | Tutorial
Chapter S8: Contract Length Check Bypassing:Code | Tutorial
Chapter S9: Denial of Service (DoS):Code | Tutorial
Chapter S10: Honeypot / Pixiu:Code | Tutorial
Chapter S11: Front-running:Code | Tutorial
Chapter S12: tx.origin Phishing Attack:Code | Tutorial
Chapter S13: Unchecked Low-Level Calls:Code | Tutorial
Chapter S14: Block Timestamp Manipulation:Code | Tutorial
Chapter S15: Oracle Manipulation:Code | Tutorial
Chapter S16: NFT Reentrancy Attack:Code | Tutorial