Tests

yarn foundry:test          # unit, fuzz, edge, invariant and differential suites (mocked Hedera system contracts), 4-8 min
yarn foundry:test:fork     # the guard against the real testnet pools and feeds
yarn next:test             # frontend units: amounts, prices, budgets, order trail
yarn next:test:e2e         # Playwright at 1440 and 390, every UI state
SuiteTests
Unit (OrderVault.t.sol, .edges, .plugins, .audit, OrderVaultLens.t.sol, PriceMath.t.sol, handler checks)125
Fuzz (vault, lens previews, order types and price maths, 256 runs each)18
Invariant (escrow, solvency, credits, bookkeeping, NFTs, liveness; 256 runs × 500 calls)6
Differential (v1.0.1 vault vs this one, same random actions, each vault in its own transaction; 256 runs × 100 calls)1
Gas report (GasMeasure.t.sol, v1.0.1 vs this vault per sweep scenario)9
Fork (live testnet; mainnet guard with MAINNET_FORK=true)4
Frontend unit / e2e34 / 59 (30 specs at two widths; the burger-menu spec only runs at 390), plus one live-testnet spec

Coverage of the contracts: 99.6% of lines, 96.4% of branches, 100% of functions (OrderVault.sol 99.5% / 98.9%; the lens, SweepMath, PriceMath, MarketGuard and all three order types at 100%). The few lines and branches the report marks uncovered are forge coverage --ir-minimum instrumentation artifacts — identical return/break statements the IR pipeline merges into one target, and branches inside delegatecalled libraries — each on a path that has its own test, so the code is behaviourally 100% covered. The differential campaign is left out of coverage runs because instrumented code spends different gas and it bounds gas.

The e2e suite runs a production build against a mocked relay, mirror node and injected wallet, so it is deterministic and never signs anything.

From README.md at v1.1 (cee2d4e) · View source