FABRKNT
All courses
Course · Mastering Foundry
INTERMEDIATE240 min490 XP

Mastering Foundry — Solidity testing discipline for engineers who already think in Rust

Port the rethlab Rust discipline (proptest! / debug_assert! / conservation laws / byte-for-byte answer keys) to Solidity contracts. forge test / fuzz / invariant / cast / anvil in order, finishing with a Capstone that ports openhl-liquidation invariants.

Source is the primary text

How this course works

This is a hands-on course, not a feed of articles. The lessons build on each other in order, so what you learn from the source carries over to real code.

Start the course →7 lessons · native player
Difficulty
INTERMEDIATE
Workload
240 minutes
Reward
490 XP
Orientation
  1. 01Mastering Foundry — Solidity testing discipline for engineers who already think in Rust15 min · 50 XP
Test discipline
  1. 01Lesson 1 — forge test — the Solidity equivalent of cargo test25 min · 50 XP
  2. 02Lesson 2 — forge fuzz — Solidity's proptest!35 min · 70 XP
  3. 03Lesson 3 — forge invariant — multi-call invariant testing via the Handler pattern40 min · 80 XP
CLI & state-aware testing
  1. 01Lesson 4 — cast — the EVM's curl + jq30 min · 60 XP
  2. 02Lesson 5 — anvil + cheatcodes — local development with mainnet state35 min · 70 XP
Capstone
  1. 01Lesson 6 — Capstone — port openhl-liquidation's InsuranceFund to Solidity, prove the 4 invariants60 min · 110 XP