diff --git a/packages/contracts/deploy/20_new_version/23_publish.ts b/packages/contracts/deploy/20_new_version/23_publish.ts index 28020a74..fb8af313 100644 --- a/packages/contracts/deploy/20_new_version/23_publish.ts +++ b/packages/contracts/deploy/20_new_version/23_publish.ts @@ -142,6 +142,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { createVersion: { _release: VERSION.release, _pluginSetup: setup.address, + _buildMetadata: buildMetadataURI, + _releaseMetadata: releaseMetadataURI, _buildMetadata: ethers.utils.hexlify( ethers.utils.toUtf8Bytes(buildMetadataURI) ), diff --git a/packages/contracts/deploy/30_upgrade_repo/_common.ts b/packages/contracts/deploy/30_upgrade_repo/_common.ts index f0b1da8b..1070dcec 100644 --- a/packages/contracts/deploy/30_upgrade_repo/_common.ts +++ b/packages/contracts/deploy/30_upgrade_repo/_common.ts @@ -6,6 +6,7 @@ import { import {UnsupportedNetworkError} from '@aragon/osx-commons-sdk'; import {PluginRepo, PluginRepo__factory} from '@aragon/osx-ethers'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; import path from 'path'; @@ -104,3 +105,7 @@ export const skipUpgrade = async (hre: HardhatRuntimeEnvironment) => { return false; }; + +const func: DeployFunction = async function () {}; +export default func; +func.tags = ['UpgradeRepo']; diff --git a/packages/contracts/deploy/50_verification/51_verify_contracts.ts b/packages/contracts/deploy/50_verification/51_verify_contracts.ts index e46c331e..5417d367 100644 --- a/packages/contracts/deploy/50_verification/51_verify_contracts.ts +++ b/packages/contracts/deploy/50_verification/51_verify_contracts.ts @@ -9,7 +9,7 @@ import path from 'path'; * @param {HardhatRuntimeEnvironment} hre */ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - hre.aragonToVerifyContracts.forEach(async contract => { + for (const contract of hre.aragonToVerifyContracts) { console.log( `Verifying address ${contract.address} with constructor argument ${contract.args}.` ); @@ -21,7 +21,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { `Delaying 6s, so we don't reach Etherscan's Max rate limit of 1/5s.` ); await new Promise(resolve => setTimeout(resolve, 6000)); - }); + } console.log(`\n${'-'.repeat(60)}\n`); }; diff --git a/packages/contracts/utils/helpers.ts b/packages/contracts/utils/helpers.ts index 519eced1..bb5dafaf 100644 --- a/packages/contracts/utils/helpers.ts +++ b/packages/contracts/utils/helpers.ts @@ -3,6 +3,7 @@ import { SupportedNetworks, getLatestNetworkDeployment, getNetworkNameByAlias, + getPluginEnsDomain, } from '@aragon/osx-commons-configs'; import {UnsupportedNetworkError, findEvent} from '@aragon/osx-commons-sdk'; import { @@ -53,12 +54,13 @@ export function getProductionNetworkName( } export function pluginEnsDomain(hre: HardhatRuntimeEnvironment): string { - const network = getProductionNetworkName(hre); - if (network === SupportedNetworks.SEPOLIA) { - return `${PLUGIN_REPO_ENS_SUBDOMAIN_NAME}.plugin.aragon-dao.eth`; - } else { - return `${PLUGIN_REPO_ENS_SUBDOMAIN_NAME}.plugin.dao.eth`; + const network = getNetworkNameByAlias(getProductionNetworkName(hre)); + if (network === null) { + throw new UnsupportedNetworkError(getProductionNetworkName(hre)); } + + const pluginEnsDomain = getPluginEnsDomain(network); + return `${PLUGIN_REPO_ENS_SUBDOMAIN_NAME}.${pluginEnsDomain}`; } export async function findPluginRepo(