@rhinestone/modulekit

0.4.0 • Public • Published

ModuleKit

A development kit for building and testing smart account modules

ModuleKit allows you to:

  • Easily build smart account modules with interfaces for:
    • Validators
    • Executors
    • Hooks
  • Unit test your modules using a dedicated helper library
  • Integration test your modules using different modular ERC-4337 accounts and a helper library that abstracts away the complexity

In-depth documentation is available at docs.rhinestone.wtf.

The ModuleKit is in active development and is subject to breaking changes. If you spot a bug, please take out an issue and we will fix it as soon as we can.

Using the ModuleKit

Installation

Using our template

Use the module-template to create a new repo and install the dependencies:

pnpm install

Using git submodules

forge install rhinestonewtf/modulekit
cd lib/modulekit
pnpm install

Using a package manager

pnpm install @rhinestone/modulekit --node-linker=hoisted
cp node_modules/@rhinestone/modulekit/remappings.txt remappings.txt

Updating

To update the ModuleKit, run:

forge update rhinestonewtf/modulekit

or

pnpm update @rhinestone/modulekit

Usage

To learn more about using ModuleKit, visit the modulekit section of the docs. To get a better understanding of Modules generally, visit the modules section and for hands-on tutorials on the entire lifecycle of modules, visit the tutorials section.

Features

  • [x] ERC-4337 integration tests
    • [x] On-chain integration test (EntryPoint -> Account)
    • [x] Off-chain integration test (Bundler simulation and spec validation)
  • [ ] Unit testing library
  • [x] Different Module types
    • [x] Validators
    • [x] Executors
    • [x] Hooks
    • [x] Fallbacks
  • [x] Different Modular Accounts
    • [x] ERC-7579
    • [x] Safe
    • [ ] Biconomy
    • [ ] Kernel
  • [x] Deployment helper using Module Registry
  • [x] Gas calculation helper

Examples

For module examples, check out our core modules or our experimental modules and for module inspiration see our module idea list. For general examples, check out the awesome modular accounts repo.

Using this repo

To install dependencies, run:

pnpm install

To build the project, run:

pnpm build

To run tests, run:

pnpm test

Contributing

For feature or change requests, feel free to open a PR, start a discussion or get in touch with us.

Dependencies (13)

Dev Dependencies (2)

Package Sidebar

Install

npm i @rhinestone/modulekit

Weekly Downloads

5

Version

0.4.0

License

GPL-3.0

Unpacked Size

448 kB

Total Files

205

Last publish

Collaborators

  • kopy-kat