This guide covers the basic concept of transaction guards and their use cases.
Understanding Safe Multisig Access Control
Safe Multisig is a multi-signature wallet supporting access control based on n-out-of-m schemes. A Safe Multisig has m signers, of which n must confirm before transaction execution.
The core Safe Multisig contracts only support n-out-of-m schemes. More fine-grained or custom access control schemes require implementation through either Safe Multisig modules or transaction guards.
When to Use Each
Safe Multisig modules are needed to implement any access control scheme. If desired, the n-out-of-m scheme can be completely bypassed.
Transaction guards were introduced with Safe Multisig contracts version 1.3.0. They're used when restrictions exist on top of the n-out-of-m scheme.
How Transaction Guards Work
Transaction guards can perform checks both before and after a Safe Multisig transaction.
The pre-transaction check can programmatically verify all parameters of the respective transaction before execution.
The post-transaction check occurs at the very end of transaction execution and can perform checks on the final state of the Safe Multisig.
At present, transaction guards must be enabled and disabled via manual direct contract interaction. Enabled transaction guards can be verified in your Safe Multisig settings.