From ea2fe8f0b7c1200ec98323eca85046023aacef45 Mon Sep 17 00:00:00 2001 From: Claudia Date: Thu, 7 Nov 2024 17:28:27 +0100 Subject: [PATCH 1/3] ci: fix lint --- packages/contracts/src/Multisig.sol | 5 +++-- packages/contracts/test/10_unit-testing/11_plugin.ts | 6 +++--- .../test/30_regression-testing/31_upgradeability.ts | 12 ++++++------ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/contracts/src/Multisig.sol b/packages/contracts/src/Multisig.sol index 5072392c..b4d1a427 100644 --- a/packages/contracts/src/Multisig.sol +++ b/packages/contracts/src/Multisig.sol @@ -188,8 +188,9 @@ contract Multisig is /// for reinitialization. /// @dev WARNING: The contract should only be upgradeable through PSP to ensure that _fromBuild is not /// incorrectly passed, and that the appropriate permissions for the upgrade are properly configured. - /// @param _fromBuild The build version number of the previous implementation contract this upgrade is transitioning from. - /// @param _initData The initialization data to be passed to via `upgradeToAndCall` (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)). + /// @param _fromBuild Build version number of previous implementation contract this upgrade is transitioning from. + /// @param _initData The initialization data to be passed to via `upgradeToAndCall` + /// (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)). function initializeFrom(uint16 _fromBuild, bytes calldata _initData) external reinitializer(2) { if (_fromBuild < 3) { (TargetConfig memory targetConfig, bytes memory pluginMetadata) = abi.decode( diff --git a/packages/contracts/test/10_unit-testing/11_plugin.ts b/packages/contracts/test/10_unit-testing/11_plugin.ts index d425ec95..bddaebe3 100644 --- a/packages/contracts/test/10_unit-testing/11_plugin.ts +++ b/packages/contracts/test/10_unit-testing/11_plugin.ts @@ -195,7 +195,7 @@ async function fixture(): Promise { async function loadFixtureAndGrantCreatePermission(): Promise { const data = await loadFixture(fixture); - const {deployer, alice, dao, initializedPlugin, uninitializedPlugin} = data; + const {deployer, dao, initializedPlugin, uninitializedPlugin} = data; const condition = await new ListedCheckCondition__factory(deployer).deploy( initializedPlugin.address @@ -2113,7 +2113,6 @@ describe('Multisig', function () { alice, bob, initializedPlugin: plugin, - dao, dummyMetadata, dummyActions, } = data; @@ -2823,7 +2822,8 @@ describe('Multisig', function () { const abiA = CustomExecutorMock__factory.abi; const abiB = Multisig__factory.abi; - // @ts-ignore + + // @ts-expect-error correct abi type const mergedABI = abiA.concat(abiB); await dao.grant( diff --git a/packages/contracts/test/30_regression-testing/31_upgradeability.ts b/packages/contracts/test/30_regression-testing/31_upgradeability.ts index debb2dd5..9fdb3405 100644 --- a/packages/contracts/test/30_regression-testing/31_upgradeability.ts +++ b/packages/contracts/test/30_regression-testing/31_upgradeability.ts @@ -72,7 +72,7 @@ describe('Upgrades', () => { // Ensure that on the `upgrade`, `initialize` can not be called. try { await deployAndUpgradeFromToCheck( - // @ts-ignore + // @ts-expect-error correct data type ...data ); throw new Error(''); @@ -81,12 +81,12 @@ describe('Upgrades', () => { } data[8] = 'initializeFrom'; - // @ts-ignore + // @ts-expect-error data[9] = [latestInitializerVersion, encodeDataForUpgrade]; const {proxy, fromImplementation, toImplementation} = await deployAndUpgradeFromToCheck( - // @ts-ignore + // @ts-expect-error correct data type ...data ); @@ -154,7 +154,7 @@ describe('Upgrades', () => { // Ensure that on the `upgrade`, `initialize` can not be called. try { await deployAndUpgradeFromToCheck( - // @ts-ignore + // @ts-expect-error correct data type ...data ); throw new Error(''); @@ -163,12 +163,12 @@ describe('Upgrades', () => { } data[8] = 'initializeFrom'; - // @ts-ignore + // @ts-expect-error types castings will work data[9] = [latestInitializerVersion, encodeDataForUpgrade]; const {proxy, fromImplementation, toImplementation} = await deployAndUpgradeFromToCheck( - // @ts-ignore + // @ts-expect-error correct data type ...data ); From 0c2f48bc795f6f45c16ad28ad55f429f38ee3a34 Mon Sep 17 00:00:00 2001 From: Claudia Date: Thu, 7 Nov 2024 17:28:57 +0100 Subject: [PATCH 2/3] ci: fix prettier format --- packages/contracts/test/10_unit-testing/11_plugin.ts | 2 +- .../test/20_integration-testing/22_setup-processing.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/contracts/test/10_unit-testing/11_plugin.ts b/packages/contracts/test/10_unit-testing/11_plugin.ts index bddaebe3..e7e82270 100644 --- a/packages/contracts/test/10_unit-testing/11_plugin.ts +++ b/packages/contracts/test/10_unit-testing/11_plugin.ts @@ -2822,7 +2822,7 @@ describe('Multisig', function () { const abiA = CustomExecutorMock__factory.abi; const abiB = Multisig__factory.abi; - + // @ts-expect-error correct abi type const mergedABI = abiA.concat(abiB); diff --git a/packages/contracts/test/20_integration-testing/22_setup-processing.ts b/packages/contracts/test/20_integration-testing/22_setup-processing.ts index 674175f1..20d1c4c1 100644 --- a/packages/contracts/test/20_integration-testing/22_setup-processing.ts +++ b/packages/contracts/test/20_integration-testing/22_setup-processing.ts @@ -1,5 +1,6 @@ import {METADATA, VERSION} from '../../plugin-settings'; import {MultisigSetup, Multisig__factory} from '../../typechain'; +import {MultisigSetup__factory} from '../../typechain'; import {getProductionNetworkName, findPluginRepo} from '../../utils/helpers'; import { Operation, @@ -30,8 +31,6 @@ import { PluginSetupProcessor__factory, DAO, } from '@aragon/osx-ethers'; -import {MultisigSetup__factory} from '../../typechain'; - import {loadFixture} from '@nomicfoundation/hardhat-network-helpers'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {expect} from 'chai'; From 726e59ddaaf8d7b0e63e982a58f4dce34f049a34 Mon Sep 17 00:00:00 2001 From: Claudia Date: Thu, 7 Nov 2024 17:43:56 +0100 Subject: [PATCH 3/3] fix lint --- .../contracts/test/30_regression-testing/31_upgradeability.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contracts/test/30_regression-testing/31_upgradeability.ts b/packages/contracts/test/30_regression-testing/31_upgradeability.ts index 9fdb3405..b36926cf 100644 --- a/packages/contracts/test/30_regression-testing/31_upgradeability.ts +++ b/packages/contracts/test/30_regression-testing/31_upgradeability.ts @@ -81,7 +81,7 @@ describe('Upgrades', () => { } data[8] = 'initializeFrom'; - // @ts-expect-error + // @ts-expect-error types castings will work data[9] = [latestInitializerVersion, encodeDataForUpgrade]; const {proxy, fromImplementation, toImplementation} =