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

Feature: Separate module guard #604

Closed mmv08 closed 1 year ago

mmv08 commented 1 year ago

I'm looking to collect feedback on the implementation of this PR.

This PR:

The implementation: It adds a separate guard for module transactions in a mostly backwards-compatible way. To fit this into the bytecode, it required a change in function signature for setGuard(address guard) to setGuard(address guard, bool moduleGuard). and the ChangedGuard event. This implementation will also take a larger bytecode, preventing us from adding other features, such as the overloaded checkSignatures function.

Alternative implementations: Unified guard for module and safe transactions. This presents a challenge where the existing guards (around 1000 safes in total have them enabled) will most likely stop working.

mmv08 commented 1 year ago

We decided to go for a unified guard for simplicity reasons: https://github.com/safe-global/safe-contracts/pull/571