This repository has been archived by the owner on Oct 20, 2024. It is now read-only.
Add support for validation rule OP-080 (#394) #532
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: compliance | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PDM | |
run: curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 - | |
- name: "Setup Node.js" | |
uses: "actions/setup-node@v3" | |
with: | |
node-version: 18.15 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.20" | |
cache: true | |
- name: Checkout bundler spec test | |
uses: actions/checkout@v3 | |
with: | |
repository: hazim-j/bundler-spec-tests | |
ref: develop | |
path: ./bundler-spec-tests | |
fetch-depth: 0 | |
submodules: true | |
- name: Setup bundler spec test | |
working-directory: ./bundler-spec-tests | |
run: | | |
pdm install && \ | |
cd @account-abstraction && \ | |
git checkout v0.6.0 && \ | |
yarn install --frozen-lockfile && \ | |
yarn compile && \ | |
cd ../spec && \ | |
yarn install --frozen-lockfile && \ | |
yarn build | |
- name: Run Geth | |
run: | | |
docker run -d --name node -p 8545:8545 \ | |
stackupwallet/go-ethereum:v1.13.11 \ | |
--verbosity 1 \ | |
--http.vhosts '*,localhost,host.docker.internal' \ | |
--http \ | |
--http.api eth,net,web3,debug \ | |
--http.corsdomain '*' \ | |
--http.addr "0.0.0.0" \ | |
--nodiscover --maxpeers 0 --mine \ | |
--networkid 1337 \ | |
--dev \ | |
--allow-insecure-unlock \ | |
--rpc.allow-unprotected-txs \ | |
--miner.gaslimit 12000000 | |
- name: Install bundler dependencies | |
run: go mod download | |
- name: Build bundler binary | |
run: go build -o ./tmp/stackup-bundler main.go | |
- name: Deploy ERC-4337 contracts | |
working-directory: ./bundler-spec-tests | |
run: | | |
cd @account-abstraction && \ | |
yarn deploy --network localhost | |
- name: Fund bundler | |
run: | | |
docker exec node \ | |
geth \ | |
--exec "eth.sendTransaction({from: eth.accounts[0], to: \"0x43378ff8C70109Ee4Dbe85aF34428ab0615EBd23\", value: web3.toWei(10000, \"ether\")})" \ | |
attach http://localhost:8545/ | |
- name: Run Stackup Bundler | |
run: ./tmp/stackup-bundler start --mode private & | |
env: | |
ERC4337_BUNDLER_ETH_CLIENT_URL: http://localhost:8545/ | |
ERC4337_BUNDLER_PORT: 3000 | |
ERC4337_BUNDLER_DEBUG_MODE: true | |
ERC4337_BUNDLER_NATIVE_BUNDLER_COLLECTOR_TRACER: bundlerCollectorTracer | |
ERC4337_BUNDLER_NATIVE_BUNDLER_EXECUTOR_TRACER: bundlerExecutorTracer | |
# This key is for testing purposes only. Do not use for anything else. | |
ERC4337_BUNDLER_PRIVATE_KEY: c6cbc5ffad570fdad0544d1b5358a36edeb98d163b6567912ac4754e144d4edb | |
- name: Run test | |
working-directory: ./bundler-spec-tests | |
run: pdm test |