Skip to content

Merge pull request #990 from lukso-network/build/fix-package-lock #105

Merge pull request #990 from lukso-network/build/fix-package-lock

Merge pull request #990 from lukso-network/build/fix-package-lock #105

Workflow file for this run

# 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:
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 }}