January 2020
Intermediate to advanced
530 pages
11h 11m
English
The setOrderbook method, as the name suggests, pulls and relays the information that is required to display the orderbook to the user. It does so by invoking the viewBuy() and viewSell() methods on our orderbook smart contract, and populating the buys[] and sells[] arrays in the app state:
setOrderbook = () => { let app = this; var lastBuy; var lastSell; var contract = new this.watchweb3.eth.Contract(this.OrderbookABI.abi,this.OrderbookABI.address);
Read now
Unlock full access