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

Allow adding module with multiple types #106

Merged
merged 15 commits into from
Sep 27, 2023

Conversation

akshay-ap
Copy link
Contributor

@akshay-ap akshay-ap commented Sep 20, 2023

Fixes #103

Changes in PR:

  • Return moduleTypes information from Registry. Each enabled bit in the uint8 indicates a module type.
    Updated function signature:
    function check(address module) external view returns (uint64 listedAt, uint64 flaggedAt, uint8 moduleTypes);
    
  • Update tests
  • Update manager to use moduleType information
  • Define constants for module types
    Each module type is a power of 2.
  • Documentation
  • Add _addModule(address,uint8) as internal function to avoid duplicate logic in TestSafeProtocolRegistryUnrestricted

Needs update in Protocol specs

@akshay-ap akshay-ap added the enhancement New feature or request label Sep 20, 2023
@akshay-ap akshay-ap self-assigned this Sep 20, 2023
@akshay-ap akshay-ap marked this pull request as draft September 20, 2023 11:04
@akshay-ap akshay-ap added this to the v0.3.0 milestone Sep 20, 2023
@github-actions
Copy link

github-actions bot commented Sep 20, 2023

Pull Request Test Coverage Report for Build 6316718378

  • 16 of 16 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 6262748768: 0.0%
Covered Lines: 187
Relevant Lines: 187

💛 - Coveralls

@akshay-ap akshay-ap added the do not merge This PR should not be merge. label Sep 20, 2023
@akshay-ap akshay-ap marked this pull request as ready for review September 20, 2023 13:21
@akshay-ap akshay-ap force-pushed the feature-103-allow-adding-module-with-multiple-types branch from da09d69 to 2447eef Compare September 20, 2023 13:22
@akshay-ap akshay-ap force-pushed the feature-103-allow-adding-module-with-multiple-types branch from 758e938 to 2f4efc7 Compare September 20, 2023 16:15
Base automatically changed from feat/remove-isafe-from-function-parameters to main September 21, 2023 14:01
@akshay-ap akshay-ap force-pushed the feature-103-allow-adding-module-with-multiple-types branch from f04a838 to 2e70453 Compare September 26, 2023 18:16
@akshay-ap akshay-ap removed the do not merge This PR should not be merge. label Sep 27, 2023
@akshay-ap akshay-ap added this pull request to the merge queue Sep 27, 2023
Merged via the queue into main with commit efd863f Sep 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2023
@akshay-ap akshay-ap deleted the feature-103-allow-adding-module-with-multiple-types branch September 27, 2023 12:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A module can only be registered once with a single type
2 participants