> For the complete documentation index, see [llms.txt](https://docs.liquidapps.io/liquidapps-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.liquidapps.io/liquidapps-documentation/dapp-network-services/dapp-network-services/liquidharmony/getting-started-guide/basic-implementation.md).

# Basic Implementation

### LiquidHarmony Consumer Example Contract used in unit tests

in `zeus_boxes/contracts/eos/oracleconsumer/oracleconsumer.cpp` The consumer contract is a great starting point for playing around with the LiquidHarmony syntax.

```cpp
/* INCLUDE ORACLE LOGIC */
#include "../dappservices/oracle.hpp"

/* ADD DAPP NETWORK RELATED ORACLE ACTIONS */
#define DAPPSERVICES_ACTIONS() \
  XSIGNAL_DAPPSERVICE_ACTION \
  ORACLE_DAPPSERVICE_ACTIONS

#define DAPPSERVICE_ACTIONS_COMMANDS() \
  ORACLE_SVC_COMMANDS() 

#define CONTRACT_NAME() oracleconsumer 

CONTRACT_START()

  /* 
  
    testget - provide a URI using the DAPP Network Oracle syntax and an expected result, 
    if the result does not match the expected field, the transaction fails 
    
    testrnd - fetch oracle request based on URI without expected field assertion
  
  */

 [[eosio::action]] void testget(std::vector<char>  uri, std::vector<char> expectedfield) {
    /* USE EOSIO'S ASSERTION TO CHECK FOR REQUIRED THREHSHOLD OF ORACLES IS MET */
    eosio::check(getURI(uri, [&]( auto& results ) { 
      eosio::check(results.size() > 0, "require multiple results for consensus");
      auto itr = results.begin();
      auto first = itr->result;
      ++itr;
      /* SET CONSENSUS LOGIC FOR RESULTS */
      while(itr != results.end()) {
        eosio::check(itr->result == first, "consensus failed");
        ++itr;
      }
      return first;
    }) == expectedfield, "wrong data");
  }
  
  [[eosio::action]] void testrnd(std::vector<char> uri) {
    getURI(uri, [&]( auto& results ) { 
      return results[0].result;
    });
  }
CONTRACT_END((testget)(testrnd))
```
