Skip to content

Comments

feat: add view fn to query operator sets for an avs#1184

Closed
gap-editor wants to merge 2 commits intoLayr-Labs:devfrom
gap-editor:dev
Closed

feat: add view fn to query operator sets for an avs#1184
gap-editor wants to merge 2 commits intoLayr-Labs:devfrom
gap-editor:dev

Conversation

@gap-editor
Copy link

#1161

Motivation:

The mapping _operatorSets in AllocationManagerStorage.sol needs to be accessible to check if an operator is registered for a particular AVS. Currently, there is no direct way to access all operator sets for a given AVS, which makes it difficult to verify operator registration status.

Modifications:

  1. Added new view function getAVSOperatorSets(address avs) to IAllocationManager interface
  2. Implemented the function in AllocationManager contract
  3. Function returns an array of operator set IDs for a given AVS address
  4. Added NatSpec documentation for the new function

Result:

After this change:

  • External contracts and users can query all operator sets for any AVS address
  • Makes it easier to verify operator registration status for a particular AVS
  • Improves contract interoperability and transparency
  • Maintains consistent code style with existing view functions
  • No security implications as this is a read-only function accessing existing public state

@gap-editor
Copy link
Author

Hi, @0xClandestine ! Is here something wrong? Do i need something to improve?

@0xClandestine 0xClandestine reopened this Feb 27, 2025
@0xClandestine 0xClandestine changed the title fix: Accessibility the mapping for _operatorSets feat: add view fn to query operator sets for an avs Feb 27, 2025
@ypatil12
Copy link
Collaborator

This needs additional tests cc @bowenli86 to get this to the finish line along with @gap-editor

@gap-editor
Copy link
Author

@bowenli86 @ypatil12

@gap-editor
Copy link
Author

@ypatil12 hi. how can i be usefull in working on this pr?

@bowenli86 bowenli86 deleted the branch Layr-Labs:dev May 1, 2025 21:30
@bowenli86 bowenli86 closed this May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Enhancement New feature or request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants