This repository contains the price feeds currently mantained by the Witnet Foundation within all the EVM-compatible networks supported by the Witnet oracle.
npm install
npm run flatten
npm run avail:networks
npm run avail:feeds
- See contents of
migrations/addresses.json
- Add new
.js
file intoqueries/
folder. - Follow examples available in same folder, or this tutorial.
- Compile JS queries into CBOR-encoded bytecodes:
npm run compile:queries
A new entry will be added tomigrations/witnet-queries.json
file, named after the new.js
- Run this command:
npm run try-query:js <path_to_js_file>
- Specify fields
base
,quote
anddecimals
within the corresponding entry inmigrations/witnet.request.json
, if not yet done so. - Add empty string into the appropiate network section within
migrations/addresses.json
file, named after the Witnet price update request you want to deploy. E.g.:{ ... "boba": { ... "boba.mainnet": { ... "OmgBtcPriceFeed": """ }, } }
- `npm run migrate <network.name>´
- Type "y" + [ENTER] when asked for permission to update the
WitnetPriceRouter
contract.
- Remove address from the corresponding entry within
migrations/addresses.json
npm run migrate <network.name>
- Type "y" + [ENTER] when asked for permission to update the
WitnetPriceRouter
contract.