Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ForkWatch

Source for the ForkWatch website.

The site is a static Astro + React post-fork archive for Augur fork safety content, REP holder checks, and migrated-supply data generated from Ethereum mainnet reads.

Stack

  • Astro 6 with selective React islands
  • React 19 for interactive components
  • Tailwind CSS 4 via the Vite plugin and CSS-first styles
  • Biome for linting and formatting
  • TypeScript for app and script code
  • Vitest for unit tests
  • viem for Ethereum reads
  • Bun for package management and scripts
  • GitHub Actions + GitHub Pages for production deployment

Repository Layout

src/
β”œβ”€β”€ components/          # Astro + React UI components
β”œβ”€β”€ content/             # Fork page copy and resources
β”œβ”€β”€ domain/              # Ethereum, migration, and token constants
β”œβ”€β”€ features/            # Migration progress and REP checker feature code
β”œβ”€β”€ layouts/             # Astro layouts
β”œβ”€β”€ lib/                 # Shared utilities
β”œβ”€β”€ pages/               # Astro routes
β”œβ”€β”€ services/            # Ethereum read helpers
└── styles/              # Global Tailwind CSS

scripts/
β”œβ”€β”€ generate-migration-progress.ts
└── validate-migration-progress.ts

public/
β”œβ”€β”€ data/migration-progress.json
└── fonts/                  # Self-hosted display, body, and Korean glyphs

Development

Prerequisites

  • Bun 1.3.x, matching CI
  • Node.js compatible with the installed Astro/TypeScript toolchain

Setup

bun install --frozen-lockfile

Commands

Command Purpose
bun run dev Start Astro dev server at localhost:4321
bun run typecheck Run Astro/TypeScript checks
bun run lint Run Biome checks
bun run test Run Vitest tests
bun run build Build the static site
bun run generate:migration-progress Generate public/data/migration-progress.json
bun run validate:data Validate migration progress JSON
bun run preview Build then preview the site
bun run format Run Biome with writes enabled
bun run check Run typecheck, lint, tests, and data validation

Before declaring work done, run:

bun run check
bun run build

Configuration

Astro builds static output and uses GitHub Pages defaults when:

  • GITHUB_PAGES=true

Production metadata and paths can be overridden with:

  • SITE_URL
  • BASE_PATH
  • PUBLIC_MAIN_SITE_URL

Migration data generation can use:

  • ETH_RPC_URL for server-side RPC reads
  • ETH_RPC_LABEL for a public-safe source label

Never expose private RPC URLs through PUBLIC_* environment variables.

Fork Safety Scope

ForkWatch does not:

  • connect wallets
  • request signatures
  • send transactions
  • ask for private keys, seed phrases, or recovery words
  • check exchanges, custodians, L2s, or bridges
  • prove that every address a user controls has been checked

The REP checker sends the public address entered by the user to public Ethereum RPC providers from the browser.

Migration Data

Migration progress is generated by scripts/generate-migration-progress.ts and committed at public/data/migration-progress.json.

Pull requests validate committed data. Scheduled and main-branch workflow runs regenerate the data before building.

The post-fork generator pins every ERC-20 read to one Ethereum block and reads totalSupply(), decimals(), and symbol() from both outcome tokens:

  • Yes: 0xCf6A0A7826fa124B7705d6f3c675eAD76f1e540D, in child universe 0x281171519Fb41540528398d8ED3EA257f0F32A9f
  • No: 0x2F4005456c2F098358213f01DbE34abDAa2989A4, in child universe 0xbaaD633FAa0E4847A4b66043E3E92102e5800546

Both child universes forked from 0x49244BD018Ca9fd1f06ecC07B9E9De773246e5AA. Schema v2 stores each outcome's token metadata and supply separately. The top-level migrated amount is the sum of Yes and No, and all percentages compare against the original 11 million REP supply. If a scheduled RPC read fails, the generated error record retains the last complete dual-outcome snapshot instead of mixing old and new values.

The UI itself is statically in the completed-fork state. Deployment timingβ€”not client-side clock logicβ€”controls when that version goes live.

Styling

Tailwind is configured through the Vite plugin and the global stylesheet at src/styles/global.css.

Biome is configured in biome.json.

CI/CD

deploy-pages.yml runs on:

  • hourly schedule
  • pushes
  • pull requests
  • manual workflow dispatch

The workflow:

  1. Installs dependencies with Bun.
  2. Generates migration progress outside pull requests.
  3. Validates committed migration data on pull requests.
  4. Runs typecheck, lint, tests, data validation, and build.
  5. Verifies the static output.
  6. Deploys to GitHub Pages from the repository default branch.

Worktrees

Use raw Git worktrees under .worktrees/ when parallel branch checkouts are useful:

git fetch origin
git worktree add -b feature/example .worktrees/feature-example origin/main

Remove when done:

git worktree remove .worktrees/feature-example
git worktree prune

Releases

Packages

Contributors

Languages