Skip to content

Commit

Permalink
add an extra check (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekard0 authored Jun 15, 2023
1 parent 5ae9b0d commit 6b0671b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/contracts/deploy/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ export async function getContractAddress(
} catch (e) {}

try {
if (!hre.testingFork.osxVersion) {
console.log('==========================');
console.log('Warning: osxVersion is not set');
console.log('==========================');
}

// Try to import the specific active contracts for the given OSx version
const osxVersions = require(`@aragon/osx-versions`);

Expand Down
3 changes: 2 additions & 1 deletion packages/contracts/deploy/update/to_v1.3.0/99_ManagingDAO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
).daoBase();

const managingDAOAddress = await getContractAddress('managingDAO', hre);

const daoInterface = DAO__factory.connect(
managingDAOAddress,
hre.ethers.provider
);
const upgradeTX = await daoInterface.populateTransaction.upgradeToAndCall(
daoImplementation,
daoInterface.interface.encodeFunctionData('initializeFrom', [[1, 0, 0], ''])
daoInterface.interface.encodeFunctionData('initializeFrom', [[1, 0, 0], []])
);

if (!upgradeTX.to || !upgradeTX.data) {
Expand Down

0 comments on commit 6b0671b

Please sign in to comment.