safe-global / safe-smart-account

Safe allows secure management of blockchain assets.
https://safe.global
GNU Lesser General Public License v3.0
1.84k stars 907 forks source link

Create a separate interface for module guard #758

Closed akshay-ap closed 4 months ago

akshay-ap commented 4 months ago

Fixes #755

Summary of changes:

Codesize: Main branch:

Safe 21210 bytes (limit is 24576)
SafeL2 22052 bytes (limit is 24576)

This PR (+571 bytes):

Safe 21781 bytes (limit is 24576)
SafeL2 22623 bytes (limit is 24576)

Changes in PR:

Open for discussion:

  1. Rename Guard to ITransactionGuard? -> Yes
  2. Rename setGuard function to setTransactionGuard? : Impacts Safe interface
  3. Rename ChangedGuard event to ChangedTransactionGuard? Impacts services monitoring this event
coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9223136085

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/base/GuardManager.sol 1 2 50.0%
contracts/examples/guards/DebugTransactionGuard.sol 0 1 0.0%
contracts/examples/guards/ReentrancyTransactionGuard.sol 0 1 0.0%
contracts/base/ModuleManager.sol 9 11 81.82%
<!-- Total: 13 18 72.22% -->
Totals Coverage Status
Change from base Build 8900628538: -1.5%
Covered Lines: 388
Relevant Lines: 400

💛 - Coveralls
akshay-ap commented 4 months ago

Thanks for approval! I will merge it this week after a final self-review as this is an important change in the account contract.