Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silius-rs/silius
ERC-4337 (Account Abstraction) - modular and efficient bundler implementation in Rust.
https://github.com/silius-rs/silius
account-abstraction bundler eip-4337 erc-4337 ethereum modular p2p rust
Last synced: about 2 months ago
JSON representation
ERC-4337 (Account Abstraction) - modular and efficient bundler implementation in Rust.
- Host: GitHub
- URL: https://github.com/silius-rs/silius
- Owner: silius-rs
- License: apache-2.0
- Created: 2022-10-22T08:57:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-17T18:58:50.000Z (6 months ago)
- Last Synced: 2024-08-04T22:09:37.757Z (5 months ago)
- Topics: account-abstraction, bundler, eip-4337, erc-4337, ethereum, modular, p2p, rust
- Language: Rust
- Homepage: http://silius.rs/
- Size: 3.45 MB
- Stars: 239
- Watchers: 8
- Forks: 40
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-APACHE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
#
Silius
![CI workflow](https://github.com/silius-rs/silius/actions/workflows/ci.yml/badge.svg)
![Docker workflow](https://github.com/silius-rs/silius/actions/workflows/docker.yml/badge.svg)
[![Telegram Group](https://img.shields.io/endpoint?color=neon&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2F%2BsKeRcN4j3MM3NmNk)](https://t.me/+sKeRcN4j3MM3NmNk)
[![GitHub stars](https://img.shields.io/github/stars/silius-rs/silius.svg?style=social&label=Star&maxAge=2592000)](https://github.com/silius-rs/silius/stargazers/)
[![GitHub forks](https://img.shields.io/github/forks/silius-rs/silius.svg?style=social&label=Fork&maxAge=2592000)](https://github.com/silius-rs/silius/network/)Silius - ERC-4337 (Account Abstraction) bundler implementation in Rust.
For more information:
*This project is still under active development.*
## Getting started
### Native
**Prerequisites:**
Rust version: 1.81.0
1. `libclang-dev`, `pkg-config` and `libssl-dev` on Debian/Ubuntu.
2. Ethereum execution client JSON-RPC API with enabled [`debug_traceCall`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debug_tracecall). For production, you can use [Geth](https://github.com/ethereum/go-ethereum) or [Erigon](https://github.com/ledgerwatch/erigon). For testing, we are using Geth dev mode (tested with [v1.14.11](https://github.com/ethereum/go-ethereum/releases/tag/v1.14.11)); so you need to install [Geth](https://geth.ethereum.org/docs/getting-started/installing-geth) for running tests.
3. [`solc`](https://docs.soliditylang.org/en/v0.8.27/installing-solidity.html).
4. [`cargo-sort`](https://crates.io/crates/cargo-sort) and [`cargo-udeps`](https://crates.io/crates/cargo-udeps).Set up third-party dependencies (ERC-4337 smart contracts and bundler tests):
```bash
make fetch-thirdparty
make setup-thirdparty
```Create wallet for bundler:
```bash
cargo run --release -- create-wallet --output-path ${HOME}/.silius --chain-id 5
```Run bundler (with user operation pool and JSON-RPC API):
```bash
cargo run --release -- node --eth-client-address http://127.0.0.1:8545 --mnemonic-file ${HOME}/.silius/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --beneficiary 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --entry-points 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789 --http --ws
```Run only bundling component:
```bash
cargo run --release -- bundler --eth-client-address ws://127.0.0.1:8546 --mnemonic-file ${HOME}/.silius/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --beneficiary 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --entry-points 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789
```Run only user operation pool:
```bash
cargo run --release -- uopool --eth-client-address ws://127.0.0.1:8546 --entry-points 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789
```Run only JSON-RPC API:
```bash
cargo run --release -- rpc --http --ws
```### Docker
```bash
docker run --net=host -v ./bundler-spec-tests/keys/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266:/data/silius/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 -v ./.local/db:/data/silius/db ghcr.io/silius-rs/silius:latest node --eth-client-address http://127.0.0.1:8545 --datadir data/silius --mnemonic-file data/silius/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --beneficiary 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --entry-points 0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789 --http --http.addr 0.0.0.0 --http.port 3000 --http.api eth,debug,web3 --ws --ws.addr 0.0.0.0 --ws.port 3001 --ws.api eth,debug,web3 --eth-client-proxy-address http://127.0.0.1:8545
```## Supported networks
Silius was tested on the following networks, and some public endpoints are available for testing. If you have problems with any endpoint below, you are welcome to fire an [issue](https://github.com/silius-rs/silius/issues/new).
| Chain | Supported Status | Public RPC URL |
| :--------: | :-------: | :-------: |
| Ethereum | :heavy_check_mark:| |
| Ethereum Sepolia| :heavy_check_mark: | |
| Ethereum Holesky| :heavy_check_mark: | |
| Polygon | :heavy_check_mark: | |
| Polygon Mumbai| :heavy_check_mark: | |
| Linea | :heavy_check_mark: | |
| Optimism | :heavy_check_mark: | |
| Optimism Sepolia | :heavy_check_mark: | |
| Arbitrum | :heavy_check_mark: | |
| Arbitrum Sepolia | :heavy_check_mark: | |
| BSC | :heavy_check_mark: | |
| BSC Testnet | :heavy_check_mark: | |
| Base | :heavy_check_mark: | |
| Base Sepolia | :heavy_check_mark: | |
| Avalanche | :heavy_check_mark: | |
| Avalanche Fuji | :heavy_check_mark: | |
| Blast | :heavy_check_mark: | |
| Blast Sepolia | :heavy_check_mark: | |Bundler's account: `0x0a4E15d25E97e747bD568979A3B7dbEb95970Eb3`
**You can also try the Silius on any other EVM network, but you may encounter some problems (e.g., gas calculating differences on L2s) - please use it at our own risk! You are always welcome to open up a new issue when you meet any problem.** :warning:
## Supported entry point
The address of the entry point smart contract is the same on all EVM networks.
| Address | Version | Commit | Audited |
| :--------: | :-------: | :-------: | :-------: |
| [0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789](https://blockscan.com/address/0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789) | 0.6.0 | [9b5f2e4](https://github.com/eth-infinitism/account-abstraction/commit/9b5f2e4bb30a81aa30761749d9e2e43fee64c768) | [April 2023](https://blog.openzeppelin.com/eip-4337-ethereum-account-abstraction-incremental-audit)## Paymasters and account factories
You can find a list of many paymasters and account factories [here](https://docs.google.com/spreadsheets/d/1QJEYDOr-AMD2bNAoupfjQJYJabFgdb2TRSyekdIfquM/edit#gid=0).
## Examples
To get started, check the examples [here](./examples/). More examples will be added in the future.
## Contributing
Thank you for showing interest in contributing to the project!
There is [a contributing guide](./CONTRIBUTING.md) to help get you started.
There are some additional prerequisites for **testing**:
1. [`geth`](https://geth.ethereum.org/docs/getting-started/installing-geth)
Before making a PR, make sure to run the following commands:
```bash
make format
make lint
make test
```Official [bundler spec tests](https://github.com/eth-infinitism/bundler-spec-tests) developed by the [eth-infinitism](https://github.com/eth-infinitism/) team are also included in the repo's CI pipeline (commit: [6209cdeaba48105cd7352468844be3882e7f3f23](https://github.com/eth-infinitism/bundler-spec-tests/tree/6209cdeaba48105cd7352468844be3882e7f3f23)). You can find more information on how to run tests [here](https://github.com/eth-infinitism/bundler-spec-tests). Make sure your contribution doesn't break the tests!
## Contact
The best place for the discussion is the dedicated [Telegram group](https://t.me/+sKeRcN4j3MM3NmNk).
## Authors
- Vid Kersic: [GitHub](https://github.com/Vid201), [Twitter](https://twitter.com/vidkersic)
- WillQ: [GitHub](https://github.com/zsluedem), [Twitter](https://twitter.com/zsluedem06)## Projects using Silius
- [Luban the Paymaster](https://github.com/da-bao-jian/luban-the-paymaster): A Cross-chain Tx Sponsorship Protocol.
- [Ethers UserOp](https://github.com/qi-protocol/ethers-userop/): An ether-rs middleware to craft UserOperations.## Licenses
This project is dual-licensed under Apache 2.0 and MIT terms:
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or )
- MIT License ([LICENSE-MIT](LICENSE-MIT) or )## Donations
Silius is an open-source project and a public good. If you want to help the project, you can send donations of any size via:
- Ethereum address: `0x7cB801446AC4f5EA8f7333EFc58ab787eB611558`
## Acknowledgements
- [Bundler - eth-infinitism](https://github.com/eth-infinitism/bundler)
- [Akula](https://github.com/akula-bft/akula)
- [ethers-rs](https://github.com/gakonst/ethers-rs)
- [Reth](https://github.com/paradigmxyz/reth)
- [Lighthouse](https://github.com/sigp/lighthouse)
- [Alloy](https://github.com/alloy-rs)