Function: addAsset(address asset)
This function adds assets to the asset registry.
Inputs
assetControl: Fully controlled by the caller.
Constraints: Cannot be the zero address.
Impact: The asset to add to the registry.
Branches and code coverage
Intended branches
Add
assetto_assetList.Emit an
AddAssetevent.Set
indexPlusOneto the length of_assetListplus one.Set
statustoAssetStatus.ENABLED.Set the bit in
enabledAssetscorresponding to the index of the asset to 1.
Negative behavior
Should not allow adding the same asset twice.
Should not allow adding the zero address.
Should not allow adding more than
_MAX_ASSETSassets.Caller needs to have
MANAGER_ROLE.