-
Notifications
You must be signed in to change notification settings - Fork 51
49 lines (38 loc) · 1.58 KB
/
deploy-verify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This workflow deploys and verify the lsp-smart-contracts and verify them on LUKSO Mainnet & Testnet.
name: Deploy + Verify Contracts
env:
# 0x983aBC616f2442bAB7a917E6bb8660Df8b01F3bF
CONTRACT_VERIFICATION_TESTNET_PK: ${{ secrets.CONTRACT_VERIFICATION_TESTNET_PK }}
# 0xF0efeD8d49c0FA6CFC861Bf0311b6B3a4414e4b7
CONTRACT_VERIFICATION_MAINNET_PK: ${{ secrets.CONTRACT_VERIFICATION_MAINNET_PK }}
on:
workflow_dispatch:
# This workflow is temporarily disabled until refactored to deploy for particular packages with the new monorepo structure
# push:
# branches:
# - "main"
jobs:
deploy-verify:
strategy:
matrix:
network: ["luksoTestnet", "luksoMainnet"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build contract artifacts
run: npm run build
- name: Verify Deployer Balance
run: npx hardhat verify-balance --network ${{ matrix.network }}
# The array of `tags` under each network in `hardhat.config.ts` specify which contracts to deploy
- name: Deploy contracts on ${{ matrix.network }}
run: npx hardhat deploy --network ${{ matrix.network }} --tags $TAGS --write true
# Loop through deployment files and recover address of deployed contracts to verify
- name: Verify deployed contracts on ${{ matrix.network }}
run: npx hardhat verify-all --network ${{ matrix.network }}