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
- Host: GitHub
- URL: https://github.com/doge-is-dope/erc4337-sample
- Owner: Doge-is-Dope
- Created: 2023-07-02T10:09:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-08T15:31:21.000Z (over 1 year ago)
- Last Synced: 2025-04-14T06:16:35.998Z (6 months ago)
- Topics: account-abstraction, erc-4337, erc4337, ethereum
- Language: Solidity
- Homepage:
- Size: 33.2 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```