Skip to content

Run a recent full OP block in the Hardhat Network #1994

Run a recent full OP block in the Hardhat Network

Run a recent full OP block in the Hardhat Network #1994

name: Run a recent full OP block in the Hardhat Network
on:
schedule:
- cron: "0 */8 * * *"
workflow_dispatch:
jobs:
test-recent-op-block:
name: Test recent OP block (${{ matrix.network }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
network:
- opt-mainnet
# - base-mainnet # uncomment once EDR supports latest Base hardforks
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- uses: ./.github/actions/setup-rust
- name: Cache EDR RPC cache
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
with:
path: |
**/edr-cache
key: test-recent-${{ matrix.network }}-block-rpc-cache-v1
- run: |
BASE_ALCHEMY_URL="${{ secrets.ALCHEMY_URL }}"
ALCHEMY_URL="${BASE_ALCHEMY_URL//eth-mainnet/${{ matrix.network }}}"
echo "::add-mask::$ALCHEMY_URL"
cargo replay-block -u "$ALCHEMY_URL" -c op
- name: Notify failures
if: failure()
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
with:
webhook: ${{ secrets.GH_ACTION_NOTIFICATIONS_SLACK_WEBHOOK_URL }}
webhook-type: webhook-trigger
errors: true
payload: |
{
"workflow_name": "${{ github.workflow }} (${{ matrix.network }})",
"run_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}