Skip to content

Latest commit

 

History

History
100 lines (76 loc) · 2.45 KB

developing.md

File metadata and controls

100 lines (76 loc) · 2.45 KB

Developing

Setup

  1. Clone the repo and checkout submodules
git clone https://github.com/alchemyplatform/rundler
cd rundler
git submodule update --init --recursive
  1. Install prerequisites

Build & Test

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

Running Locally

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.

Dev Tools

Development tools can be found in bin/tools. These tools are meant to help get Rundler running locally against a development network.

Deploy Dev Contracts

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