- Clone the repo and checkout submodules
git clone https://github.com/alchemyplatform/rundler
cd rundler
git submodule update --init --recursive
- Install prerequisites
- Rust/Cargo: 1.72 or higher with nightly
- Cocogitto: Commit linting
- Docker: Run spec tests
- PDM: Run spec tests
- Protoc: Compile protobuf
- Buf: Protobuf linting
- Foundry: Compile contracts
Rundler contains a Makefile
to simplify common build/test commands
# build rundler
$ make build
# run unit tests
$ make test-unit
# run all tests
$ make test
Rundler requires an RPC end that supports debug_traceCall
to be running. A simple way to do that is to use docker compose to run Geth with the following configuration:
version: "3.8"
services:
geth:
image: ethereum/client-go:v1.10.26
ports:
- "8545:8545"
- "8546:8546"
command:
- --miner.gaslimit=12000000
- --http
- --http.api=personal,eth,net,web3,debug
- --http.vhosts=*
- --http.addr=0.0.0.0
- --ws
- --ws.api=personal,eth,net,web3,debug
- --ws.addr=0.0.0.0
- --ignore-legacy-receipts
- --allow-insecure-unlock
- --rpc.allow-unprotected-txs
- --dev
- --verbosity=2
- --nodiscover
- --maxpeers=0
- --mine
- --miner.threads=1
- --networkid=1337
Create a .env
file and fill in any required configs.
Then:
cargo run node
will run a full Rundler node locally.
Development tools can be found in bin/tools
. These tools are meant to help get Rundler running locally against a development network.
Fund and deploy contracts. Contracts are deployed from the account-abstraction repo. This does the following:
* Creates an account for the bundler to use.
* Deploys the EntryPoint
.
* Deploys a SimpleAccountFactory
.
* Deploys a VerifyingPaymaster
.
* Deploys a SimpleAccount
.
* Funds each of the accounts.
cd bin/tools
cargo run --bin deploy_dev_contracts