Pearn

Run it locally

The whole stack on one machine, and every test suite.

Requirements: Foundry 1.8+, Node 24, pnpm 10.

git clone --recursive https://github.com/pearn-protocol/pearn && cd pearn
pnpm install

The app on a local chain

cd apps/web && pnpm dev:local

This starts anvil, runs DevChain.s.sol (mock stNEAR, a mock oracle, three markets with bets), and serves the app at http://localhost:3000. To click through it by hand, point MetaMask at http://127.0.0.1:8545 (chain 31337) and import an anvil test key.

Tests

CommandWhat
cd contracts && forge testUnit, integration and property (fuzz) tests for the contracts
pnpm rpc:testnet & pnpm rpc:mainnet & then FOUNDRY_PROFILE=fork forge testForks of real bridged stNEAR on Aurora testnet and mainnet
cd apps/web && pnpm testPayoutMath port, formatting, phases, create checks
cd apps/web && pnpm e2eBet → resolve → claim in headless Chrome against anvil
cd apps/indexer && pnpm testPonder against anvil: seed, resolve, claim
pnpm test:scriptsRepo scripts

CI runs all of them on every pull request.

On this page