anvil-zksync Action πŸš€

A lightweight GitHub Action that starts an anvil-zksync node inside your workflow, so you can run tests or scripts against a local ZK chain.

Quickstart

jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Start anvil-zksync uses: dutterbutter/anvil-zksync-action@v1.1 with: mode: run - name: Run tests run: | # e.g. point your tests at http://localhost:8011 yarn test:contracts

Example: Forking Mainnet

- name: Start anvil-zksync in fork mode uses: dutterbutter/anvil-zksync-action@v1.1 with: mode: fork forkUrl: mainnet forkBlockNumber: 59_485_781 port: 8015

Inputs

InputDescriptionDefault
modeOperation mode: run or forkrun
forkUrlJSON-RPC endpoint to fork from (requires fork)β€”
forkBlockNumberBlock number to snapshot (fork mode only)β€”
portPort for the node’s RPC server8011
releaseTagRelease tag to download fromlatest
hostHost address to bind127.0.0.1
chainIdChain ID exposed by the node260
logLevelVerbosity: debug, info, warn, errorinfo
logFileFile path to write logs (if set, action waits)β€”

For an exhausted list of available inputs, see the anvil-zksync-action readme.

Uploading Logs

- name: Upload anvil logs uses: actions/upload-artifact@v4 with: name: anvil-zksync-log path: anvil-zksync.log

For more options and detailed CLI flags, see the anvil-zksync CLI reference.