Skip to content

zoroswap/frontend

Repository files navigation

ZoroSwap Frontend

built for Miden Chat on Telegram Chat on Twitter

This repository contains the frontend for ZoroSwap, an Oracle-informed AMM for the Miden blockchain.

You can find the repository for ZoroSwap here: zoroswap/zoroswap.

You can find our testnet deployment here: https://zoroswap.com.

Getting Started

cp .env.example .env
npm i
npm run dev

Local Development

To develop against a local Miden node (default port 57291), set the RPC endpoint to the Vite dev server's origin in your .env:

VITE_RPC_ENDPOINT=http://localhost:5173
VITE_NETWORK_ID=localhost

This keeps gRPC-web requests same-origin, avoiding CORS issues. A dev-server middleware in vite.config.ts automatically proxies these requests to localhost:57291.

Resetting the MidenClientDB

The Miden webclient stores account and note data in the browser. To clear the account and node data in the browser, paste this code snippet into the browser console:

(async () => {
  const dbs = await indexedDB.databases(); // Get all database names
  for (const db of dbs) {
    await indexedDB.deleteDatabase(db.name);
    console.log(`Deleted database: ${db.name}`);
  }
  console.log("All databases deleted.");
})();