This repo allows you to use a simple script to check oracle data, specifically for the reference oracles but for any oracle address using the RPC set for the network.
All feeds and associated IDs and info will show. To use the feeds in your contracts simply use the interface in your contract or in a handler contract
Interface
* @dev Interface of the OpenOracleFramework contract*/interface IOpenOracleFramework {/** * @dev getHistoricalFeeds function lets the caller receive historical values for a given timestamp * * @param feedIDs the array of feedIds * @param timestamps the array of timestamps */functiongetHistoricalFeeds(uint256[] memory feedIDs,uint256[] memory timestamps) externalviewreturns (uint256[] memory);/** * @dev getFeeds function lets anyone call the oracle to receive data (maybe pay an optional fee) * * @param feedIDs the array of feedIds */functiongetFeeds(uint256[] memory feedIDs) externalviewreturns (uint256[] memory,uint256[] memory,uint256[] memory);/** * @dev getFeed function lets anyone call the oracle to receive data (maybe pay an optional fee) * * @param feedID the array of feedId */functiongetFeed(uint256 feedID) externalviewreturns (uint256,uint256,uint256);/** * @dev getFeedList function returns the metadata of a feed * * @param feedIDs the array of feedId */functiongetFeedList(uint256[] memory feedIDs) externalviewreturns(string[] memory,uint256[] memory,uint256[] memory,uint256[] memory,uint256[] memory);}
Use
SOLIDITY
Take feedID in the fn params or hardcode with the interface to get the feed value.