ModuleKit is a development kit for building and testing smart account modules. The goal of ModuleKit is to make the module developer's life as simple as possible by removing the need for deep ERC-4337 knowledge or an understanding of every modular smart account implementation out there. ModuleKit also provides a library of tools that supercharges development, allowing developers to unlock the full potential of modules. Within this tool kit, there are four key abstraction layers:

  • Templates and testing frameworks: Get started with simple templates to build a module and use preset frameworks to run unit and integration tests against different ERC-4337 accounts.
  • Standardized interfaces: These ensure that your module is compatible with all the major modular smart account implementations.
  • Third-party integrations: To supercharge building modules, ModuleKit has a library of integrations (such as with DeFi protocols) and pre-built conditions for execution to make building powerful modules seamless.
  • Security automation: These tools parse your module code and flag security vulnerabilities to be resolved before passing it on for a manual audit.
ModuleKit overview

Current module types supported by ModuleKit include:

  • Validators
  • Executors
  • Hooks

Current accounts supported by ModuleKit include:

  • Safe (+ 4337 module)
  • Biconomy
  • Kernel (ZeroDev)


With Foundry

forge install rhinestonewtf/modulekit

Using our template

git clone https://github.com/rhinestonewtf/module-template.git
cd module-template
forge install


To update the ModuleKit, run:

forge update rhinestonewtf/modulekit

Templates and testing frameworks

Rhinestone maintains a library of generalised module templates that can be used as a base layer for more complicated functions. This includes templates for basic validator and executor functions. A set of example modules can also be found in the modulekit-examples repo. For a list of open-source modules and resources visit the awesome-modular-accounts repo. ModuleKit also contains frameworks for running unit and integration tests against various 4337-account implementations. Today, this includes a 4337-enabled Safe, the Biconomy account and the ZeroDev Kernel, with more on the way.

Standardized interfaces

Certain account implementations may interface with modules differently. We abstract this away when building modules by providing standardised interfaces for different module types that work across all supported accounts.

Executors and third-party integrations

Executors open up a new paradigm for account automations. For example, an executor could enable something as simple as a limit order or as powerful as a P2P flashloan with agreement terms and execution restrictions calibrated by the end user.

To make these automations fully extensible without compromising user security, ModuleKit utilises the Rhinestone ConditionManager. The Condition Manager allows users to create conditions for when an executor should be triggered. ModuleKit comes with a set of pre-built conditions, but it’s simple for developers to create conditions from new data sources or third-party integrations.

Third-party integrations

YearnDeposit and withdraws to yearn vaults
ERC-4626 (tokenized vaults)Deposit and withdraw to ERC-4626 compliant vaults
Uniswap V3Swaps via Uniswap V3
ChainlinkEasy access to Chainlink price oracles

View all third party integrations of the ModuleKit here

Security automation

Audits are expensive and security is paramount to the end user. Rhinestone is building a suite of tools to automate security checks to ensure baseline security standards are met and reduce the cost associated with manual audits. Coming soon.