Getting Started Guide

LiquidHarmony Oracles Getting Started

1
_ _ _ _ _ _ ____ _
2
| | (_) (_) | | | | | / __ \ | |
3
| | _ __ _ _ _ _ __| | |__| | __ _ _ __ _ __ ___ ___ _ __ _ _ | | | |_ __ __ _ ___| | ___ ___
4
| | | |/ _` | | | | |/ _` | __ |/ _` | '__| '_ ` _ \ / _ \| '_ \| | | | | | | | '__/ _` |/ __| |/ _ \/ __|
5
| |____| | (_| | |_| | | (_| | | | | (_| | | | | | | | | (_) | | | | |_| | | |__| | | | (_| | (__| | __/\__ \
6
|______|_|\__, |\__,_|_|\__,_|_| |_|\__,_|_| |_| |_| |_|\___/|_| |_|\__, | \____/|_| \__,_|\___|_|\___||___/
7
| | __/ |
8
|_| |___/
Copied!
LiquidHarmony includes all oracle related logic from the DAPP Network. This includes things like http fetches, IBC and XIBC fetches, vCPU and more. The full list of options can be explored in the oracles directory of the repo: https://github.com/liquidapps-io/zeus-sdk/tree/master/boxes/groups/oracles​
The DAPP Network offers the ability to fetch information using DAPP Service Providers (DSPs). A developer may choose as many or as few oracles to use in fetching data points from the internet. If a developer wishes to prevent a scenario where all oracles have an incentive to return false information, the developer may run a DSP themselves and set the threshold of acceptance for the information to all parties. Another great place to understand the service is in the unit tests within each sub directory.
The price feed example uses LiquidHarmony web oracles and the LiquidScheduler to periodically update a price on chain only when the new price is more or less than 1% of the last updated price, conserving CPU by only running actions when necessary. See here​

Prerequisites

  • ​Zeus - Zeus installs eos and the eosio.cdt if not already installed
  • ​Kylin Account​
The DAPP Network currently supports the following oracle requests:
  • HTTP(S) Get
  • HTTP(S) Post
  • HTTP(S)+JSON Get
  • HTTP(S)+JSON Post
  • Nodeos History Get
  • IBC Block Fetch - (Mainnet, BOS, Telos, Kylin, Worbli, Jungle, Meetone)
  • Oracle XIBC - read for foreign chain (Ethereum, Tron, Cardano, Ripple, Bitcoin, Litecoin, Bitcoin Cash)
  • Wolfram Alpha
  • Random Number
  • Stockfish - chess engine AI
  • SQL

Unbox Oracle DAPP Service box

This box contains the oracle smart contract libraries, DSP node logic, unit tests, and everything else needed to get started integrating / testing the DAPP Network oracles in your smart contract.
1
mkdir oracle-dapp-service; cd oracle-dapp-service
2
# npm install -g @liquidapps/zeus-cmd
3
zeus box create
4
zeus unbox oracle-dapp-service
5
zeus test -c
Copied!
Last modified 7mo ago