An open API service indexing awesome lists of open source software.

https://github.com/doge-is-dope/erc4337-sample

Simple implementation of ERC4337
https://github.com/doge-is-dope/erc4337-sample

account-abstraction erc-4337 erc4337 ethereum

Last synced: 6 months ago
JSON representation

Simple implementation of ERC4337

Awesome Lists containing this project

README

          

# ERC-4337 Sample

The project implements ERC-4337, Account Abstraction, allowing users to transfer and manage funds as a wallet, while also enabling the payment of transaction fees using ERC-20 tokens.

## Features

- Transfer ether and tokens conforming to ERC-20, ERC-721, and ERC-1155 standards as normal wallet
- Perform multiple transactions in one single on-chain transaction, aka batch transaction
- Pay the transaction fee using ERC-20 tokens, `TestToken`, instead of ether
- Custom modules, e.g. `SpendLimit` for preventing spending more tokens than the limit set by the account's owner

## How to build

The project is built with [foundry](https://github.com/foundry-rs/foundry). Install it if you haven't.

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

Run the following command to clone the repo and build

```bash
git clone git@github.com:Doge-is-Dope/ERC4337-sample.git
cd ERC4337-sample
forge install
forge build
```

## Testing

To run the tests, simply run the following command.

```bash
forge test
```