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: lint and formating #30

Merged
merged 3 commits into from
Nov 7, 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
5 changes: 3 additions & 2 deletions packages/contracts/src/Multisig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions packages/contracts/test/10_unit-testing/11_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ async function fixture(): Promise<FixtureResult> {

async function loadFixtureAndGrantCreatePermission(): Promise<FixtureResult> {
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
Expand Down Expand Up @@ -2113,7 +2113,6 @@ describe('Multisig', function () {
alice,
bob,
initializedPlugin: plugin,
dao,
dummyMetadata,
dummyActions,
} = data;
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand All @@ -81,12 +81,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
);

Expand Down Expand Up @@ -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('');
Expand All @@ -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
);

Expand Down
Loading