You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of codesize limitations, the guard in Safe v1.5.0 was both the module and transaction guard for the account. Now that some contract code space has been freed up, we can have separate configurations for transaction guards and module guards.
This has the added benefit that guards are backwards compatible instead of requiring an update for Safe v1.5.0 to implement the additional module guard interface.
Proposed solution
Split module guards into a separate configuration from the transaction guard.
Fixes#755
Summary of changes:
- The PR creates a separate interface for Module guards instead of
having a single `Guard` interface for both module transactions and Safe
transactions.
- The new Module guard interface i.e,
[IModuleGuard](https://github.com/safe-global/safe-smart-account/pull/758/files#diff-82762908b9416ddadffb149ee4d25f328078fc27f938d454d8a207aad1ec3839R10)
has two functions:
1. `checkModuleTransaction`
2. `checkAfterExecution`
- The [updated
addresses](https://github.com/safe-global/safe-smart-account/pull/758/files#diff-f567630e82b097ce6631513f19df3108366fc8b80a8de13632297dbd68a6f181R18)
in migration contracts are taken from logs from the tests.
- Rename interface `Guard` to `ITransactionGuard`.
- Fix typo: Rename `ModuleTransasctionDetails` to
`ModuleTransactionDetails`
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:
- [x] Documentation
- [x] Fix test cases
- [x] Rebase branch
- [x] Migration contracts
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
---------
Co-authored-by: Shebin John <admin@remedcu.com>
Co-authored-by: Mikhail <16622558+mmv08@users.noreply.github.com>
Co-authored-by: Nicholas Rodrigues Lordello <n@lordello.net>
Context / issue
Because of codesize limitations, the
guard
in Safe v1.5.0 was both the module and transaction guard for the account. Now that some contract code space has been freed up, we can have separate configurations for transaction guards and module guards.This has the added benefit that guards are backwards compatible instead of requiring an update for Safe v1.5.0 to implement the additional module guard interface.
Proposed solution
Split module guards into a separate configuration from the transaction guard.
Alternatives
Keep things as is.
Additional context
This was already implemented in https://github.com/safe-global/safe-smart-account/tree/feature/module-tx-guard.
The text was updated successfully, but these errors were encountered: