Testing
- Pattern for testing lens against mutative version function
- Heuristic Invariant/Property in finance apps
- Compiling contracts faster with
forge-std::deployCode
orforge-std::deployCodeTo
Gas Optimization
-
Storing callback data on transient storage might be chapter than passing data to callback function
Example: metapool-router #246
-
Replace
JUMPI
with opcode for failure pattern
Imagine if-else branch likeif condition, then revert
, theJUMPI
can be replaced withmload(condition - 0x01)
. The similar optimization can be seen in mega-dropper.
Deployment
- Crunch CREATE2 salt on terminal
- Library to deploy contracts built by Hardhat with Foundry
- Recording git commiet on-chain will make it easier to find version of upgradable contract