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

Fix: remove ISafe interface in the function handler handle function signature #99

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

mmv08
Copy link
Member

@mmv08 mmv08 commented Sep 7, 2023

I found a blocker while working on the ERC4337 function handler, I inherited ISafeProtocolFunctionHandler, and I couldn't get my contract to compile because the handle function had to accept ISafe safe as a first argument, but the interface used in the function wasn't any useful for me as it only defined two module execution functions which are irrelevant outside of the protocol context since they're only used for protocol transactions only. I believe this is not needed for two reasons:

  • We should allow developers to use whatever interface they want to use
  • As far as I know, the Protocol is intended to be used with any account that implements the specifications (that must be defined later). Thus, every account might implement a different interface.

The specs PR: 5afe/safe-core-protocol-specs#38

@mmv08 mmv08 requested review from a team, rmeissner, Uxio0 and akshay-ap and removed request for a team September 7, 2023 20:05
@mmv08 mmv08 changed the title Fix: remove ISafe interface in the function handler Fix: remove ISafe interface in the function handler handle function signature Sep 7, 2023
Copy link
Member

@rmeissner rmeissner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to update something in the Protocol Specs?

@mmv08
Copy link
Member Author

mmv08 commented Sep 8, 2023

Do we need to update something in the Protocol Specs?

Yes, I mentioned this in the PR description. I will create a PR later today.

mmv08 added a commit to 5afe/safe-core-protocol-specs that referenced this pull request Sep 11, 2023
This PR addresses the problem discovered in 5afe/safe-core-protocol#99

The motivation behind these changes:
- Developers should decide which interface to use, as they'll be calling the methods on the account
- The protocol is considered to be account-agnostic, as long as the account implements the methods required by the specification (to be defined later), so the API may differ across accounts
mmv08 added a commit to 5afe/safe-core-protocol-specs that referenced this pull request Sep 11, 2023
This PR addresses the problem discovered in 5afe/safe-core-protocol#99

The motivation behind these changes:
- Developers should decide which interface to use, as they'll be calling the methods on the account
- The protocol is considered to be account-agnostic, as long as the account implements the methods required by the specification (to be defined later), so the API may differ across accounts
@mmv08 mmv08 added this pull request to the merge queue Sep 11, 2023
Merged via the queue into main with commit 80daa43 Sep 11, 2023
@mmv08 mmv08 deleted the bug/ISafe-interface-in-handle branch September 11, 2023 15:13
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants