Function: setAssetOracles(address asset, address edgeFeed, address chainlinkFeed, uint256 stalenessThreshold, uint256 customDeviationThreshold)
This function sets the oracles for an asset.
Inputs
assetControl: Fully controlled by the caller.
Constraints: None.
Impact: An asset to set the oracles of.
edgeFeedControl: Fully controlled by the caller.
Constraints: None.
Impact: An Edge feed to set the Edge oracle of.
chainlinkFeedControl: Fully controlled by the caller.
Constraints: None.
Impact: A Chainlink feed to set the Chainlink oracle of.
stalenessThresholdControl: Fully controlled by the caller.
Constraints: None.
Impact: A threshold to set the staleness of.
customDeviationThresholdControl: Fully controlled by the caller.
Constraints: None.
Impact: A custom deviation threshold to set the deviation threshold of.
Branches and code coverage
Intended branches
Try to get the price of the asset from the Edge oracle.
Try to get the price of the asset from the Chainlink oracle.
Check if the price is stale.
Calculate the deviation between the Edge and Chainlink prices.
Set the oracles for the asset.
Negative behavior
Revert if the caller is not an owner.
Revert if the asset is not a zero address.
Revert if the Edge feed is not a zero address.
Revert if the Chainlink feed is not a zero address.
Revert if the staleness threshold is zero.
Revert if the custom deviation threshold is greater than the max deviation threshold.