TODO: simplify bi directional payment channel
- hello world
- first application (counter app)
- primitives (uint, bytes32, address...)
- variables (local, state, global)
- getters and setters (tx)
- ether and wei
- gas and gas price
- if / else (TODO: ternary)
- for loop
- mapping
- CRUD
- nested
- not iterable
- array
- fixed size / dynamic size
- CRUD
- delete element (compact)
- TODO?: string and bytes
- enum
- structs
- data locations - storage, memory, calldata
-
function
-
view and pure functions
-
error
-
function modifiers
-
events
- constructor
- inheritance
- shadowing state variables
- calling parent contracts
- visibility
- interface
- payable
- send ether from contract
- fallback
- call
- delegate call
- calling other contracts
- creating contract from a contract (pre: calling other contract)
- import
- library
- TODO? assembly
- hash function
- signature verification
- multisig wallet
- erc20
- iterable mapping
- merkle tree
- create2
- payment channels (uni, bidirectional)
- TODO?: casper?
- TODO?: minimal proxy contract?
- reentrancy
- arithmetic overflow / underflow
- unexpected ether (self destruct)
- read private data
- delegatecall (pre: storage layout)
- default visibility (skip)
- entropy illusion
- external contract referencing
- honeypot (pre: external call & reentrancy)
- short address / param attack (skip)
- unchecked call return value (skip)
- front running
- DOS
- block timestamp manipulation
- constructor with care (skip)
- unintializsd storage pointers (skip)
- floating points and precisions (skip)
- tx.origin
- hello ethernaut
- fallback
- fallout (constructor with care)
- coin flip (randomness guessing head / tail based on prev block hash)
- telephone
- token
- delegation (delegatecall to change ownership)
- force
- vault (read private data)
- king
- re-entrancy
- elevation
- privacy (optimized storage)
- gatekeeper one
- gatekeeper two
- naught coin
- preservation (delegatecall to change address and then ownership)
- recovery
- magic number (contract creation)
- alien codex (edit ABI)
- denial (denial of service using assert and using up all gas)
- shop (external contract call)
- push vs pull
- commit reveal
- factory
- search
- build pipeline (.gitignore index.html.js and rebuild it when deploy)
- exercises
- sidenav and or link to next topic
- seo
- submarine send
-
script to generate routes
-
redirect to current page for 0.5 and 0.6
-
typescript
-
override and virtual
-
shadow disallowed
-
fallback and receive
-
0.6 features
# deploy
npm run deploy
# find and compile sol
find src/pages/0.6 -name "*.sol" -exec docker run -v $PWD/src:/src ethereum/solc:0.6.0 {} \;
# compile single file
docker run -v $PWD/src:/src ethereum/solc:0.6.0 /src/pages/0.6/sol/HelloWorld/HelloWorld.sol
# md to react
npm run md-to-react -- path/to/folder/with/md
# md to react all pages
find src -type d -not -path "*/__snapshots__" -exec npm run md-to-react -- {} \;