Run the entire loop.
Start a local EVM, deploy Vanta, use the application, and verify a full supply–trade–withdraw cycle.
Prerequisites
Use a Node.js version supported by the installed Next.js release and the project's package manager. The chain runner requires Foundry's Anvil binary. Install dependencies from this project's lockfile and run all commands from the vanta directory.
npm ci
anvil --versionStart the chain and application
In the first terminal, start the local chain runner. It starts or connects to the expected local Anvil network, deploys or reuses the mock tokens and pools, writes the deployment manifest, and keeps the test-market status fresh. Leave it running while using the app.
npm run chainIn a second terminal, start the application. The explicit development port is optional; production start uses the hosting environment's PORT.
npm run dev -- --port 3104| Setting | Local value |
|---|---|
| RPC | http://127.0.0.1:8545 |
| Chain ID | 31337 |
| Gas asset | Local ETH |
| Stock decimals | 18 |
| USDG decimals | 6 |
| Deployment manifest | public/deployment.json |
| Development state | .local/ (ignored) |
Build and verify
npm run contracts:build
npm run contracts:test
npm run protocol:smoke
npm run lint
npm run typecheck
npm run buildThe contract suite checks implementation behavior. The protocol smoke test sends real local transactions through approvals, liquidity supply, both swap directions, and withdrawal. It requires the local chain to be available. Web checks validate code quality, types, and production compilation.
Do not interpret a successful local cycle as proof of profitable replication, production feed safety, or a security audit. Those require separate high-precision differential testing, stress simulation, token integration, and independent review.
Useful files
| Path | Purpose |
|---|---|
| contracts/ | Solidity pool, mathematical kernel, mocks, and contract tests. |
| scripts/ | Compilation, deployment, local runner, and transaction verification. |
| public/deployment.json | Generated current local deployment addresses and parameters. |
| src/lib/ | Contract ABI, client configuration, and chain interaction code. |
| src/components/ | Landing experience and application interfaces. |
| src/content/docs/ | Typed documentation and search content. |
| public/vanta-protocol.md | Full research and phased implementation specification. |
Generated local state and private development material belong in ignored files. The public deployment manifest contains public addresses and configuration, never private keys. Do not commit real environment files or reuse local development credentials.
Troubleshooting
| Symptom | Check |
|---|---|
| Chain unavailable | Verify the chain process is running and the RPC endpoint is reachable. |
| Markets missing | Check that the runner completed deployment and wrote public/deployment.json. |
| Stale status / trading unavailable | Inspect the chain runner and status publisher; it must remain active. |
| Wrong network | Use chain 31337 for this build and approve the wallet network switch. |
| Insufficient gas | Use Get test assets for a conditional local-ETH top-up on the verified local chain, or use the prefunded local account. |
| Quote rejected | Review amount, reserve domain, expiry, and the reference-price guard. |
| Addresses changed after reset | Regenerate the deployment manifest, reload the app, and reconnect. |
| Port already in use | Inspect the existing local process before starting a second chain or application instance. |
Public deployment is a separate release
The local runner does not deploy to Robinhood Chain. A separate explicit testnet workflow deploys Vanta's valueless mocks on chain 46630 and requires a browser wallet, a verified manifest, and a dedicated mock keeper. Mainnet is a separate configured real-asset deployment; local balances and keys are never migrated into it.