Download the Extension wallet: Google Chrome Store or Firefox Store
git clone https://github.com/alephium/alephium-dex.git
cd alephium-dex
npm install
Build and run the DEX for Testnet:
npm run build && npm run start
Now you can open the http://localhost:3000/alephium-dex
, you will see something like this:
Start a local development network following the instructions here.
npm run compile
npm run deploy
npx ts-node scripts/devnet.ts create-tokens -n 5
It will create 5 test tokens on devnet, you can also create your own token contracts following this guide.
The output contains all created token contract ids, which will be used when creating token pool in UI.
Build and run the UI:
npm run build:devnet && npm run start:devnet
npm run build && npm run start
Now you can open the http://localhost:3000/alephium-dex
, you will see something like this:
And now you can test the DEX by creating token pool, adding liquidity to the token pool, swapping tokens, and removing liquidity from the token pool.
NODE_URL=https://wallet-v20.mainnet.alephium.org PRIVATE_KEYS=YOUR_PRIVATE_KEY npm run deploy:mainnet
Build and run the UI:
npm run build:mainnet && npm run start:mainnet