Skip to content

Commit

Permalink
chore: v0.4.3 [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kopy-kat committed May 30, 2024
1 parent dc5627b commit 701509f
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 30 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.

The format is based on [Common Changelog](https://common-changelog.org/).

[0.4.3]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.4.3
[0.4.2]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.4.2
[0.4.1]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.4.1
[0.4.0]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.4.0
Expand All @@ -18,6 +19,18 @@ The format is based on [Common Changelog](https://common-changelog.org/).
[0.2.0]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.2.0
[0.1.0]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.1.0

## [0.4.3] - 30-05-2024

### Changed

- Refactored multi-account handling
- Clean up compiler warnings and linting issues

### Added

- Kernel v3 support
- Factory base for accounts to use the Module Registry

## [0.4.2] - 24-05-2024

### Fixed
Expand Down
81 changes: 52 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,48 +42,71 @@ pnpm install @rhinestone/modulekit --shamefully-hoist
cp node_modules/@rhinestone/modulekit/remappings.txt remappings.txt
```

### Updating
### Usage

The ModuleKit can be used to **build**, **test** and **deploy** smart account modules. The full documentation is available at [docs.rhinestone.wtf](https://docs.rhinestone.wtf/modulekit/), but the following aims to provide a quick overview.

### Building modules

Import Module bases from `modulekit/Modules.sol`. The core bases include:

- `ERC7579ValidatorBase`: A base for building validators
- `ERC7579ExecutorBase`: A base for building executors
- `ERC7579HookBase`: A base for building hooks
- `ERC7579HookDestruct`: A base for building hooks with destructured calldata (e.g. `onExecute` or `onInstallModule`)
- `ERC7579FallbackBase`: A base for building fallbacks

We also provide more advanced bases like:

To update the ModuleKit, run:
- `SchedulingBase`: A base for building schedule-based executors
- `ERC7484RegistryAdapter`: A base for querying the Module Registry

### Testing modules

The ModuleKit provides an integration test suite for testing your modules across different modular accounts. To use the test suite, inherit from `RhinestoneModuleKit` and create an account instance using `makeAccountInstance(accountName)`. To learn more about using this instance, visit the documentation for our [integration test suite](https://docs.rhinestone.wtf/modulekit/test/integration).

You can then run the tests using the following commands:

```bash
forge update rhinestonewtf/modulekit
forge test
```

or
Using a different account type (one of `SAFE` and `KERNEL`):

```bash
pnpm update @rhinestone/modulekit
ACCOUNT_TYPE=SAFE forge test
```

### Usage
To validate the ERC-4337 rules:

```bash
SIMULATE=true forge test
```

To calculate gas consumption of modules using `instance.log4337Gas("identifier")`:

```bash
GAS=true forge test
```

### Deploying modules

To deploy modules using the [Module Registry](), you can use the `RegistryDeployer` in a foundry script. You can then deploy your module using the following command:

```solidity
address module = deployModule({
code: bytecode,
deployParams: deployParams,
salt: bytes32(0),
data: additionalData
});
```

To learn more about using ModuleKit, visit the [modulekit section](https://docs.rhinestone.wtf/modulekit) of the docs. To get a better understanding of Modules generally, visit the [modules section](https://docs.rhinestone.wtf/overview/modules) and for hands-on tutorials on the entire lifecycle of modules, visit the [tutorials section](https://docs.rhinestone.wtf/modulekit/build-multi-owner-validator).

## 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
## Module Examples

For module examples, check out our [core modules](https://github.com/rhinestonewtf/core-modules/) or our [experimental modules](https://github.com/rhinestonewtf/experimental-modules/) and for module inspiration see our [module idea list](https://rhinestone.notion.site/Module-ideas-for-product-inspo-338100a2c99540f490472b8aa839da11). For general examples, check out the [awesome modular accounts repo](https://github.com/rhinestonewtf/awesome-modular-accounts).

### Using this repo
## Using this repo

To install dependencies, run:

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rhinestone/modulekit",
"version": "0.4.2",
"version": "0.4.3",
"description": "A development kit for building and testing smart account modules.",
"license": "GPL-3.0",
"author": {
Expand Down

0 comments on commit 701509f

Please sign in to comment.