ModuleKit
Getting Started

Getting started

ModuleKit is built on top of Foundry (opens in a new tab), a toolchain to simplify and speed up smart contract development. If you are not familiar with Foundry, feel free to check out their docs and install it by running:

curl -L https://foundry.paradigm.xyz | bash

Installation

Using our template

Use the module-template (opens in a new tab) to create a new repo and install the dependencies:

pnpm install

Using a package manager

npm i @rhinestone/modulekit

Using git submodules

forge install rhinestonewtf/modulekit

Remappings

If you're using the ModuleKit without the template, then you'll need to add the following remappings to your remappings.txt file:

ds-test/=node_modules/ds-test/src/
forge-std/=node_modules/forge-std/src/
modulekit/=node_modules/@rhinestone/modulekit/packages/modulekit/src/
@rhinestone/sessionkeymanager/=node_modules/@rhinestone/modulekit/packages/SessionKeyManager
@rhinestone/safe7579/=node_modules/@rhinestone/modulekit/accounts/safe7579
@ERC4337/=node_modules/@ERC4337/
account-abstraction/=node_modules/@ERC4337/account-abstraction/contracts/
account-abstraction-v0.6/=node_modules/@ERC4337/account-abstraction-v0.6/contracts/
erc7579/=node_modules/erc7579/src/
sentinellist/=node_modules/sentinellist/src/
solmate/=node_modules/solmate/src/
solady/=node_modules/solady/
solarray/=node_modules/solarray/src/
@openzeppelin/=node_modules/@openzeppelin/
@prb/math/=node_modules/@prb/math/
erc4337-validation/=node_modules/erc4337-validation/src/
@safe-global/=node_modules/@safe-global/