EVM
This section contains all the neccesary information such as functions and interfaces required for utilizing data feeds in the solidity smart contracts .
DataFeedV1 Interface
For interacting with the data feed contract for retrieving data feeds into your contract , use the below given interface in your solidity contract .
Functions in IDataFeedV1 interface
requestPrices
function for requesting data feeds from the data feed contract .
feesPerAsset
function for querying the fees Per Data Feed for the respective chain .
requestPrice
For requesting the data feeds from the data feed contract
bytes32[] _assets
array of keccak256 hash of the data feeds to be requested
_callback
a callback function for recieving the response data from the data feed contract
_callback
callback function defined in the contract requesting the data feeds , this function recieves the response and processes the response data as specified by the user according to their use case .
uint8[] decimals
number of decimals to be adjusted in the price retrieved
uint256[] prices
price of the requested asset multiplied by the decimals .
Example Usage
Last updated