-
Notifications
You must be signed in to change notification settings - Fork 50
58 lines (47 loc) · 1.81 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
50
51
52
53
54
55
56
57
58
# This workflow deploys and verify the lsp-smart-contracts and verify them on LUKSO Testnet.
name: Deploy + Verify Contracts on Testnet
env:
# 0x983aBC616f2442bAB7a917E6bb8660Df8b01F3bF
CONTRACT_VERIFICATION_TESTNET_PK: ${{ secrets.CONTRACT_VERIFICATION_TESTNET_PK }}
# 0xF0efeD8d49c0FA6CFC861Bf0311b6B3a4414e4b7
CONTRACT_VERIFICATION_MAINNET_PK: ${{ secrets.CONTRACT_VERIFICATION_MAINNET_PK }}
on:
workflow_dispatch:
push:
branches:
- "main"
jobs:
deploy-verify:
strategy:
matrix:
network: ["luksoTestnet", "luksoMainnet"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js v20
uses: actions/setup-node@v3
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 }}
# We do not deploy the standard contracts on mainnet for the following reasons:
# 1) standard contracts are expensive to deploy on mainnet
# 2) user's universal profiles use the minimal proxy pattern,
#
# therefore we only need the base contracts to be deployed on mainnet.
- name: Select tags based on network to deploy
run: |
TAGS="base"
if [[ ${{ matrix.network }} == "luksoTestnet"]]; then
TAGS+=",standard"
fi
- name: Deploy contracts on 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 mainnet
run: npx hardhat verify-all --network ${{ matrix.network }}