Merge pull request #953 from lukso-network/readme #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 }} |