Solidity smart contracts for the core-v2 protocol.
- Foundry — Solidity development framework
- Bun — package manager
- Just — command runner
- Bulloak — BTT test scaffolding
- Solhint — Solidity linter
- Prettier — formatter for non-Solidity files
- mdformat — Markdown formatter
Install the required tools:
git clone <repo-url> && cd core-v2
bun install
just setupThe setup recipe installs dependencies, creates .env from the example, and installs mdformat.
Run just --list to see all available commands. Key recipes:
just build # or: just b
just build-optimized # production build with via_irjust test # full test suite (just t)
just test-lite # fast — no optimizer, skips fork tests (just tl)
just test-optimized # test against optimized artifacts (just to)
just test-bulloak # check BTT compliance (just tb)just full-check # run ALL checks: mdformat, solhint, forge fmt, prettier (just fc)
just full-write # auto-fix ALL formatting issues (just fw)Individual checks:
just fmt-check / just fmt-write # Forge formatter
just solhint-check / just solhint-write # Solidity linter (just sc / sw)
just prettier-check / just prettier-write # JSON, YAML, SVG (just pc / pw)
just mdformat-check / just mdformat-write # Markdown (just mc / mw)just clean # remove build artifacts (just c)just coverage # generate lcov + HTML report (just cov)Requires lcov installed (brew install lcov).
just gas-report # or: just grjust deploy --rpc-url <rpc> --private-key <key>| Profile | Purpose | Activate |
|---|---|---|
default |
Standard dev — optimizer on, 1k fuzz runs | (default) |
lite |
Fast iteration — no optimizer, 10 fuzz runs | FOUNDRY_PROFILE=lite |
optimized |
Production — via_ir, separate output | FOUNDRY_PROFILE=optimized |
test-optimized |
Test optimized artifacts | FOUNDRY_PROFILE=test-optimized |
This project uses Node.js packages (not git submodules) for dependency management:
- Install:
bun install dependency-name - Add a remapping in remappings.txt
OpenZeppelin Contracts is pre-installed as a reference.
See CONTRIBUTING.md.
This project is licensed under MIT.