Skip to content

Commit 3f02f60

Browse files
committed
feat: add deployment ID output and verification step for contract deployment
1 parent 90a1e83 commit 3f02f60

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
esac
8080
8181
- name: Deploy contracts
82+
id: deploy
8283
working-directory: packages/sharing-smart-contract
8384
env:
8485
# For Deployment
@@ -87,9 +88,6 @@ jobs:
8788
ADMIN_PRIVATE_KEY: ${{ secrets.ADMIN_PRIVATE_KEY }}
8889
POCO_ADDRESS: ${{ vars.POCO_ADDRESS }}
8990
DATASET_REGISTRY_ADDRESS: ${{ vars.DATASET_REGISTRY_ADDRESS }}
90-
# For Verification
91-
EXPLORER_API_KEY: ${{ secrets.EXPLORER_API_KEY }}
92-
IS_VERIFICATION_API_V2: ${{ vars.IS_VERIFICATION_API_V2 }}
9391
run: |
9492
if [ "${{ inputs.network }}" = "hardhat" ]; then
9593
npm run deploy -- --network ${{ inputs.network }}
@@ -100,11 +98,23 @@ jobs:
10098
else
10199
DEPLOYMENT_ID="${{ inputs.network }}"
102100
fi
101+
echo "deployment-id=$DEPLOYMENT_ID" >> $GITHUB_OUTPUT
103102
POCO_ADDRESS="${{ vars.POCO_ADDRESS }}" \
104103
DATASET_REGISTRY_ADDRESS="${{ vars.DATASET_REGISTRY_ADDRESS }}" \
105-
npm run deploy -- --network ${{ inputs.network }} --deployment-id "$DEPLOYMENT_ID" --verify
104+
npm run deploy -- --network ${{ inputs.network }} --deployment-id "$DEPLOYMENT_ID"
106105
fi
107106
107+
- name: Verify contracts
108+
if: inputs.network != 'hardhat'
109+
working-directory: packages/sharing-smart-contract
110+
env:
111+
# For Verification
112+
RPC_URL: ${{ secrets.RPC_URL }}
113+
EXPLORER_API_KEY: ${{ secrets.EXPLORER_API_KEY }}
114+
IS_VERIFICATION_API_V2: ${{ vars.IS_VERIFICATION_API_V2 }}
115+
run: |
116+
npm run verify:ignition -- --network ${{ inputs.network }} --deployment-id "${{ steps.deploy.outputs.deployment-id }}" --include-unrelated-contracts
117+
108118
- name: Save deployment artifacts
109119
if: inputs.network != 'hardhat'
110120
uses: stefanzweifel/git-auto-commit-action@v5

0 commit comments

Comments
 (0)