Building the exchange app

The exchange app that we're going to build needs to perform the following functions:

  1. Keep a track of the Gold and USD token balance for the user.
  2. Allow the user to view orders on the orderbook contract.
  1. Update the orderbook in real time by listening to any buy/sell/trade events that are triggered by the orderbook smart contract.
  2. Allow the user to submit buy and sell requests.
  3. Match the buy/sell requests against existing orders in the orderbook if matching orders are available.
  4. If no matching orders are available, submit a new buy/sell order to the orderbook.

Alright, now let's start building our app. This section assumes basic-to-intermediate knowledge of React.js from the user. The entire React interface can be downloaded from the GitHub repository as follows:

https://github.com/PacktPublishing/Blockchain-Development-for-Finance-Projects/tree/master/Chapter%209/React

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.66.178