Skip to content

Merge pull request #643 from lukso-network/develop #45

Merge pull request #643 from lukso-network/develop

Merge pull request #643 from lukso-network/develop #45

Workflow file for this run

# This workflow deploys and verify the lsp-smart-contracts and verify them on LUKSO Testnet.
name: Deploy + Verify Contracts on Testnet
env:
CONTRACT_VERIFICATION_TESTNET_PK: ${{ secrets.CONTRACT_VERIFICATION_TESTNET_PK }}
DEPLOYER_ADDRESS: "0x983aBC616f2442bAB7a917E6bb8660Df8b01F3bF"
on:
workflow_dispatch:
push:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js '16.15.0'
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: "npm"
- name: Install dependencies
run: npm ci
# This will also generate the Typechain types used by the Chai tests
- name: Build contract artifacts
run: npx hardhat compile
- name: cache dependencies + build
uses: actions/cache@v2
with:
path: |
artifacts
node_modules
types
contracts.ts
key: ${{ github.run_id }}
deploy-verify:
runs-on: ubuntu-latest
needs: [build]
strategy:
# run each base contract verification one after the other to prevent submitting multiple transactions at the same time with the same nonce.
max-parallel: 1
matrix:
contracts: [
# Standard contracts
"UniversalProfile",
"LSP6KeyManager",
"LSP1UniversalReceiverDelegateUP",
"LSP1UniversalReceiverDelegateVault",
"LSP7Mintable",
"LSP8Mintable",
"LSP9Vault",
# Base contracts (for proxies)
"UniversalProfileInit",
"LSP6KeyManagerInit",
"LSP7MintableInit",
"LSP8MintableInit",
"LSP9VaultInit",
]
steps:
- uses: actions/checkout@v3
- name: restore cache
uses: actions/cache@v2
id: "build-cache"
with:
path: |
artifacts
node_modules
types
contracts.ts
key: ${{ github.run_id }}
- name: Use Node.js v16
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: "npm"
- name: Install dependencies
if: steps.build-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Verify Deployer Balance
run: npx ts-node ./scripts/ci/check-deployer-balance.ts
- name: Deploy + Verify ${{ matrix.contracts }} on Testnet
run: sh ./scripts/ci/deploy-verify.sh -n luksoTestnet -c ${{ matrix.contracts }}