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

SafeConfigLockHelpers

Git Source

Inherits: Assertion

Title: SafeConfigLockHelpers

Author: Phylax Systems

Shared constants and snapshot readers for Safe configuration assertions.

Constants

SENTINEL_MODULES

address internal constant SENTINEL_MODULES = address(0x1)

MODULE_PAGE_SIZE

uint256 internal constant MODULE_PAGE_SIZE = 256

MODULE_PAGE_VIEW_GAS

uint64 internal constant MODULE_PAGE_VIEW_GAS = 2_000_000

FALLBACK_HANDLER_STORAGE_SLOT

bytes32 internal constant FALLBACK_HANDLER_STORAGE_SLOT =
    0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5

GUARD_STORAGE_SLOT

bytes32 internal constant GUARD_STORAGE_SLOT = 0x4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c8

MODULE_GUARD_STORAGE_SLOT

bytes32 internal constant MODULE_GUARD_STORAGE_SLOT =
    0xb104e0b93118902c651344349b610029d694cfdec91c589c91ebafbcd0289947

Functions

hashAddressSet

Computes the deterministic hash used by owner and module allow lists.

Sorts a copy before hashing, so Safe linked-list order does not affect the resulting set hash and the caller’s memory array is left unchanged.

function hashAddressSet(address[] memory accounts) public pure returns (bytes32);

_ownersAt

function _ownersAt(address safe, PhEvm.ForkId memory fork) internal view returns (address[] memory owners);

_thresholdAt

function _thresholdAt(address safe, PhEvm.ForkId memory fork) internal view returns (uint256);

_modulesAt

function _modulesAt(address safe, PhEvm.ForkId memory fork) internal view returns (address[] memory modules);

_guardAt

function _guardAt(address safe, PhEvm.ForkId memory fork) internal view returns (address);

_moduleGuardAt

function _moduleGuardAt(address safe, PhEvm.ForkId memory fork) internal view returns (address);

_fallbackHandlerAt

function _fallbackHandlerAt(address safe, PhEvm.ForkId memory fork) internal view returns (address);

_addressSlotAt

function _addressSlotAt(address safe, bytes32 slot, PhEvm.ForkId memory fork) internal view returns (address);

_isApprovedHash

function _isApprovedHash(bytes32 actualHash, bytes32[] storage approvedHashes, bool emptySet)
    internal
    view
    returns (bool);

_sortAddresses

function _sortAddresses(address[] memory accounts) internal pure;

_quickSortAddresses

function _quickSortAddresses(address[] memory accounts, uint256 left, uint256 right) private pure;

_appendAddresses

function _appendAddresses(address[] memory left, address[] memory right)
    private
    pure
    returns (address[] memory combined);

_viewFailureMessage

function _viewFailureMessage() internal pure override returns (string memory);

_registerReshiramSpec

function _registerReshiramSpec() internal;