-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
KS-128: Implement remove DONs in capability registry #13220
KS-128: Implement remove DONs in capability registry #13220
Conversation
|
||
// DON config count starts at index 1 | ||
if (don.configCount == 0) revert DONDoesNotExist(donId); | ||
delete s_dons[donId]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can get away with not cleaning up the nested mappings. Resetting configCount
to 0
will return empty values in the getter functions. Test.
@@ -559,6 +567,20 @@ contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { | |||
emit DONAdded(id, isPublic); | |||
} | |||
|
|||
/// @notice Removes DONs from the Capability Registry | |||
/// @param donIds The IDs of the DON to be removed | |||
function removeDONs(uint32[] calldata donIds) external onlyOwner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably update addDON
to addDONs
later in a followup PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make that function extremely complex.
Quality Gate passedIssues Measures |
2e698a0
into
use-encode-instead-of-encode-packed-capability-id
No description provided.