Rust implementation for Bundler - EIP-4337 (Account Abstraction).
Stable Diffusion prompt: ethereum bundler account abstraction rust vector logo
For more information: https://hackmd.io/@Vid201/aa-bundler-rust
Rust version: 1.67.1
- libclang,
libclang-dev
on Debian/Ubuntu. - 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. - solc >=0.8.12.
- cargo-sort.
Set up third-party dependencies (EIP-4337 smart contracts and bundler tests):
make fetch-thirdparty
make setup-thirdparty
Create wallet for bundler:
cargo run --bin create-wallet -- --output-path ${HOME}/.aa-bundler --chain-id 5
Run bundler (with user operation pool and JSON-RPC API):
cargo run -- --eth-client-address http://127.0.0.1:8545 --mnemonic-file ${HOME}/.aa-bundler/0x129D197b2a989C6798601A49D89a4AEC822A17a3 --beneficiary 0x690B9A9E9aa1C9dB991C7721a92d351Db4FaC990 --gas-factor 600 --min-balance 1 --entry-points 0x0576a174D229E3cFA37253523E645A78A0C91B57 --helper 0x0000000000000000000000000000000000000000 --min-stake 1 --min-unstake-delay 0 --min-priority-fee-per-gas 0 --max-verification-gas 1500000
Run only user operation pool:
cargo run --bin bundler-uopool -- --eth-client-address http://127.0.0.1:8545 --entry-points 0x0576a174D229E3cFA37253523E645A78A0C91B57 --min-stake 1 --min-unstake-delay 0 --min-priority-fee-per-gas 0 --max-verification-gas 1500000
Run only JSON-RPC API:
cargo run --bin bundler-rpc