Home

Awesome

<h1 align="center"> Silius </h1>

CI workflow Docker workflow Telegram Group GitHub stars GitHub forks

<p align="center">Silius - <a href="https://eips.ethereum.org/EIPS/eip-4337">ERC-4337 (Account Abstraction)</a> bundler implementation in Rust.</p> <p align="center"> <img src="./assets/logo.png" width="450"> </p>

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

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. For production, you can use Geth or Erigon. For testing, we are using Geth dev mode (tested with v1.14.11); so you need to install Geth for running tests.
  3. solc.
  4. cargo-sort and cargo-udeps.

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 -- create-wallet --output-path ${HOME}/.silius --chain-id 5

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

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:

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:

cargo run --release -- uopool --eth-client-address ws://127.0.0.1:8546 --entry-points 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789

Run only JSON-RPC API:

cargo run --release -- rpc --http --ws

Docker

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.

ChainSupported StatusPublic RPC URL
Ethereum:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/ethereum-mainnet
Ethereum Sepolia:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/ethereum-sepolia
Ethereum Holesky:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/ethereum-holesky
Polygon:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/polygon-mainnet
Linea:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/linea-mainnet
Optimism:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/optimism-mainnet
Optimism Sepolia:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/optimism-sepolia
Arbitrum:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/arbitrum-mainnet
Arbitrum Sepolia:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/arbitrum-sepolia
BSC:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/bsc-mainnet
BSC Testnet:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/bsc-testnet
Base:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/base-mainnet
Base Sepolia:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/base-sepolia
Avalanche:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/avalanche-mainnet
Avalanche Fuji:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/avalanche-fuji
Blast:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/blast-mainnet
Blast Sepolia:heavy_check_mark:https://rpc.silius.xyz/api/v1/chain/blast-sepolia

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.

AddressVersionCommitAudited
0x5FF137D4b0FDCD49DcA30c7CF57E578a026d27890.6.09b5f2e4April 2023

Paymasters and account factories

You can find a list of many paymasters and account factories here.

Examples

To get started, check the examples here. More examples will be added in the future.

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

Official bundler spec tests developed by the eth-infinitism team are also included in the repo's CI pipeline (commit: 6209cdeaba48105cd7352468844be3882e7f3f23). You can find more information on how to run tests here. Make sure your contribution doesn't break the tests!

Contact

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

Authors

Projects using Silius

Licenses

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

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:

Acknowledgements