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

fix: deploy script #16

Merged
merged 3 commits into from
Nov 5, 2024
Merged
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
4 changes: 2 additions & 2 deletions packages/contracts/deploy/20_new_version/23_publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
.createVersion(
VERSION.release,
setup.address,
ethers.utils.hexlify(ethers.utils.toUtf8Bytes(buildMetadataURI)),
ethers.utils.hexlify(ethers.utils.toUtf8Bytes(releaseMetadataURI))
buildMetadataURI,
releaseMetadataURI
);

await tx.wait();
Expand Down
5 changes: 5 additions & 0 deletions packages/contracts/deploy/30_upgrade_repo/_common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -104,3 +105,7 @@ export const skipUpgrade = async (hre: HardhatRuntimeEnvironment) => {

return false;
};

const func: DeployFunction = async function () {};
export default func;
func.tags = ['UpgradeRepo'];
Original file line number Diff line number Diff line change
Expand Up @@ -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}.`
);
Expand All @@ -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`);
};
Expand Down
12 changes: 7 additions & 5 deletions packages/contracts/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
SupportedNetworks,
getLatestNetworkDeployment,
getNetworkNameByAlias,
getPluginEnsDomain,
} from '@aragon/osx-commons-configs';
import {UnsupportedNetworkError, findEvent} from '@aragon/osx-commons-sdk';
import {
Expand Down Expand Up @@ -54,12 +55,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(
Expand Down
Loading