Skip to content

ERC-7579

ERC-7579 outlines the minimally required interfaces and behavior for modular smart accounts and modules to ensure interoperability across implementations.

Compatible Smart Accounts

ERC-7579 compatible smart account implementations

There are various implementations for ERC-6900 accounts including:

Safe Account Support

ERC-7579 based modules are natively not supported on Safe smart accounts. They can be easily supported via adapters.

Safe along with Rhinestone team has developed a 7579 adapter that will make Safe compatible with 7579 based modules. This also makes the Safe Accounts full ERC4337 and ERC7579 compliant. There is also a launchpad that allows the new Safe Account to be created with 7579 enabled. Launchpad is a factory that creates Safe accounts with Safe7579 and initializes them with the required modules.

How to make an existing Safe comaptible with 7579 standard

  • An existing Safe can be 7579 compatible just by adding the 7579 adapter as a Safe Module and Safe Fallback handler.

Getting started:

Before we install and enable any modules for Safe Accounts, they need to be developed and test. They can then be installed on an existing or a new Safe Account.

Steps to Build and Test Your Module

The best way to get started with the module development is with the help of Module Template by Rhinestone.

  1. Clone the Module Template: Start by cloning the module-template repository to use as a base for your development.

  2. Follow the Docs: Refer to the "How to build a module" documentation for detailed steps and best practices.

  3. Develop Your Module: Customize and build your module using the template as a guide.

Essential Links

Testing and Enabling Your Module on Safe

Once the module has been independantly developed. It can be tested and enabled on Safe Accounts. If you are looking to enable the module on the existing Safe, it can be achieved by building a Safe App along with the 7579 adapter.

Here is a module template to get started building module and Safe App that enables and interacts with the module developed.

Using this template,

  • Testing module with Safe 7579 adapter: The module can be tested against Safe Accounts using the hardhat tests.

  • Enable on Safe Accounts: To enable the module on existing Safe accounts, you can create a Safe App using the 7579 adapter.

Usage

Clone the repository:

git clone https://github.com/koshikraj/module-template-7579.git

This will be the directory structure once you clone the template.

Project structure
module-template-7579/
├── web/
├── module/
├── packages/
└── package.json

Update the modules and test

This will be the directory structure of module. This module package is a combination of hardhat and foundry project.

Module structure
module/
├── contracts/
├── test/
├── src/ 
├── hardhat.config.ts
└── foundry.toml 

The module codebase resides in the contracts and hardhat tests resides inside the test.

To get started with building the 7579 module, use this guide by Rhinestone on how to build Validator, Executors or Hooks

Use the test folder to update the tests for your modules and run them against the Safe Account.

Update the Safe App

This will be the directory structure of Safe Web App. All the code logic to enable the Safe 7579 adapter, install the module and interact with the module resides here.

Safe App structure
web/src/
├── logic/
├── pages/
└── utils/

Additional Resources