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 Pausable to KeyRegistry #368

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

horsefacts
Copy link
Collaborator

@horsefacts horsefacts commented Aug 22, 2023

Motivation

Like our other contracts, the KeyRegistry should be pausable in case of emergency.

Change Summary

Add Pausable to KeyRegistry.

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review


PR-Codex overview

Detailed summary

  • The Pausable contract from OpenZeppelin is imported and added to the KeyRegistry contract.
  • The pause() and unpause() functions are added to the KeyRegistry contract.
  • The _registerFid() function is modified to check if the contract is paused before adding a key.
  • The _remove() and _reset() functions are modified to check if the contract is paused before removing/resetting a key.
  • Tests for adding, removing, and resetting keys are modified to check if the contract is paused before performing the respective operation.
  • Tests for bulk adding and bulk resetting keys are modified to check if the contract is paused before performing the respective operation.
  • A new test is added to check if only the admin can pause the contract.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@horsefacts horsefacts added the feat New feature request label Aug 22, 2023
@horsefacts horsefacts force-pushed the horsefacts/pausable-key-registry branch from 0f520fe to b4a54a4 Compare August 22, 2023 16:04
@horsefacts horsefacts force-pushed the horsefacts/pausable-key-registry branch from b4a54a4 to 741eec3 Compare August 22, 2023 16:19
@github-actions
Copy link

Coverage after merging horsefacts/pausable-key-registry into main will be

98.98%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   Bundler.sol100%100%100%100%
   FnameResolver.sol100%100%100%100%
   IdRegistry.sol100%100%100%100%
   KeyRegistry.sol100%100%100%100%
   StorageRegistry.sol100%100%100%100%
src/lib
   Signatures.sol100%100%100%100%
   TransferHelper.sol0%0%0%0%12, 17, 20, 20, 20
   TrustedCaller.sol100%100%100%100%
src/validators
   SignedKeyRequestValidator.sol100%100%100%100%

@horsefacts horsefacts merged commit ad57b95 into main Aug 22, 2023
2 checks passed
@horsefacts horsefacts deleted the horsefacts/pausable-key-registry branch August 22, 2023 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant