Function: removeOptionBarrier(address vaultAddress, uint256 index, string _asset)
Removes an option barrier from a vault metadata's optionBarriers
array and shifts all other elements down.
Inputs
vaultAddress
Control: Fully controlled.
Constraints: N/A.
Impact: This vault's metadata is accessed and updated.
index
Control: Fully controlled.
Constraints: Used to index into the vault metadata's
optionBarriers
array.Impact: N/A.
_asset
Control: Fully controlled.
Constraints: Must match the
asset
of the option barrier being removed.Impact: N/A.
Branches and code coverage (including function calls)
Intended branches
Should remove the indexed option barrier and shift all other option barriers down.
Negative behaviour
Should revert if called by a non--trader-admin role.
Should revert if the
index
argument is out of bounds of the vault metadata'soptionBarriers
array.Should revert if the
_asset
argument does not match theasset
stored in the indexed option barrier.