Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use hardhat deploy plugin tags property in hardhat config instead of checks in workflow #960

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions .github/workflows/deploy-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,10 @@ jobs:
- 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

# The array of `tags` under each network in `hardhat.config.ts` specify which contracts to deploy
- 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
- name: Verify deployed contracts on network
run: npx hardhat verify-all --network ${{ matrix.network }}
1 change: 0 additions & 1 deletion deploy/007_deploy_base_key_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const deployBaseKeyManagerDeterministic: DeployFunction = async ({
await deploy('LSP6KeyManagerInit', {
from: deployer,
log: true,
gasLimit: 5_000_000,
deterministicDeployment: SALT,
});
};
Expand Down
7 changes: 7 additions & 0 deletions packages/lsp-smart-contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
url: 'https://rpc.testnet.lukso.network',
chainId: 4201,
saveDeployments: true,
tags: ['standard', 'base']

Check failure on line 88 in packages/lsp-smart-contracts/hardhat.config.ts

View workflow job for this annotation

GitHub Actions / build-lint-test

Insert `,`
};

if (process.env.CONTRACT_VERIFICATION_TESTNET_PK !== undefined) {
Expand All @@ -100,6 +101,12 @@
url: 'https://rpc.lukso.gateway.fm',
chainId: 42,
saveDeployments: true,
// 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,
//

Check failure on line 107 in packages/lsp-smart-contracts/hardhat.config.ts

View workflow job for this annotation

GitHub Actions / build-lint-test

Delete `·`
// therefore we only need the base contracts to be deployed on mainnet.
tags: ['base']

Check failure on line 109 in packages/lsp-smart-contracts/hardhat.config.ts

View workflow job for this annotation

GitHub Actions / build-lint-test

Insert `,`
};

if (process.env.CONTRACT_VERIFICATION_MAINNET_PK !== undefined) {
Expand Down
Loading