diff --git a/.github/workflows/core-assertion-monitor.yml b/.github/workflows/core-assertion-monitor.yml new file mode 100644 index 0000000000..30390e5829 --- /dev/null +++ b/.github/workflows/core-assertion-monitor.yml @@ -0,0 +1,60 @@ +name: Monitor Core Assertion Events + +on: + workflow_dispatch: + schedule: + # Run every 6 hours + - cron: "0 */6 * * *" + +env: + NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} + ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets.CORE_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN }} + ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets.CORE_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL }} + NOVA_MONITOR_RPC_URL: ${{ secrets.NOVA_MONITOR_RPC_URL }} + ARB_ONE_MONITOR_RPC_URL: ${{ secrets.ARB_ONE_MONITOR_RPC_URL }} + +jobs: + run-alerting: + runs-on: ubuntu-latest + + steps: + - name: Checkout Bridge + uses: actions/checkout@v4 + with: + repository: OffchainLabs/arbitrum-token-bridge + + - name: Install node_modules + uses: OffchainLabs/actions/node-modules/install@main + + - name: Generate chains JSON + run: yarn workspace arb-token-bridge-ui generateCoreChainsToMonitor + env: + NOVA_MONITOR_RPC_URL: ${{ secrets.NOVA_MONITOR_RPC_URL }} + ARB_ONE_MONITOR_RPC_URL: ${{ secrets.ARB_ONE_MONITOR_RPC_URL }} + ASSERTION_MONITORING: true + + - name: Checkout Arbitrum Monitoring repository + uses: actions/checkout@v4 + with: + repository: OffchainLabs/arbitrum-monitoring + path: arbitrum-monitoring + - name: Copy chains JSON to Arbitrum Monitoring + run: cp ./packages/arb-token-bridge-ui/public/__auto-generated-core-chains.json ./arbitrum-monitoring/packages/assertion-monitor/config.json + + - name: Setup Node for Arbitrum Monitoring + uses: actions/setup-node@v4 + with: + node-version: latest + + - name: Install dependencies for Arbitrum Monitoring + run: cd ./arbitrum-monitoring && yarn install + + - name: Run alerting command + run: cd ./arbitrum-monitoring && yarn assertion-monitor --enableAlerting + env: + NODE_ENV: "CI" + ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets.CORE_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN }} + ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets.CORE_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL }} + + - name: Clean up + run: rm ./packages/arb-token-bridge-ui/public/__auto-generated-core-chains.json diff --git a/.github/workflows/orbit-assertion-monitor.yml b/.github/workflows/orbit-assertion-monitor.yml new file mode 100644 index 0000000000..abde38447f --- /dev/null +++ b/.github/workflows/orbit-assertion-monitor.yml @@ -0,0 +1,56 @@ +name: Monitor Orbit Assertion Events + +on: + workflow_dispatch: + schedule: + # Run every 6 hours + - cron: "0 */6 * * *" + +env: + NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} + ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets.ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN }} + ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets.ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL }} + +jobs: + run-alerting: + runs-on: ubuntu-latest + + steps: + - name: Checkout Bridge + uses: actions/checkout@v4 + with: + repository: OffchainLabs/arbitrum-token-bridge + + - name: Install node_modules + uses: OffchainLabs/actions/node-modules/install@main + + - name: Generate chains JSON + run: yarn workspace arb-token-bridge-ui generateOrbitChainsToMonitor + + - name: Checkout Arbitrum Monitoring repository + uses: actions/checkout@v4 + with: + repository: OffchainLabs/arbitrum-monitoring + path: arbitrum-monitoring + + - name: Copy chains JSON to Arbitrum Monitoring + run: cp ./packages/arb-token-bridge-ui/public/__auto-generated-orbit-chains.json ./arbitrum-monitoring/packages/assertion-monitor/config.json + + - name: Setup Node for Arbitrum Monitoring + uses: actions/setup-node@v4 + with: + node-version: latest + + - name: Install dependencies for Arbitrum Monitoring + run: cd ./arbitrum-monitoring && yarn install + + - name: Run alerting command + run: cd ./arbitrum-monitoring && yarn assertion-monitor --enableAlerting + env: + NODE_ENV: "CI" + ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets.ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN }} + ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets.ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL }} + + + - name: Clean up + run: rm ./packages/arb-token-bridge-ui/public/__auto-generated-orbit-chains.json