Test vectors

One file of scenarios that the contract and the TypeScript maths must both reproduce.

Orbis contributorsDraftUpdated 2026-10-253 min read

PropertyValue
nametest-vectors
filepackages/shared/test-vectors/streaming.json
scenarios12 (6 hand-written, 6 seeded random)

The scenarios cover linear release, transfers mid-stream, excluded pools, epochs with nobody eligible, exclusion toggles, tiny supplies and long random sequences.

pnpm --filter @orbis/shared vectors:check   # file matches the generator
pnpm --filter @orbis/shared test            # TypeScript replays every scenario
cd contracts && forge test --match-contract VectorsTest   # the contract replays them

If the contract, the TypeScript mirror or the file drifts, one of these fails in CI.