Giter Site home page Giter Site logo

iiaku / harbinger-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tacoinfra/harbinger-cli

0.0 0.0 0.0 376 KB

The Harbinger Price Oracle CLI enables you to both deploy and update the reference storage and normalizer contracts on a Tezos network

Home Page: https://github.com/tacoinfra/harbinger

License: MIT License

JavaScript 100.00%

harbinger-cli's Introduction

Harbinger CLI

About

harbinger-cli is the source for a command line utility called harbinger. The CLI is a node binary package written in typescript that contains functionality for working with the Harbinger Oracle. To get started with Harbinger, visit the main documentation.

This library provides functionality for interacting with the Harbinger oracle system. Users who want to post prices might also be interested in Harbinger Poster which is a hosted component providing similar functionality for posting data to Harbinger. Entities who wish to sign prices for Harbinger may want to look at Harbinger Signer. Developers of new Harbinger components may be interested in harbinger-lib.

Install the CLI

To install the pre-packaged CLI from NPM, run the following:

$ npm i -g @tacoinfra/harbinger-cli
$ harbinger --help

To build the library from source, run:

$ npm i
$ npm run build

Functionality

Note: Harbinger installs a symlink named hbg which executes the same harbinger binary as a shortcut, in case you don't want to type the full name.

harbinger has the following functions:

  • Deploying an oracle or normalizer contract
  • Update a contract from a price feed
  • Push data from an oracle to a normalizer contract
  • Pretty-print the value in an oracle contract
  • Revoke an oracle contract, triggering an emergency shutdown

Getting Started

harbinger has fully interactive and complete documentation. Simply pass --help to harbinger or any subcommand. For instance:

$ harbinger --help
# Prints harbinger documentation.

$ harbinger deploy-oracle
# Prints documentation for the deploy-oracle subcommand.

Common Flows

The following set of commands demonstrates a common flow for deploying and working with a Harbinger oracle.

# Deploy an oracle contract
$ harbinger deploy-oracle
  # Prints KT1 address of oracle contract.

# Deploy a normalizer contract.
$ harbinger deploy-normalizer \
  --oracle-contract-address <address from above>
  # Prints KT1 address of oracle contract.
  
# Push updates to the oracle contract and normalizer contract every 120 seconds.
$ harbinger update \
  --oracle-contract-address <KT1 address of oracle> \
  --normalizer-contract-address <KT1 address of normalizer> \
  --update-interval 120

Credits

Harbinger is written and maintained by Luke Youngblood and Keefer Taylor.

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.