@@ -256,6 +256,8 @@ contract AllocationManager is
256256 ) external onlyWhenNotPaused (PAUSED_OPERATOR_SET_REGISTRATION_AND_DEREGISTRATION) checkCanCall (operator) {
257257 // Check that the operator exists
258258 require (delegation.isOperator (operator), InvalidOperator ());
259+ // Check that the AVS exists and has registered metadata
260+ require (_avsRegisteredMetadata[params.avs], InvalidAVSWithNoMetadataRegistered ());
259261
260262 for (uint256 i = 0 ; i < params.operatorSetIds.length ; i++ ) {
261263 // Check the operator set exists and the operator is not currently registered to it
@@ -282,6 +284,8 @@ contract AllocationManager is
282284 ) external onlyWhenNotPaused (PAUSED_OPERATOR_SET_REGISTRATION_AND_DEREGISTRATION) {
283285 // Check that the caller is either authorized on behalf of the operator or AVS
284286 require (_checkCanCall (params.operator) || _checkCanCall (params.avs), InvalidCaller ());
287+ // Check that the AVS exists and has registered metadata
288+ require (_avsRegisteredMetadata[params.avs], InvalidAVSWithNoMetadataRegistered ());
285289
286290 for (uint256 i = 0 ; i < params.operatorSetIds.length ; i++ ) {
287291 // Check the operator set exists and the operator is registered to it
@@ -324,6 +328,10 @@ contract AllocationManager is
324328
325329 /// @inheritdoc IAllocationManager
326330 function updateAVSMetadataURI (address avs , string calldata metadataURI ) external checkCanCall (avs) {
331+ if (! _avsRegisteredMetadata[avs]) {
332+ _avsRegisteredMetadata[avs] = true ;
333+ }
334+
327335 emit AVSMetadataURIUpdated (avs, metadataURI);
328336 }
329337
0 commit comments