Function: setDirectPrice(address asset, uint256 price, bool setInEdge, bool setInChainlink)
This function sets the direct price for an asset in both underlying oracles.
Inputs
assetControl: Fully controlled by the caller.
Constraints: None.
Impact: An asset to set the direct price of.
priceControl: Fully controlled by the caller.
Constraints: None.
Impact: A price to set the direct price of.
setInEdgeControl: Fully controlled by the caller.
Constraints: None.
Impact: A boolean to set if the price should be set in the Edge oracle.
setInChainlinkControl: Fully controlled by the caller.
Constraints: None.
Impact: A boolean to set if the price should be set in the Chainlink oracle.
Branches and code coverage
Intended branches
Check if the asset is a zero address.
Check if the price is zero.
Validate the price.
Set the price in the Edge oracle.
Set the price in the Chainlink oracle.
Negative behavior
Revert if the caller is not an owner.
Revert if both
setInEdgeandsetInChainlinkare false.Revert if the asset is a zero address.
Revert if the price is zero.