Function: setAssetStatus(address asset, AssetStatus newStatus)
This function allows setting the status of an asset in the registry.
Inputs
asset
Control: Fully controlled by the caller.
Constraints: Checked that it is not the zero address and that it is enabled.
Impact: The asset to set the status for.
newStatus
Control: Fully controlled by the caller.
Constraints: Checked that it is not the same as the current status.
Impact: The new status to set for the asset.
Branches and code coverage
Intended branches
Set the
enabledAssets
bit flag based on the index of the asset in the registry.Update the status of the asset.
Negative behavior
Caller needs to have
MANAGER_ROLE
.Should not allow setting the status of a nonexistent asset.
Should not allow setting the status to the same status.