This is an example decentralized exchange (DEX) application built with Next.js.
To run this project locally, follow these steps:
You can use either pnpm or npm for package management.
-
Navigate to the
jstz-dexdirectory:cd examples/jstz-dex -
Install the dependencies using your preferred package manager:
# Using pnpm pnpm install # Or using npm npm install
-
Navigate to the
jstz-dex/services/dex-assetsdirectory:cd examples/jstz-dex/services/dex-assets -
Install the dependencies using your preferred package manager:
# Using pnpm pnpm install # Or using npm npm install
-
(optional) Run jstz container if not running already:
jstz sandbox --container start
NOTE: if you don't have jstz CLI installed, please follow the installation instructions
-
Build and deploy the DEX smart function:
# Using pnpm pnpm run build # Or using npm npm run build
Smart function will be automatically deployed to the local Jstz sandbox. Address of the deployed smart function will be printed in the console and automatically replaced in the
.envfile.
To start the development server, run:
pnpm run devThe application will be accessible at http://localhost:3202.