tezos-oracle
v1.3.0
Published
This is client software for reading / writing from the BTC / USD oracle. The following contracts are hardcoded: - [Oracle contract to read from](https://you.better-call.dev/carthagenet/KT1XjYrm3AX5Ptw2ZKXTPYE5ZDFWprfdihKb/storage) - [Oracle contract to wr
Downloads
3
Readme
Oracle Client
This is client software for reading / writing from the BTC / USD oracle. The following contracts are hardcoded:
Usage
Pre-requisites
Install the dependencies of the project and ts-node
(allows direct execution of typescript).
$ npm i
$ npm i -g ts-node
Retrieve a BTC / USD Price
The following will output a closing price of BTC at a given timestamp. The data is read from KT1XjYrm3AX5Ptw2ZKXTPYE5ZDFWprfdihKb.
$ ts-node src/get-btc-usd-price.ts
Oracle Data:
BTC / USD Price: [object Object]
As of: 2020-03-29T10:53:00Z
Update the BTC / USD Price
The following will output a command to run in tezos-client to update the storage. Data is written to KT1DiFg6TxLgsCFAFmLgc9mBBUdE7TRnQzMG.
$ ts-node src/update-price.ts
<Run given command>
TODO
- Pass contract as a param