Skip to content

Commit c194637

Browse files
committed
fix: Add verification step for contracts in deployment workflows
1 parent 59a3048 commit c194637

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

.github/workflows/core-smart-contract-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ jobs:
9595
9696
- name: Verify contract
9797
if: inputs.network != 'hardhat'
98+
continue-on-error: true
9899
working-directory: packages/smart-contract
99100
env:
100101
# For Verification

.github/workflows/sharing-smart-contract-deploy.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,25 @@ jobs:
105105
npm run deploy -- --network ${{ inputs.network }}
106106
fi
107107
108+
- name: Verify contracts
109+
if: inputs.network != 'hardhat'
110+
continue-on-error: true
111+
working-directory: packages/sharing-smart-contract
112+
env:
113+
# For Verification
114+
EXPLORER_API_KEY: ${{ secrets.EXPLORER_API_KEY }}
115+
IS_VERIFICATION_API_V2: ${{ vars.IS_VERIFICATION_API_V2 }}
116+
run: |
117+
# For testnets, use network-environment; for mainnets, use network only
118+
if [ "$IS_MAINNET" = false ]; then
119+
DEPLOYMENT_ID="${{ inputs.network }}-${{ inputs.environment }}"
120+
else
121+
DEPLOYMENT_ID="${{ inputs.network }}"
122+
fi
123+
npm run verify -- "$DEPLOYMENT_ID"
124+
125+
126+
108127
- name: Save deployment artifacts
109128
if: inputs.network != 'hardhat'
110129
uses: stefanzweifel/git-auto-commit-action@v5
@@ -115,6 +134,3 @@ jobs:
115134
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
116135
commit_author: 'GitHub Actions Bot <github-actions[bot]@users.noreply.github.com>'
117136

118-
- name: Verify contracts
119-
# TODO
120-
run: echo "Verification step is not implemented yet"

0 commit comments

Comments
 (0)