Skip to content

Verify deployed contracts #11

Verify deployed contracts

Verify deployed contracts #11

Workflow file for this run

name: Verify deployed contracts
on:
workflow_dispatch:
inputs:
contracts:
description: 'List of deployed contracts to verify (space delimited)'
required: true
type: string
network:
description: 'Network where the contracts are deployed'
required: true
type: choice
default: mainnet
options:
- mainnet
- arbitrum-one
- goerli
- arbitrum-goerli
jobs:
build:
name: Compile contracts
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Compile contracts
run: yarn build
- name: Save build artifacts
uses: actions/upload-artifact@v3
with:
name: contract-artifacts
path: |
packages/contracts/build
packages/contracts/cache/*.json
verify:
name: Verify deployments
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Get build artifacts
uses: actions/download-artifact@v3
with:
name: contract-artifacts
- name: Verify contracts on Defender
run: cd packages/contracts && yarn hardhat --network ${{ inputs.network }} verify-defender ${{ inputs.contracts }}
env:
DEFENDER_API_KEY: "${{ secrets.DEFENDER_API_KEY }}"
DEFENDER_API_SECRET: "${{ secrets.DEFENDER_API_SECRET }}"
INFURA_KEY: "${{ secrets.INFURA_KEY }}"
WORKFLOW_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"