Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit b432c99

Browse files
authored
Add bundler spec test to CI (#160)
1 parent 29c3bcb commit b432c99

File tree

3 files changed

+90
-2
lines changed

3 files changed

+90
-2
lines changed

.github/workflows/compliance.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Bundler compliance
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Setup PDM
18+
run: curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -
19+
20+
- name: Setup Go
21+
uses: actions/setup-go@v3
22+
with:
23+
go-version: 1.19
24+
cache: true
25+
26+
- name: Checkout bundler spec test
27+
uses: actions/checkout@v3
28+
with:
29+
# TODO: Switch to eth-infinitism/bundler-spec-tests once updated to v0.6
30+
repository: hazim-j/bundler-spec-tests
31+
ref: ep-v0.6.0
32+
path: ./bundler-spec-tests
33+
submodules: true
34+
35+
- name: Setup bundler spec test
36+
working-directory: ./bundler-spec-tests
37+
run: pdm install && pdm run update-deps
38+
39+
- name: Install Geth
40+
run: |
41+
sudo add-apt-repository -y ppa:ethereum/ethereum && \
42+
sudo apt-get update && \
43+
sudo apt-get install ethereum
44+
45+
- name: Run Geth
46+
run: |
47+
geth \
48+
--verbosity 1 \
49+
--http.vhosts '*,localhost,host.docker.internal' \
50+
--http \
51+
--http.api eth,net,web3,debug \
52+
--http.corsdomain '*' \
53+
--http.addr "0.0.0.0" \
54+
--nodiscover --maxpeers 0 --mine \
55+
--networkid 1337 \
56+
--dev \
57+
--allow-insecure-unlock \
58+
--rpc.allow-unprotected-txs \
59+
--dev.gaslimit 20000000 &
60+
61+
- name: Install bundler dependencies
62+
run: go mod download
63+
64+
- name: Build bundler binary
65+
run: go build -o ./tmp/stackup-bundler main.go
66+
67+
- name: Deploy ERC-4337 contracts
68+
working-directory: ./bundler-spec-tests
69+
run: cd @account-abstraction && yarn deploy --network localhost
70+
71+
- name: Fund bundler
72+
run: |
73+
geth \
74+
--exec "eth.sendTransaction({from: eth.accounts[0], to: \"0x43378ff8C70109Ee4Dbe85aF34428ab0615EBd23\", value: web3.toWei(10000, \"ether\")})" \
75+
attach http://localhost:8545/
76+
77+
- name: Run Stackup Bundler
78+
run: ./tmp/stackup-bundler start --mode private &
79+
env:
80+
ERC4337_BUNDLER_ETH_CLIENT_URL: http://localhost:8545/
81+
ERC4337_BUNDLER_PORT: 3000
82+
ERC4337_BUNDLER_DEBUG_MODE: true
83+
# This key is for testing purposes only. Do not use for anything else.
84+
ERC4337_BUNDLER_PRIVATE_KEY: c6cbc5ffad570fdad0544d1b5358a36edeb98d163b6567912ac4754e144d4edb
85+
86+
- name: Run test
87+
working-directory: ./bundler-spec-tests
88+
run: pdm test

.github/workflows/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
cache: true
2222

2323
- name: Install dependencies
24-
run: go get .
24+
run: go mod download
2525

2626
- name: Build
2727
run: go build -v ./...

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![](https://i.imgur.com/t0P3vWU.png)
22

33
![GitHub release (latest by date)](https://img.shields.io/github/v/release/stackup-wallet/stackup-bundler)
4-
![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/stackup-wallet/stackup-bundler/pipeline.yml?branch=main)
4+
![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/stackup-wallet/stackup-bundler/compliance.yml?branch=main)
55

66
# Getting started
77

0 commit comments

Comments
 (0)