The repository is a pnpm workspace (apps/*, packages/*) plus a Foundry project in contracts/. Everything runs locally against an anvil that mimics Arc testnet, with no faucet needed.
Layout
Quick start
Requires node 22, pnpm 9 and Foundry (forge, cast, anvil) on PATH.
What scripts/local-demo.sh does:
- Starts anvil with chain id 5042002 (2 s block time) if nothing answers on
:8545, writing the PID to .anvil.pid and the log to .anvil.log. CHAIN_ID overrides the mimicked id; it must be in the registry so the apps pick it up.
- Uses
contracts/.env’s PRIVATE_KEY if present, else anvil’s first default account (0xf39F…2266, key 0xac09…f2ff80), and sets its native balance to 10,000.
- Deploys mock USDC and EURC with
LocalTokens.s.sol (funding the deployer and anvil’s default accounts with 10 M of each) and passes them to Deploy.s.sol as USDC and EURC, with PYTH=0x0 so no Pyth oracle is deployed.
- Runs
Seed.s.sol: posts approximate rates through the keeper oracle, backs a few vaults and creates sample launches (SEED_RATES, SEED_UNDERWRITE_USDC, SEED_UNDERWRITE_COUNT, SEED_LAUNCHES, SEED_INITIAL_BUY_USDC tune it).
- Copies
contracts/deployments/5042002.json to packages/abis/deployments/5042002.json, where the indexer and the web app read it.
Because the chain id is Arc testnet’s, the registry entry, gas parameters and file names of the real chain apply: point the indexer and the web app at http://127.0.0.1:8545 with PONDER_RPC_URL_5042002 and NEXT_PUBLIC_RPC_URL (or NEXT_PUBLIC_RPC_URL_5042002). Multicall3 is absent on a plain anvil; the web app probes for it and falls back to single reads, or set NEXT_PUBLIC_MULTICALL3=none. The indexer’s START_BLOCK can stay at 0 locally.
anvil’s automine occasionally stops picking up pending transactions on Windows; the demo script forces a block every 0.5 s while it deploys and sends with --slow. If the factory ends up without code, restart anvil and rerun.
Contract tests
The suite (54 tests at the time of writing, across BondingCurve, FxVault, Oracles, Router and Invariants) includes fuzz runs (256 by default, 2000 under FOUNDRY_PROFILE=ci) and invariant suites for curve solvency, token conservation and vault redemptions never exceeding assets. Unit tests use mock ERC-20s because a standard anvil lacks Arc’s precompiles.
Compiler settings live in contracts/foundry.toml: solc 0.8.26, evm_version = "cancun", the legacy pipeline for the protocol and tests, and via-IR compilation profiles (v4core, posm, descriptor) for the Uniswap v4 contracts, which only fit under the size limit that way.
Regenerating ABIs
The off-chain packages consume the ABIs from packages/abis/src/*.json, exported from contracts/out:
@launchpad/abis also exports CHAINS, getChain(id), findChain(id), parseChainId, deploymentPath(id) and the Deployment type, so no other package parses chains.json itself. See ABIs and registry.
Checks per package
Root scripts