Closed yogesh0509 closed 1 year ago
Ah, @yogesh0509 , here is another challenge to keep in mind and address:
Those API3 proxy oracles may provide data with a different number of decimal digits than what we would like to use in Djed. Therefore, I think we need to have 3 additional arguments in the constructor: one for the number of decimal digits from the data that we are reading from API3 and one for the number of decimal digits for the data we will be providing to Djed. Then we will need to convert value
to desired number in our readData
function.
@yogesh0509 , also, it may be the case that we need, for instance, "USD/MATIC" instead of "MATIC/USD". If this is the case, then I suggest creating a separate contract called API3InvertingOracle
that would be identical to API3Oracle
except that it would return 1/value
instead of value
.
This is a work-in-progress pull request!!
I have added a proxy contract that reads values from dAPI that have already been deployed on various chains. A list of all the smart contract addresses that have already been deployed on different chains can be found on API3 market