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

KS-128: Implement remove DONs in capability registry #13220

Merged

Conversation

cds95
Copy link
Contributor

@cds95 cds95 commented May 16, 2024

No description provided.


// DON config count starts at index 1
if (don.configCount == 0) revert DONDoesNotExist(donId);
delete s_dons[donId];
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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

Copy link
Collaborator

@DeividasK DeividasK May 16, 2024

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.

@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@cds95 cds95 merged commit 2e698a0 into use-encode-instead-of-encode-packed-capability-id May 17, 2024
117 checks passed
@cds95 cds95 deleted the KSI-128/remove-DON branch May 17, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants