Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SafeConfigLockAssertion

Git Source

Inherits: SafeConfigLockHelpers

Title: SafeConfigLockAssertion

Author: Phylax Systems

Locks the critical configuration envelope for a Safe multisig.

The assertion checks the Safe after each monitored transaction:

  • threshold and owner count stay above configured minimums;
  • owner and module sets match one of the approved set hashes;
  • transaction guard, module guard, and fallback handler match expected addresses. Address set hashes are computed by sorting addresses ascending and then hashing abi.encode(sortedAddresses). For modules, bytes32(0) in the approved hash list is a sentinel meaning “modules must be disabled”.

Constants

minThreshold

uint256 public immutable minThreshold

minOwners

uint256 public immutable minOwners

expectedGuard

address public immutable expectedGuard

expectedModuleGuard

address public immutable expectedModuleGuard

expectedFallbackHandler

address public immutable expectedFallbackHandler

State Variables

approvedOwnerSetHashes

bytes32[] public approvedOwnerSetHashes

approvedModuleSetHashes

bytes32[] public approvedModuleSetHashes

Functions

constructor

constructor(
    uint256 minThreshold_,
    uint256 minOwners_,
    bytes32[] memory approvedOwnerSetHashes_,
    bytes32[] memory approvedModuleSetHashes_,
    address expectedGuard_,
    address expectedModuleGuard_,
    address expectedFallbackHandler_
) ;

triggers

function triggers() external view override;

assertSafeConfiguration

Checks the Safe config after the triggering transaction has completed.

Fails when a Safe transaction leaves owners, modules, guards, or fallback handling outside the deployment-time policy. A zero module-set hash in the approved list only approves the empty module set.

function assertSafeConfiguration() external view;

approvedOwnerSetHashCount

function approvedOwnerSetHashCount() external view returns (uint256);

approvedModuleSetHashCount

function approvedModuleSetHashCount() external view returns (uint256);