You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function likely would be a view function, so could be used to implement both the required functions of the interface.
Store metadata
We need a way to tell the contract which oracle to ask for each token, this should be a onlyOwnerExec gated function in the contract. It should store things such as the oracleExponent and tokenExponent as well as the address of teh oracle contract. You can find links to oracle contracts here
The text was updated successfully, but these errors were encountered:
We want to create a contract satisfying this interface: https://github.com/marginswap/marginswap-core/blob/main/interfaces/IOracle.sol
In order to do so we need:
Call chainlink
write a function using this chainlink library:
import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
Here's a very rough sketch
This function likely would be a view function, so could be used to implement both the required functions of the interface.
Store metadata
We need a way to tell the contract which oracle to ask for each token, this should be a
onlyOwnerExec
gated function in the contract. It should store things such as theoracleExponent
andtokenExponent
as well as the address of teh oracle contract. You can find links to oracle contracts hereThe text was updated successfully, but these errors were encountered: