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

Adding ISafe interface for CompatibilityFallbackHandler #722

Merged
merged 24 commits into from
Jan 16, 2024
Merged

Adding ISafe interface for CompatibilityFallbackHandler #722

merged 24 commits into from
Jan 16, 2024

Conversation

remedcu
Copy link
Member

@remedcu remedcu commented Dec 27, 2023

TODO:

  • Creating ISafe interface along with other Safe dependency interfaces.
  • Using ISafe interface for Tests.
  • Extra: Added codesize script for checking the codesize of contracts.

Closes #701

@remedcu remedcu self-assigned this Dec 27, 2023
@coveralls
Copy link

coveralls commented Dec 27, 2023

Pull Request Test Coverage Report for Build 7541457163

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.397%

Totals Coverage Status
Change from base Build 7503709891: 0.0%
Covered Lines: 396
Relevant Lines: 404

💛 - Coveralls

@remedcu remedcu requested a review from akshay-ap December 28, 2023 10:50
contracts/interfaces/IEnum.sol Outdated Show resolved Hide resolved
@@ -3,7 +3,7 @@ pragma solidity >=0.7.0 <0.9.0;

import {TokenCallbackHandler} from "./TokenCallbackHandler.sol";
import {ISignatureValidator} from "../interfaces/ISignatureValidator.sol";
import {Safe} from "../Safe.sol";
import {ISafe} from "../interfaces/ISafe.sol";
Copy link
Member

Choose a reason for hiding this comment

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

Could we import it as Safe? then it would not trigger any additional code changes (same was done for Enum)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think keeping it with an I is significant to notify the user that it is an interface and to follow a usual standard of interfaces. Also, using the same name will lead to HardhatError: HH701: There are multiple artifacts for contract "Safe", please use a fully qualified name. in tests (though it could be avoided by using the entire path to the contract I believe).

For Enum, the decision was taken to avoid the changes within the contract like Enum.Operation operation -> IEnum.Operation operation

@remedcu remedcu requested a review from nlordell January 8, 2024 13:31
@remedcu remedcu requested a review from akshay-ap January 12, 2024 14:27
@remedcu remedcu requested a review from mmv08 January 12, 2024 15:15
@remedcu remedcu requested a review from mmv08 January 15, 2024 16:07
contracts/Safe.sol Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
* @title ISafe - A multisignature wallet interface with support for confirmations using signed messages based on EIP-712.
* @author @safe-global/safe-protocol
*/
interface ISafe is IModuleManager, IOwnerManager, IFallbackManager {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! I was going to say all functions in the interface should be marked as external, but you beat me to it! 🙌

Copy link
Member

@mmv08 mmv08 left a comment

Choose a reason for hiding this comment

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

Looks tremendous. After addressing @nlordell points, it should be good to go

contracts/Safe.sol Show resolved Hide resolved
contracts/base/GuardManager.sol Show resolved Hide resolved
contracts/interfaces/IFallbackManager.sol Show resolved Hide resolved
@remedcu remedcu merged commit b140318 into main Jan 16, 2024
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2024
@nlordell nlordell deleted the ISafe branch April 22, 2024 09:19
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.

Add an ISafe Interface For Interacting with Safes
7 participants