Yearn vault explorer built with React, TypeScript, Vite, TanStack Router, Apollo, and Wagmi.
- Node 18+ (Bun recommended for scripts)
- Copy
.env.exampleto.envand set values such asVITE_PUBLIC_GRAPHQL_URL.
bun install- Dev server:
bun run dev - Type-check & build:
bun run build - Preview latest build:
bun run preview - Tests:
bun run test(orbun run test:watch) - E2E tests:
bun run test:e2e(runbunx playwright installfirst) - Lint:
bun run lint - Format:
bun run format
- App code lives in
src/:components/(Radix + Tailwind UI)routes/(TanStack Router)contexts/,hooks/,utils/- GraphQL queries in
src/graphql/
- Router file
src/routeTree.gen.tsis generated; do not edit by hand.
Manual overrides and blacklist entries are defined in src/constants/vaultOverrides.ts.
- Each entry is a
VaultOverrideConfigwith:chainId,address- Optional
overrides(partial fields on the vault), e.g.name,symbol,meta.description,tvl.close,apy.monthlyNet,forwardApyNet. - Optional
overrideReason(shown in the banner). - Optional
blacklist+blacklistReason.
- The array
VAULT_OVERRIDE_ENTRIESis reduced into an internal map automatically; just add a new object to the array. - Blacklisted vaults are hidden from lists/search, but direct vault pages still render with warnings and a disabled overlay.
Example entry:
{
chainId: 1,
address: '0x1234...',
overrideReason: 'Upstream metadata incorrect. TVL set manually.',
overrides: {
name: 'My Vault',
tvl: { close: 0 },
apy: { monthlyNet: 0 },
},
blacklist: true,
blacklistReason: 'Disabled until investigation completes.',
}- Vitest runs in jsdom with Testing Library; shared mocks live in
setupTests.ts. - Prefer mocking Apollo/HTTP rather than hitting live services.