Local Development
Run Hardhat, deploy contracts, backend, and optional Blockscout on your machine.
The Dome monorepo packages a full local stack for developing against @dome/sdk-evm without testnet ETH.
Packages
| Package | Role |
|---|---|
@dome/core-evm | Contracts, circuits, Hardhat deploy |
@dome/sdk-evm | Deposit, balance, withdraw |
@dome/backend | Indexer, relayer, RPC proxy, dev faucet |
@dome/web | Next.js wallet UI (proxies to backend) |
One-command startup
bash scripts/dev/up.sh
bash scripts/dev/up.sh --explorer # also Blockscout on :5100
bash scripts/dev/status.sh
bash scripts/dev/down.shThis starts, in order:
- Hardhat node (
0.0.0.0:8545, chain id31337) - Local deploy →
.dome-local/base-deploy.json(if missing) @dome/backendon:8788
Manual startup
# 1. Chain
cd dome-core-evm && npx hardhat node --hostname 0.0.0.0 --port 8545
# 2. Contracts
bash scripts/base/deploy-local.sh
# 3. Circuits (for browser proving)
node scripts/web/sync-circuit-artifacts.ts
# 4. Backend
cd dome-backend && npm install && npm start
# 5. Web wallet (optional)
cd dome-web && cp .env.example .env.local && npm run dev
# 6. Explorer (optional)
bash scripts/explorer/blockscout-local.sh up -dIntegration test
Deposit → indexer → withdraw on local Hardhat:
cd dome-backend
npm run test:integrationBackend endpoints (local)
| Endpoint | Purpose |
|---|---|
GET /config | Fees and minimum deposit/withdraw |
GET /get_encrypted | Paginated encrypted UTXO scan |
GET /merkle/root | Current Merkle root |
POST /commitment/ | Merkle path lookup |
POST /screen_address | Optional deposit screening |
POST /check_encrypted_output | Confirm indexed outputs |
POST /relayer/withdraw | Submit withdraw transaction |
POST /dev/fund | Local faucet (chain 31337 only) |
See Backend & Indexer for configuration.
Protocol identity
Dome uses its own session sign-in message:
DOME_SIGN_IN_MESSAGE = "Dome shielded account sign in"Changing this message or the local IndexedDB namespace (DomeShieldDB) invalidates prior session keys and cached UTXO indexes. Redeploy pools and clear browser storage after protocol identity changes.
Related
- Local Explorer — Blockscout on
:5100 - Circuit Hosting — sync
transaction2.wasm/.zkeyfor local web proving