An implementation of a UI for the Serum DEX.
To get started first install the required build tools:
npm install -g lerna
npm install -g yarn
With Docker:
Just run docker-compose up
from the root directory to launch the app and docker-compose up -d --build
for the first time build or when something was changed
Without Docker:
npm install -g lerna
yarn
yarn build:serum
yarn start
or
yarn install & yarn run build:serum & yarn start
If you are hosting a public UI using this codebase, you can collect referral fees when your users trade through your site.
To do so, set the REACT_APP_USDT_REFERRAL_FEES_ADDRESS
and REACT_APP_USDC_REFERRAL_FEES_ADDRESS
environment variables to the addresses of your USDT and USDC SPL token accounts.
You may want to put these in local environment files (e.g. .env.development.local
, .env.production.local
). See the documentation on environment variables for more information.
NOTE: remember to re-build your app before deploying for your referral addresses to be reflected.
It is now required to add OHLCV candles built from on chain data using Bonfida's API. Here is how to do it:
-
Get access to the TradingView Charting Library repository. This is a private repository and it will return a 404 if you don't have access to it. To get access to the repository please refer to TradingView's website
-
Once you have access to the Charting Library repository:
- Copy
charting_library
folder from https://github.com/tradingview/charting_library/ to/public
and to/src
folders. - Copy
datafeeds
folder from https://github.com/tradingview/charting_library/ to/public
.
See the Create React App documentation for other commands and options.
See A technical introduction to the Serum DEX to learn more about the Serum DEX.
See serum-js for DEX client-side code. Serum DEX UI uses this library.
See sol-wallet-adapter for an explanation of how the Serum DEX UI interacts with wallet services to sign and send requests to the Serum DEX.
See spl-token-wallet for an implementation of such a wallet, live at sollet.io.
- Actualise yarn.lock and dependencies in package.json
- Actualise serum/yarn.lock and dependencies in serum/package.json