GithubHelp home page GithubHelp logo

tontinetrust / stacks-1yr-treasury-rate-oracle Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 44 KB

Bank Deposit Interest Rate oracle for 1 Year USD FDIC Insured Deposits/CDs

Home Page: https://tontine.com

JavaScript 84.48% Nix 14.90% Shell 0.62%
ira tontine

stacks-1yr-treasury-rate-oracle's Introduction

Stacks Oracle

Deployed on: https://tontinetrust-stacks-oracle.azurewebsites.net/

Setup

Make sure to have Node.js installed (or use the version from [[../shell.nix]]), then run npm ci to do a clean install of the dependencies.

In case that does not work, do npm i to install the dependencies.

Important Development Notes

For compatibility with the tool node2nix which is used for deployment keep the lock file version at version 2, do not use version 3.

Make sure to import local files WITH a .js file extension, for whatever reason imports lacking the file extension fail in the build Docker image.

Usage

To run the app, do: ./app.js which will run a server on localhost:3000 Data is stored on the following smart contract: https://explorer.hiro.so/txid/SP33GR3CR64A89322ZKDN8G0HR4NER2G4PENJP6KS.daily-yield-rate?chain=mainnet The API has 2 endpoints: '/' which returns the rate from the smart contract '/fetch-rate' which scrapes the rate from the source site and returns the rate

See consts.js for the configurable parameters.

Docker image

Use ./gen-nix.sh && ./test-build.sh to check that building the Docker image works.

See the comment in docker.nix for how to jump into a shell inside a Stacks Oracle Docker container. This can be useful if a deployed image is failing, so you can download the image and investigate. "# stacks-1yr-treasury-rate-oracle"

stacks-1yr-treasury-rate-oracle's People

Contributors

stefan-tasikj avatar

Watchers

 avatar

stacks-1yr-treasury-rate-oracle's Issues

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.