Function: setTargetWeights(uint256 bitFlag, uint64[] newTargetWeights)
This function allows setting the target weights for assets.
Inputs
bitFlagControl: Fully controlled by the caller.
Constraints: None. The bit flag must represent at least two assets.
Impact: The bit flag represents the assets.
newTargetWeightsControl: Fully controlled by the caller.
Constraints: The length of the array must match the number of assets.
Impact: The new target weights for the assets.
Branches and code coverage
Intended branches
Update the
targetWeightsmapping with the new weights.Update the
lastUpdatedmapping with the new epoch and timestamp.
Negative behavior
Should only be callable by the manager role.
Should not allow bit flags with less than two assets.
Should not allow a weights array with a length different from the number of assets.
Should not allow a weights array with a sum different from the precision.