Function: updateOptionBarrierOracle(address vaultAddress, uint256 index, string _asset, string newOracleName)
Updates the oracle being used by a specific option barrier.
Inputs
vaultAddress
Control: Fully controlled.
Constraints: N/A.
Impact: This vault's metadata is updated.
index
Control: Fully controlled.
Constraints: Must be less than the vault metadata's
optionBarrierCount
.Impact: Used to index into the vault metadata's
optionBarriers
array.
_asset
Control: Fully controlled.
Constraints: Must match the asset of the option barrier being updated.
Impact: N/A.
newOracleName
Control: Fully controlled.
Constraints: Must exist in the
CegaState
contract'soracleAddresses
mapping.Impact: Used to update the option barrier.
Branches and code coverage (including function calls)
Intended branches
Should correctly update the oracle of the indexed option barrier.
Negative behaviour
Should revert if called by a non--operator-admin role.
Should revert if the
_asset
argument does not match theasset
of the indexed option barrier.Should revert if the
newOracleName
argument does not exist in the CegaState contract'soracleAddresses
mapping.