Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Fix failing CI - update all func params expecting SignerWithAddress to SignerWithAddress | Wallet #372

Merged
merged 1 commit into from
Sep 8, 2023
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 tasks/helpers/proposeCharityApplication.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {BytesLike} from "ethers";
import {BytesLike, Wallet} from "ethers";
import {CharityApplications__factory} from "typechain-types";
import {AccountMessages} from "typechain-types/contracts/multisigs/CharityApplications";
import {filterEvents, logger} from "utils";
Expand All @@ -14,7 +14,7 @@ import {filterEvents, logger} from "utils";
*/
export async function proposeCharityApplication(
charAppsAddress: string,
owner: SignerWithAddress,
owner: SignerWithAddress | Wallet,
applicationRequest: AccountMessages.CreateEndowmentRequestStruct,
metadata: BytesLike = "0x"
): Promise<boolean> {
Expand Down
5 changes: 3 additions & 2 deletions tasks/manage/changeProxyAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from "typechain-types";
import {AddressObj, confirmAction, getAddresses, getProxyAdminOwner, logger} from "utils";
import {submitMultiSigTx} from "../helpers";
import {Wallet} from "ethers";

type TaskArgs = {
apTeamSignerPkey?: string;
Expand Down Expand Up @@ -62,7 +63,7 @@ task("manage:changeProxyAdmin", "Will update the proxy admin for all proxy contr
});

async function transferAccountOwnership(
proxyAdminOwner: SignerWithAddress,
proxyAdminOwner: SignerWithAddress | Wallet,
newProxyAdmin: string,
addresses: AddressObj,
hre: HardhatRuntimeEnvironment
Expand Down Expand Up @@ -97,7 +98,7 @@ async function transferAccountOwnership(
* will never revert, but will nevertheless NOT update the admin.
*/
async function changeProxiesAdmin(
proxyAdminOwner: SignerWithAddress,
proxyAdminOwner: SignerWithAddress | Wallet,
newProxyAdmin: string,
addresses: AddressObj,
hre: HardhatRuntimeEnvironment
Expand Down
3 changes: 2 additions & 1 deletion tasks/upgrade/upgradeFacets/cutDiamond.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import {submitMultiSigTx} from "tasks/helpers";
import {DiamondCutFacet__factory, DiamondInit__factory} from "typechain-types";
import {logger} from "utils";
import {FacetCut} from "./types";
import {Wallet} from "ethers";

export default async function cutDiamond(
diamondAddress: string,
proxyAdminMultiSig: string,
proxyAdmin: SignerWithAddress,
proxyAdmin: SignerWithAddress | Wallet,
facetCuts: FacetCut[]
) {
logger.out("Updating Diamond with new facet addresses...");
Expand Down
3 changes: 2 additions & 1 deletion test/core/IndexFund.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {FakeContract, smock} from "@defi-wonderland/smock";
import {impersonateAccount, setBalance, time} from "@nomicfoundation/hardhat-network-helpers";
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect} from "chai";
import {Wallet} from "ethers";
import hre from "hardhat";
import {deployFacetAsProxy} from "test/core/accounts/utils/deployTestFacet";
import {DEFAULT_CHARITY_ENDOWMENT, DEFAULT_REGISTRAR_CONFIG, wait} from "test/utils";
Expand All @@ -28,7 +29,7 @@ describe("IndexFund", function () {
const MAX_ENDOWMENT_MEMBERS = 10;

let owner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let user: SignerWithAddress;

let registrar: FakeContract<Registrar>;
Expand Down
3 changes: 2 additions & 1 deletion test/core/accounts/AccountsAllowance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import {genWallet, getProxyAdminOwner, getSigners} from "utils";
import {deployFacetAsProxy} from "./utils";
import {time} from "@nomicfoundation/hardhat-network-helpers";
import {Wallet} from "ethers";

describe("AccountsAllowance", function () {
const {ethers} = hre;
Expand All @@ -21,7 +22,7 @@ describe("AccountsAllowance", function () {

let accOwner: SignerWithAddress;
let endowOwner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let user: SignerWithAddress;

let facet: AccountsAllowance;
Expand Down
4 changes: 2 additions & 2 deletions test/core/accounts/AccountsCreateEndowment.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {FakeContract, smock} from "@defi-wonderland/smock";
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect, use} from "chai";
import {BigNumber} from "ethers";
import {BigNumber, Wallet} from "ethers";
import hre from "hardhat";
import {DEFAULT_REGISTRAR_CONFIG, wait} from "test/utils";
import {
Expand Down Expand Up @@ -30,7 +30,7 @@ describe("AccountsCreateEndowment", function () {
const expectedNextAccountId = 1;

let owner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let charityApplications: SignerWithAddress;
let facet: AccountsCreateEndowment;
let state: TestFacetProxyContract;
Expand Down
4 changes: 2 additions & 2 deletions test/core/accounts/AccountsDepositWithdrawEndowments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {FakeContract, smock} from "@defi-wonderland/smock";
import {impersonateAccount, setBalance, time} from "@nomicfoundation/hardhat-network-helpers";
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect, use} from "chai";
import {BigNumber} from "ethers";
import {BigNumber, Wallet} from "ethers";
import hre from "hardhat";
import {DEFAULT_CHARITY_ENDOWMENT, DEFAULT_REGISTRAR_CONFIG, wait} from "test/utils";
import {
Expand Down Expand Up @@ -53,7 +53,7 @@ describe("AccountsDepositWithdrawEndowments", function () {
};

let accOwner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let endowOwner: SignerWithAddress;
let indexFund: SignerWithAddress;

Expand Down
3 changes: 2 additions & 1 deletion test/core/accounts/AccountsGasManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ import {
import {VaultType} from "types";
import {getProxyAdminOwner, getSigners} from "utils";
import {deployFacetAsProxy} from "./utils";
import {Wallet} from "ethers";

use(smock.matchers);

describe("AccountsGasManager", function () {
let owner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let user: SignerWithAddress;
let impl: AccountsGasManager;
let token: FakeContract<IERC20>;
Expand Down
4 changes: 2 additions & 2 deletions test/core/accounts/AccountsQueryEndowments.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect} from "chai";
import {BigNumber} from "ethers";
import {BigNumber, Wallet} from "ethers";
import hre from "hardhat";
import {DEFAULT_ACCOUNTS_CONFIG, DEFAULT_CHARITY_ENDOWMENT, wait} from "test/utils";
import {
Expand All @@ -17,7 +17,7 @@ describe("AccountsQueryEndowments", function () {
const {ethers} = hre;

let owner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;

let facet: AccountsQueryEndowments;
let state: TestFacetProxyContract;
Expand Down
4 changes: 2 additions & 2 deletions test/core/accounts/AccountsStrategy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {FakeContract, smock} from "@defi-wonderland/smock";
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect, use} from "chai";
import {BigNumber} from "ethers";
import {BigNumber, Wallet} from "ethers";
import hre from "hardhat";
import {
DEFAULT_ACCOUNTS_CONFIG,
Expand Down Expand Up @@ -63,7 +63,7 @@ describe("AccountsStrategy", function () {
const NET_NAME_THAT = "ThatNet";

let owner: SignerWithAddress;
let admin: SignerWithAddress;
let admin: SignerWithAddress | Wallet;
let user: SignerWithAddress;

let gasFwd: FakeContract<GasFwd>;
Expand Down
3 changes: 2 additions & 1 deletion test/core/accounts/AccountsSwapRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ import {
import {VaultType} from "types";
import {genWallet, getProxyAdminOwner, getSigners} from "utils";
import {deployFacetAsProxy} from "./utils";
import {Wallet} from "ethers";

use(smock.matchers);

describe("AccountsSwapRouter", function () {
const {ethers} = hre;
let owner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let user: SignerWithAddress;
let facet: AccountsSwapRouter;
let facetImpl: AccountsSwapRouter;
Expand Down
3 changes: 2 additions & 1 deletion test/core/accounts/AccountsUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import {AccountStorage} from "typechain-types/contracts/test/accounts/TestFacetP
import {EndowmentType} from "types";
import {getProxyAdminOwner, getSigners} from "utils";
import {deployFacetAsProxy} from "./utils";
import {Wallet} from "ethers";

describe("AccountsUpdate", function () {
const {ethers} = hre;

let owner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let user: SignerWithAddress;

let facet: AccountsUpdate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
} from "typechain-types/contracts/test/accounts/TestFacetProxyContract";
import {genWallet, getProxyAdminOwner, getSigners} from "utils";
import {deployFacetAsProxy, updateAllSettings} from "./utils";
import {Wallet} from "ethers";

use(smock.matchers);

Expand All @@ -26,7 +27,7 @@ describe("AccountsUpdateEndowmentSettingsController", function () {
const normalEndowId = 2;

let owner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let endowOwner: SignerWithAddress;

let facet: AccountsUpdateEndowmentSettingsController;
Expand Down
4 changes: 2 additions & 2 deletions test/core/accounts/AccountsUpdateEndowments.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {smock} from "@defi-wonderland/smock";
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect, use} from "chai";
import {BigNumberish} from "ethers";
import {BigNumberish, Wallet} from "ethers";
import hre from "hardhat";
import {DEFAULT_CHARITY_ENDOWMENT, wait} from "test/utils";
import {
Expand Down Expand Up @@ -30,7 +30,7 @@ describe("AccountsUpdateEndowments", function () {
const normalEndowId = 2;

let accOwner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let endowOwner: SignerWithAddress;
let delegate: SignerWithAddress;

Expand Down
3 changes: 2 additions & 1 deletion test/core/accounts/AccountsUpdateStatusEndowments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {AccountStorage} from "typechain-types/contracts/test/accounts/TestFacetP
import {BeneficiaryEnum, EndowmentType} from "types";
import {genWallet, getProxyAdminOwner, getSigners} from "utils";
import {deployFacetAsProxy} from "./utils";
import {Wallet} from "ethers";

use(smock.matchers);

Expand All @@ -43,7 +44,7 @@ describe("AccountsUpdateStatusEndowments", function () {
);

let accOwner: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let endowOwner: SignerWithAddress;

let facet: AccountsUpdateStatusEndowments;
Expand Down
5 changes: 3 additions & 2 deletions test/core/accounts/utils/deployTestFacet.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {Wallet} from "ethers";
import {HardhatRuntimeEnvironment} from "hardhat/types";
import {TestFacetProxyContract__factory, TestFacetProxyContract} from "typechain-types";
export async function deployFacetAsProxy(
hre: HardhatRuntimeEnvironment,
deployer: SignerWithAddress,
proxyAdmin: SignerWithAddress,
deployer: SignerWithAddress | Wallet,
proxyAdmin: SignerWithAddress | Wallet,
implementation: string
): Promise<TestFacetProxyContract> {
let Proxy = new TestFacetProxyContract__factory(deployer);
Expand Down
5 changes: 3 additions & 2 deletions test/core/gasFwd/GasFwd.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {FakeContract, smock} from "@defi-wonderland/smock";
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect, use} from "chai";
import {Wallet} from "ethers";
import hre from "hardhat";
import {
GasFwd,
Expand All @@ -17,15 +18,15 @@ describe("GasFwd", function () {
const BALANCE = 1000;

let owner: SignerWithAddress;
let admin: SignerWithAddress;
let admin: SignerWithAddress | Wallet;
let accounts: SignerWithAddress;

let token: FakeContract<IERC20>;
let gasFwd: GasFwd;

async function deployGasFwdAsProxy(
owner: SignerWithAddress,
admin: SignerWithAddress,
admin: SignerWithAddress | Wallet,
accounts: SignerWithAddress
): Promise<GasFwd> {
let GasFwd = new GasFwd__factory(admin);
Expand Down
5 changes: 3 additions & 2 deletions test/core/gasFwd/GasFwdFactory.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {FakeContract, smock} from "@defi-wonderland/smock";
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect, use} from "chai";
import {Wallet} from "ethers";
import hre from "hardhat";
import {DEFAULT_REGISTRAR_CONFIG} from "test/utils";
import {
Expand All @@ -17,13 +18,13 @@ use(smock.matchers);
describe("GasFwdFactory", function () {
const {ethers} = hre;
let owner: SignerWithAddress;
let admin: SignerWithAddress;
let admin: SignerWithAddress | Wallet;
let user: SignerWithAddress;
let registrarFake: FakeContract<Registrar>;

async function deployGasFwdFactory(
owner: SignerWithAddress,
admin: SignerWithAddress,
admin: SignerWithAddress | Wallet,
registrar: string
): Promise<GasFwdFactory> {
let GasFwd = new GasFwd__factory(admin);
Expand Down
5 changes: 3 additions & 2 deletions test/core/router/Router.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {FakeContract, smock} from "@defi-wonderland/smock";
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect, use} from "chai";
import {Wallet} from "ethers";
import hre from "hardhat";
import {
DEFAULT_ACTION_DATA,
Expand Down Expand Up @@ -32,7 +33,7 @@ use(smock.matchers);
describe("Router", function () {
const {ethers} = hre;
let owner: SignerWithAddress;
let admin: SignerWithAddress;
let admin: SignerWithAddress | Wallet;
let user: SignerWithAddress;
let collector: SignerWithAddress;
let deadAddr = "0x000000000000000000000000000000000000dead";
Expand Down Expand Up @@ -66,7 +67,7 @@ describe("Router", function () {
return Router__factory.connect(RouterProxy.address, owner);
}

async function upgradeProxy(signer: SignerWithAddress, routerProxy: string) {
async function upgradeProxy(signer: SignerWithAddress | Wallet, routerProxy: string) {
const RouterFactory = new Router__factory(owner);
const RouterImpl = await RouterFactory.deploy();
await RouterImpl.deployed();
Expand Down
4 changes: 2 additions & 2 deletions test/core/vault/Vault.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {FakeContract, smock} from "@defi-wonderland/smock";
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect, use} from "chai";
import {BigNumber} from "ethers";
import {BigNumber, Wallet} from "ethers";
import hre from "hardhat";
import {
DEFAULT_NETWORK,
Expand Down Expand Up @@ -38,7 +38,7 @@ describe("Vault", function () {

let owner: SignerWithAddress;
let user: SignerWithAddress;
let admin: SignerWithAddress;
let admin: SignerWithAddress | Wallet;
let collector: SignerWithAddress;

async function deployVault(
Expand Down
4 changes: 2 additions & 2 deletions test/halo/Halo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {expect} from "chai";
import {BigNumber} from "ethers";
import {BigNumber, Wallet} from "ethers";
import hre from "hardhat";
import {Halo, Halo__factory} from "typechain-types";
import {getProxyAdminOwner, getSigners} from "utils";
Expand All @@ -9,7 +9,7 @@ describe("Halo token", function () {
let Halo: Halo__factory;

let deployer: SignerWithAddress;
let proxyAdmin: SignerWithAddress;
let proxyAdmin: SignerWithAddress | Wallet;
let user: SignerWithAddress;

describe("upon Deployment", async function () {
Expand Down
3 changes: 2 additions & 1 deletion utils/signers/getCharityApplicationsOwner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {HardhatRuntimeEnvironment} from "hardhat/types";
import {connectSignerFromPkey} from "./connectSignerFromPkey";
import {getSigners} from "./getSigners";
import {Wallet} from "ethers";

export async function getCharityApplicationsOwner(
hre: HardhatRuntimeEnvironment,
pkey?: string
): Promise<SignerWithAddress> {
): Promise<SignerWithAddress | Wallet> {
if (pkey) {
return await connectSignerFromPkey(pkey, hre);
}
Expand Down
Loading