diff --git a/test-ts/default-strategy.test.ts b/test-ts/default-strategy.test.ts index 038aeb9..24601aa 100644 --- a/test-ts/default-strategy.test.ts +++ b/test-ts/default-strategy.test.ts @@ -43,7 +43,6 @@ import { electGroup, electMockValidatorGroupsAndUpdate, registerValidatorAndAddToGroupMembers, - registerValidatorAndOnlyAffiliateToGroup, registerValidatorGroup, removeMembersFromGroup, updateGroupSlashingMultiplier, diff --git a/test-ts/proxy-deploy.test.ts b/test-ts/proxy-deploy.test.ts index 85269f0..c858363 100644 --- a/test-ts/proxy-deploy.test.ts +++ b/test-ts/proxy-deploy.test.ts @@ -118,12 +118,14 @@ describe("Contract deployed via proxy", () => { const newImplementation = (await contractFactory.deploy()).address; const theProxy = await hre.ethers.getContract(`${test.contractName}_Proxy`); - await expect(submitAndExecuteMultiSigProposal( - [contract.address], - ["0"], - [contract.interface.encodeFunctionData("upgradeTo", [newImplementation])], - multisigOwner0 - )).to.emit(theProxy, "Upgraded"); + await expect( + submitAndExecuteMultiSigProposal( + [contract.address], + ["0"], + [contract.interface.encodeFunctionData("upgradeTo", [newImplementation])], + multisigOwner0 + ) + ).to.emit(theProxy, "Upgraded"); }); }); diff --git a/test-ts/utils-interfaces.ts b/test-ts/utils-interfaces.ts index 0273451..867cf00 100644 --- a/test-ts/utils-interfaces.ts +++ b/test-ts/utils-interfaces.ts @@ -1,12 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable no-unused-vars */ -import { - BaseContract, - BigNumber as EthersBigNumber, - CallOverrides, - ContractTransaction, - Overrides, -} from "ethers"; +import { BaseContract, BigNumber as EthersBigNumber, ContractTransaction, Overrides } from "ethers"; export interface RebalanceContract extends BaseContract { rebalance( diff --git a/test-ts/utils-multisig.ts b/test-ts/utils-multisig.ts index 477286b..417d4f8 100644 --- a/test-ts/utils-multisig.ts +++ b/test-ts/utils-multisig.ts @@ -1,6 +1,6 @@ -import hre from "hardhat"; import { BigNumberish, ContractTransaction, Signer } from "ethers"; - +import hre from "hardhat"; +import { ProposalConfirmedEvent } from "../typechain-types/MultiSig"; import { timeTravel } from "./utils"; export async function submitAndExecuteMultiSigProposal( @@ -10,13 +10,11 @@ export async function submitAndExecuteMultiSigProposal( signer: Signer ): Promise { const multiSig = await hre.ethers.getContract("MultiSig"); - const tx = await multiSig.connect(signer).submitProposal( - destinations, - values, - payloads - ); + const tx = await multiSig.connect(signer).submitProposal(destinations, values, payloads); const receipt = await tx.wait(); - const event = receipt.events?.find((event: any) => event.event === "ProposalConfirmed"); + const event = receipt.events?.find( + (event: ProposalConfirmedEvent) => event.event === "ProposalConfirmed" + ); // @ts-ignore - proposalId not a compiled member of event.args const proposalId = event?.args.proposalId; await timeTravel((await multiSig.delay()).toNumber()); diff --git a/test-ts/utils-validators.ts b/test-ts/utils-validators.ts index 69652fe..fa1ec3b 100644 --- a/test-ts/utils-validators.ts +++ b/test-ts/utils-validators.ts @@ -20,9 +20,7 @@ import { MIN_VALIDATOR_LOCKED_CELO, timeTravel, } from "./utils"; -import { - submitAndExecuteMultiSigProposal, -} from "./utils-multisig"; +import { submitAndExecuteMultiSigProposal } from "./utils-multisig"; // Locks the required CELO and registers as a validator group. export async function registerValidatorGroup(account: SignerWithAddress, members = 1) { diff --git a/test-ts/utils.ts b/test-ts/utils.ts index 0871c1c..5e9a9d6 100644 --- a/test-ts/utils.ts +++ b/test-ts/utils.ts @@ -4,7 +4,7 @@ import { LockedGoldWrapper } from "@celo/contractkit/lib/wrappers/LockedGold"; import { ValidatorsWrapper } from "@celo/contractkit/lib/wrappers/Validators"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { default as BigNumberJs } from "bignumber.js"; -import { BigNumber as EthersBigNumber, Contract, Wallet } from "ethers"; +import { BigNumber as EthersBigNumber, Wallet } from "ethers"; import { formatEther, parseUnits } from "ethers/lib/utils"; import hre, { ethers } from "hardhat"; import Web3 from "web3"; @@ -24,11 +24,7 @@ import { MockDefaultStrategy } from "../typechain-types/MockDefaultStrategy"; import { MockGroupHealth } from "../typechain-types/MockGroupHealth"; import { SpecificGroupStrategy } from "../typechain-types/SpecificGroupStrategy"; import electionContractData from "./code/abi/electionAbi.json"; -import { - ExpectVsReal, - OrderedGroup, - RebalanceContract, -} from "./utils-interfaces"; +import { ExpectVsReal, OrderedGroup, RebalanceContract } from "./utils-interfaces"; export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; export const REGISTRY_ADDRESS = "0x000000000000000000000000000000000000ce10"; @@ -252,7 +248,9 @@ export async function setGovernanceConcurrentProposals(count: number) { }); } -export async function getDefaultGroups(defaultStrategy: DefaultStrategy | MockDefaultStrategy): Promise { +export async function getDefaultGroups( + defaultStrategy: DefaultStrategy | MockDefaultStrategy +): Promise { const activeGroupsLengthPromise = defaultStrategy.getNumberOfGroups(); let [key] = await defaultStrategy.getGroupsHead(); @@ -441,7 +439,7 @@ export async function upgradeToMockGroupHealthE2E( multisigOwner.address, [groupHealthContract.address], ["0"], - [groupHealthContract.interface.encodeFunctionData("upgradeTo", [mockGroupHealth.address])], + [groupHealthContract.interface.encodeFunctionData("upgradeTo", [mockGroupHealth.address])] ); return mockGroupHealthFactory.attach(groupHealthContract.address);