Safe and ERC-7579
The Safe7579 Adapter is a smart contract developed by Rhinestone and Safe to make Safe Smart Accounts compliant with ERC-7579. Through this, 14 audited modules (opens in a new tab) developed by Rhinestone will be available for builders building with the Safe7579 Adapter, such as a dead man switch, flash-loan, social recovery, etc.
Additionally, the Rhinestone registry provides per-transaction security checks on modules, so modules with security compromises are automatically disabled for your account.

Safe7579 Adapter
As ERC-7579 is a superset of ERC-4337, the Safe7579 Adapter ensures full compliance with ERC-4337. The Safe7579 Adapter is both a Safe Module and a Fallback Handler.
- Safe Module: It extends the functionality of a Safe account, allowing it to utilize ERC-7579 modules.
- Fallback Handler: It is a fallback handler because certain functions, such as validateUserOp in ERC-7579, are not natively supported by Safe.
Additionally, a launchpad contract facilitates the setup of new Safes with Safe7579 Adapter.
Creation of new Safes compatible with ERC-7579
The launchpad contract works around the 4337 limitations, which allows the deployment of exactly one contract whose address matches the sender of the user operation.
The creation of new Safes occurs in the following three high-level steps.
Creation by Factory
- Bundler informs
EntrypointtohandleUserOps. - Entrypoint calls
SenderCreatorto callSafeProxyFactory. SenderCreatorrequestssafeProxycreation fromSafeProxyFactoryusingcreateProxyWithNonce.SafeProxyFactorycreates a newSafeProxyusingcreate2.SafeProxyis created with a singleton address set toLaunchpad.initHashis stored in theSafeProxystorage.
Validation Phase
Entrypointvalidates user operations inSafeProxyviavalidateUserOp.SafeProxydelegates validation toLaunchpad.Launchpadensures the presence ofinitHashfrom phase one and callsSafe7579.launchpadValidators.ValidatorModulegets installed byLaunchpad.ValidatorModulevalidates user operations and returnspackedValidationData.Launchpadreturns packedValidationData toSafeProxy,SafeProxyreturns toEntrypoint.
Execution Phase
Entrypointtriggerslaunchpad.setupSafe()inSafeProxy.SafeProxydelegates the setup toLaunchpad.LaunchPadupgradesSafeStorage.singletontoSafeSingleton.LaunchPadcallsSafeProxy.setup()to initializeSafeSingleton.- Setup function in
SafeProxy.setup()delegatecalls tolauchpad.initSafe7579. initSafe7579()initializesSafe7579with executors, fallbacks, hooks,IERC7484registry.
The following detailed sequence outlines the creation, validation, and execution phases in the system's operation.