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

Module mediator #12

Merged
merged 89 commits into from
Jul 4, 2023
Merged

Module mediator #12

merged 89 commits into from
Jul 4, 2023

Conversation

akshay-ap
Copy link
Contributor

@akshay-ap akshay-ap commented Jun 21, 2023

Fixes #4 and partially addresses #6

Changes in PR:

  • Add Mediator interface
  • Add a contract implementing mediator interface
    - Users can add Mediator as a module
    - User can enable module through registry with root or non-root access
    - Contract emits events on successful execution or fail execution
    - Contract emits events on adding module for a safe
    - Validate if user asked to enable module with root/non-root acces
  • Test contracts (example module and Test Safe account) for setup
  • Test module mediator

Module mediator tests:

  • Test enable module
  • Test disable module
  • Test mediator setup
  • Test non-root tx execution from enabled module
  • Test root tx execution from enabled module

Additional changes:

  • Increase test coverage for Registry contract
  • Add .solcover.js file to exclude contracts from test coverage

TODOs related to natspec will be handled later in #13.

@akshay-ap akshay-ap self-assigned this Jun 21, 2023
@akshay-ap akshay-ap marked this pull request as draft June 21, 2023 10:54
@akshay-ap akshay-ap added the enhancement New feature or request label Jun 21, 2023
@akshay-ap akshay-ap added this to the v0.1.0 milestone Jun 21, 2023
@akshay-ap akshay-ap mentioned this pull request Jun 23, 2023
9 tasks
@akshay-ap akshay-ap changed the base branch from feature-#3-create-registry to main June 23, 2023 16:13
@akshay-ap akshay-ap force-pushed the feature-4-module-mediator branch 2 times, most recently from ba6d113 to d9af1ab Compare July 3, 2023 08:57
contracts/SafeProtocolMediator.sol Outdated Show resolved Hide resolved
test/SafeProtocolMediator.spec.ts Outdated Show resolved Hide resolved
@mmv08
Copy link
Member

mmv08 commented Jul 4, 2023

There is still pending action left - the to address restriction - but this can be implemented later. Good job sir

@akshay-ap
Copy link
Contributor Author

There is still pending action left - the to address restriction - but this can be implemented later. Good job sir

created another issue here #23

@akshay-ap akshay-ap merged commit 63686c8 into main Jul 4, 2023
@akshay-ap akshay-ap deleted the feature-4-module-mediator branch July 4, 2023 13:21
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.

Implement a mediator for modules only
3 participants