https://github.com/terra-money/oracle-feeder
Oracle Feeder Daemon
https://github.com/terra-money/oracle-feeder
Last synced: 5 months ago
JSON representation
Oracle Feeder Daemon
- Host: GitHub
- URL: https://github.com/terra-money/oracle-feeder
- Owner: terra-money
- License: apache-2.0
- Created: 2019-03-19T13:50:07.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-09-29T20:13:02.000Z (about 2 years ago)
- Last Synced: 2024-04-14T22:52:29.679Z (over 1 year ago)
- Language: TypeScript
- Size: 1.6 MB
- Stars: 49
- Watchers: 35
- Forks: 78
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terra Oracle Feeder
This contains the Oracle feeder software that is used for periodically submitting oracle votes for the exchange rate of the different assets offered by the oracle chain. This implementation can be used as-is, but also can serve as a reference for creating your own custom oracle feeder.
## Overview
This solution has 2 components:
1. [`price-server`](price-server/)
- Obtain information from various data sources (exchanges, forex data, etc),
- Model the data,
- Enable a url to query the data,2. [`feeder`](feeder/)
- Reads the exchange rates data from a data source (`price-server`)
- Periodically submits vote and prevote messages following the oracle voting procedure## Prerequisites
- Install [Node.js version 18 or greater](https://nodejs.org/)
## Instructions
1. Clone this repository
```sh
git clone https://github.com/terra-money/oracle-feeder
cd oracle-feeder
```2. Configure and launch `price-server`, following instructions [here](price-server/).
```sh
cd price-server
npm install# Copy sample config file
cp ./config/default-sample.js ./config/default.js# make edits
vim ./config/default.js# price is available at `http://127.0.0.1:8532/latest`
npm run start
```3. Configure and launch `feeder`, following instructions [here](feeder/).
```sh
cd feeder
npm install# configure to use feeder account
npm start add-key# start voting
$ npm start vote -- \
--source http://localhost:8532/latest \
--lcd-url https://lcd-1.anr.dev \
--lcd-url https://lcd-2.anr.dev \
--chain-id andromeda-oralce-1 \
--validators anrvaloper1xx \
--validators anrvaloper1yy \
--password ""
```