ArdanaLabs / Ardana-dApps

BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Price Updater CLI #71

Open epiro-ps opened 2 years ago

epiro-ps commented 2 years ago

To expose price update actions to an end user, we'll need to build a CLI that binds commands to initialize, update, and read oracle data on-chain.

Acceptance Criteria

Price Updater

As an admin, I would like to run the Price Updater where the following is true:

Implementation

The Price Updater is a command-line application that when run will ensure price data is posted on-chain. The code is written in purescript and will depend on the dusd-api and ctl for interacting with the chain. dusd-api should expose functions for initializing, updating, and reading the price datum. Not that this can developed with dummy initialize, update, and read Oracle functions if they have not been implemented yet.

Also note that real price data will be wire up after this effort so dummy data will be used.

When the price-updater is ran, it performs the following operations

When the price-updater read --config="<path to config file>" is ran, call the on-chain Oracle datum getter defined in dusd-api.

Tests

There should be test cases to address the following aspects of the CLI