Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

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

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.

3 participants