Code Monkey home page Code Monkey logo

zap-recipe-generator's Introduction

Zap-recipe-generator

Purpose :

Zap oracle that generates a list of recipes based on inputted ingredients

Zap-oracle-template

Purpose :

To help users fully creating and running an off-chain Oracle with just couple config and 1 function implementation.

ORACLE TEMPLATE SETUP EXPLAINED

Config Setting :

  • Oracle's information :
    • Title, Public key, Mnemonic, Node URL
    • Endpoint : Name, Curve, broker, md (description about endpoint), query list ( query string accepted and response type)

What will be created once setup and run:

  1. Oracle registered if none exists
  2. Endpoint created if Endpoint name in config has not been created
  • Endpoint.json file will be created containing information about query list and endpoint, saved in ipfs and set as Endpoint's params on-chain
  • Endpoint.md file will be created, saved in ipfs and set as Provider's params on-chain
  1. If Endpoint is already initiated, the step 2 will be ignored

Code Layout :

  1. Config.ts : data about your wallet ,ethereum node and your provider's pubkey and title
  2. Oracle.ts : Template for Create/Manage flow
  3. Responder.ts : Stub callback function when receive query event and return result

Usage :

  1. Configure Config.ts
  2. Implement function getResponse in Responder.ts
  3. Run npm start to start create/get Oracle and start listening to queries

Note :

  • Ensure you have enough ETH in your address for responding to queries

zap-recipe-generator's People

Contributors

samfarber avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.