Skip to content

ERC-4337 (Account Abstraction) - Bundler implementation in Rust.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

da-bao-jian/aa-bundler

 
 

Repository files navigation

AA - Bundler

Rust implementation for Bundler - ERC-4337 (Account Abstraction).

Stable Diffusion prompt: ethereum bundler account abstraction rust vector logo

For more information: https://hackmd.io/@Vid201/aa-bundler-rust

Prerequisites

Rust version: 1.69.0

  1. libclang, libclang-dev on Debian/Ubuntu.
  2. Ethereum execution client JSON-RPC API with enabled debug_traceCall. For production, you can use Geth or Erigon. For testing, we are using Geth dev mode; so you need to install Geth for running tests.
  3. solc >=0.8.12.
  4. cargo-sort.

How to run?

Set up third-party dependencies (ERC-4337 smart contracts and bundler tests):

make fetch-thirdparty
make setup-thirdparty

Create wallet for bundler:

cargo run --release --bin create-wallet -- --output-path ${HOME}/.aa-bundler --chain-id 5

Run bundler (with user operation pool and JSON-RPC API):

cargo run --release -- --eth-client-address http://127.0.0.1:8545 --mnemonic-file ${HOME}/.aa-bundler/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --beneficiary 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --gas-factor 600 --min-balance 1 --entry-points 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789 --min-stake 1 --min-unstake-delay 0 --min-priority-fee-per-gas 0 --max-verification-gas 1500000

Run only user operation pool:

cargo run --release --bin bundler-uopool -- --eth-client-address http://127.0.0.1:8545 --entry-points 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789 --min-stake 1 --min-unstake-delay 0 --min-priority-fee-per-gas 0 --max-verification-gas 1500000

Run only JSON-RPC API:

cargo run --release --bin bundler-rpc

Contributing

Thank you for showing interest in contributing to the project!

There is a contributing guide to help get you started.

There are some additional prerequisites for testing:

  1. geth

Before making a PR, make sure to run the following commands:

make format
make lint
make test

Contact

The best place for the discussion is the dedicated Telegram group.

Licenses

This project is dual-licensed under Apache 2.0 and MIT terms:

About

ERC-4337 (Account Abstraction) - Bundler implementation in Rust.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.3%
  • Other 1.7%