diff --git a/contract-address.json b/contract-address.json index 76073aebf..991a85bbf 100644 --- a/contract-address.json +++ b/contract-address.json @@ -129,25 +129,161 @@ "swapRouter": "" } }, + "137": { + "accounts": { + "diamond": "0xf3f48A60EbA732aC2993e11eC93eAD782Ab237e4", + "facets": { + "accountsDepositWithdrawEndowments": "0xa4341A6Dc7267D6226FAEf9C35Af3cfAd46b624E", + "accountsAllowance": "0x96ca668AEecf5A515d402fE1Ca0C5B664Dfc92d2", + "accountsCreateEndowment": "0xD81fBBD072E14A0e87Fb0C832F62Ae1134C79571", + "accountsGasManager": "0xf1475dDa2EC44187DBC1D575696ed1D094D50Ef8", + "accountsQueryEndowments": "0xBEeED6a8eC2EB9De143d6A9907aa2f153BE7E470", + "accountsStrategy": "0x3eF2b7D43A746E26e8985DD2057BA77C7ba7471a", + "accountsSwapRouter": "0x660Af60D9fc671eA77F49f3Eb82f5639afeb9C26", + "accountsUpdate": "0xfb988Ee5Cf9c4391a3E1993cC0472910805Ca2AC", + "accountsUpdateEndowments": "0x214665939fb75B0A38511a35D09fF3c566fEeC26", + "accountsUpdateEndowmentSettingsController": "0xe22e0DCa96ef125891C6bbe9f40A74EFF5fd6994", + "accountsUpdateStatusEndowments": "0xe0061c9850Bb89Ed46DA27C752697A3A800A0c7C", + "diamondCutFacet": "0xdF7e6f2144f8D933dE22d9c8ba21936e8dD30011", + "diamondInitFacet": "0xc0bAe01FEeeDCD828880f2E6373b7fC02f677780", + "diamondLoupeFacet": "0x309F249c3aBE5B794199844b31CcBF946e514E14", + "ownershipFacet": "0xfF92B82eB6a43b3ab5a52eB11050f2Fdab0ba362" + } + }, + "axelar": { + "gasService": "0x109641D919da899C7Bd1Ce27413D0C02b3Bb611d", + "gateway": "0x109641D919da899C7Bd1Ce27413D0C02b3Bb611d" + }, + "fundraising": { + "implementation": "", + "proxy": "" + }, + "gasFwd": { + "factory": "0xE592B0Cb837c2a227a92D5D34386b73Ca6EA8714", + "implementation": "0xAFE593B5005232dEDA257c1Ffe8bAD25423A60eA" + }, + "giftcards": { + "implementation": "", + "proxy": "" + }, + "goldfinch": { + "liquidVault": "", + "lockedVault": "" + }, + "halo": { + "airdrop": { + "implementation": "", + "proxy": "" + }, + "collector": { + "implementation": "", + "proxy": "" + }, + "community": { + "implementation": "", + "proxy": "" + }, + "distributor": { + "implementation": "", + "proxy": "" + }, + "erc20Upgrade": { + "implementation": "", + "proxy": "" + }, + "gov": { + "implementation": "", + "proxy": "" + }, + "govHodler": { + "implementation": "", + "proxy": "" + }, + "staking": { + "implementation": "", + "proxy": "" + }, + "timelock": { + "implementation": "", + "proxy": "" + }, + "token": "", + "vesting": { + "implementation": "", + "proxy": "" + }, + "votingERC20": { + "implementation": "", + "proxy": "" + } + }, + "indexFund": { + "implementation": "0x0C28aAB755c2Ce2c182B9abCdbF482f5C63970E3", + "proxy": "0x61220f6977595ce33DccbcFdE68B8641Aca08F81" + }, + "multiSig": { + "charityApplications": { + "implementation": "0x861492926cC1102b05A767a34Cf777295B8Ab68F", + "proxy": "0x723ca90Ab7A2778F8D8bAc07c789cA989909367e" + }, + "apTeam": { + "implementation": "0x11E1952322b142f2bE78f8830a2a5Af935258aD9", + "proxy": "0x52E2657Ab33B5A540D277737374d72CfB75c8D98" + }, + "endowment": { + "emitter": { + "implementation": "0xC3769fDb11C6c76c0aD873E3C28ad539C1925f87", + "proxy": "0x1411A8Be58c84d1351f679581d388A34790ce6AD" + }, + "factory": "0x5A050E9349F5b179c8303529fAD9B8b215389454", + "implementation": "0x3260DDAd913eb4f6C5c59806344A4de0199e0cb1" + }, + "proxyAdmin": "0x1f18bfBA95AA3b6A6872fFd77491a27f5BD73Bb9" + }, + "registrar": { + "implementation": "0x7762cC8C23056112B5DD52Ee34E167705f2320a0", + "proxy": "0xE43146c332603072F11ca0c191910F613B1D096F" + }, + "router": { + "implementation": "0x962cc5c05200b277Fb956096e8fc54E3CC4c3209", + "proxy": "0xAEBEAB403Fc056701C6B07a14CE08f06D5DD5a72" + }, + "tokens": { + "dai": "", + "halo": "", + "reserveToken": "", + "seedAsset": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + "usdc": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + "wmatic": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270" + }, + "uniswap": { + "factory": "0x1F98431c8aD98523631AE4a59f267346ea31F984", + "swapRouter": "0xE592427A0AEce92De3Edee1F18E0157C05861564" + }, + "vaultEmitter": { + "implementation": "0x6e1F83926e8E37F94660Ae7bE152F6338E7947aA", + "proxy": "0x549c05870A4889bA79B3E5743493932c0fdF34BA" + } + }, "31337": { "accounts": { "diamond": "0xf7C497157c4879A4C6ca9B66CF3911BD2b71E2da", "facets": { - "accountsDepositWithdrawEndowments": "0x486b1C056AC365dD969056C717ab8E7AEd59a178", - "accountsAllowance": "0xAb3aa8BCEA9832CB18153Aa9731E989A289277f7", - "accountsCreateEndowment": "0xb463AFC0b3A499a2D826155fc6E6E73061BEF826", - "accountsGasManager": "0x53557e97deED0DdEEf2404a6A29A415e379051bb", - "accountsQueryEndowments": "0xbF6b148a440acAb936796ad40947C0C33C78639A", - "accountsStrategy": "0xA8b73E610095A61de646eD06334c61b94318df52", - "accountsSwapRouter": "0xacE2a31e8B8d66C24DAea008d1eDaf571369A728", - "accountsUpdate": "0x45CCb6251F3500c7EE3219eE47C213fB239346cB", - "accountsUpdateEndowments": "0x33F76554d1474061482Bfa858f35AFD9BAb4D1C5", - "accountsUpdateEndowmentSettingsController": "0x053d1190081dC68ED544D5A2788878E823F64a69", - "accountsUpdateStatusEndowments": "0x03Bb663AccB9FD14aD3c37B2D66B025bbd4Fc533", + "accountsDepositWithdrawEndowments": "", + "accountsAllowance": "", + "accountsCreateEndowment": "", + "accountsGasManager": "", + "accountsQueryEndowments": "", + "accountsStrategy": "", + "accountsSwapRouter": "", + "accountsUpdate": "", + "accountsUpdateEndowments": "", + "accountsUpdateEndowmentSettingsController": "", + "accountsUpdateStatusEndowments": "", "diamondCutFacet": "0x42f293b5D45C0a949639EE229E4c9acD51DF904D", - "diamondInitFacet": "0x730EEB14F27B5D6132b9BF7D62eF877D89600F55", - "diamondLoupeFacet": "0x22a1B036322472baC663A4d741d87829c30b8E4e", - "ownershipFacet": "0x658E94B5FfBDe68b99203BBbBAef618D36862766" + "diamondInitFacet": "", + "diamondLoupeFacet": "", + "ownershipFacet": "" } }, "axelar": { @@ -159,8 +295,8 @@ "proxy": "" }, "gasFwd": { - "factory": "0xB4B13f54690D297b73291456e027b33aA303f744", - "implementation": "0xbc6Fe0a018266F9F02C0E21cb21388cf1D09a560" + "factory": "", + "implementation": "" }, "giftcards": { "implementation": "", @@ -218,13 +354,13 @@ } }, "indexFund": { - "implementation": "0x9ed0fC3ba80c2c3B443b3dc51597245F840d9D5C", - "proxy": "0x5C680949386aCD7c85FBC6f56413936f091e3f47" + "implementation": "", + "proxy": "" }, "multiSig": { "charityApplications": { - "implementation": "0xBe3865948ba88f479Ca05265E9B59869d99552de", - "proxy": "0x3ab0ADa0d1De810cc6845B7433134554D98Ff39f" + "implementation": "", + "proxy": "" }, "apTeam": { "implementation": "0x5602bAF3002df39FbAA568C0657bBBBB8e84527a", @@ -232,21 +368,21 @@ }, "endowment": { "emitter": { - "implementation": "0x4CfBB8659d6BA2cA8af8c1857b4CE11a88A4B29E", - "proxy": "0xd9Ee17555a04f2E34ea43528628582AC45A6E984" + "implementation": "", + "proxy": "" }, - "factory": "0x790094B9fdC8C8a83507f7Eb275DEe903Ffd71eD", - "implementation": "0x562EcE7daE572a5352D50562C472CBd41402F310" + "factory": "", + "implementation": "" }, "proxyAdmin": "0x1BE9451496bfB6aDcFfbc308b673018a8972AFFE" }, "registrar": { - "implementation": "0x1BE9451496bfB6aDcFfbc308b673018a8972AFFE", - "proxy": "0x2e3c2536E1349e0E18d057f61499Ef64BB4B23E8" + "implementation": "0xfC8caFA21dc76a1065494E213dE9F94E788DaAC9", + "proxy": "0xB2BD05A652973f567aD6472b9FEa29FE293f6cD9" }, "router": { - "implementation": "0x3539f918A787529732465a4ccb89A96FFfb33073", - "proxy": "0x801E1B78732dbEC5B8ACc3EcD24031B4e32aD341" + "implementation": "0x9B1a72BD9efC089935766f7Ebc8779B67C0F7495", + "proxy": "0x8450D449D5Cc73EBf35970d9723e8d214151e702" }, "tokens": { "dai": "", @@ -261,29 +397,29 @@ "swapRouter": "0x40B5D836dBeAf26c652210D8f07169B99E77C994" }, "vaultEmitter": { - "implementation": "0x402e14f3f9118A3745d8554EC4106450fB91aE23", - "proxy": "0x7Eb691CaD47e698642Ac507aC0383d8Ef1A20C7D" + "implementation": "", + "proxy": "" } }, "80001": { "accounts": { - "diamond": "0x543dDFcAFAF31629b46cb8c108633cA8A11F31cc", + "diamond": "0x79E9049566A30E322AFa57621469aF846B59e678", "facets": { - "accountsDepositWithdrawEndowments": "0x0124773BEA450412ce9aA572b7EF3e4535495F01", - "accountsAllowance": "0x193556259E1962Faaa0a9Ac7D69DDeF54eD521d1", - "accountsCreateEndowment": "0xb9B2b1a49020216fC5715AE05132dda968A06023", - "accountsGasManager": "0xe224BcDd0aa37C262C7D9865d6fC9F8974996Ca4", - "accountsQueryEndowments": "0xD1159b23003Db899801022c06dC09C00528fe20A", - "accountsStrategy": "0x51B51fA42802129a1e215300C8bfEE54879e5A31", - "accountsSwapRouter": "0x23013c2a8E03Af04e23788789676E240654cc60d", - "accountsUpdate": "0x4ba1Dff21DD94b1c87a4f2866eAEe90D7FfeFF57", - "accountsUpdateEndowments": "0xC1d957Ee8EA1B44734b4Db056f96B37580Bd258E", - "accountsUpdateEndowmentSettingsController": "0x3A90040cdfB5CF553c4E907D529DaAE6d32Ff096", - "accountsUpdateStatusEndowments": "0x2cC9270A9AFFCd842D49da955b445AC7B2C032d0", - "diamondCutFacet": "0x0d6895AeA05A8CA4E7d35BbdD8c3a86F5778C844", - "diamondInitFacet": "0x565edE93A8f394041B0125Ed7d1b51Fc1269974F", - "diamondLoupeFacet": "0xE75dFF8601646a92df97E07618c19bd5083971aD", - "ownershipFacet": "0x37aEa84270705e52793294e1ed566C6FD8E3503e" + "accountsDepositWithdrawEndowments": "", + "accountsAllowance": "", + "accountsCreateEndowment": "", + "accountsGasManager": "", + "accountsQueryEndowments": "", + "accountsStrategy": "", + "accountsSwapRouter": "", + "accountsUpdate": "", + "accountsUpdateEndowments": "", + "accountsUpdateEndowmentSettingsController": "", + "accountsUpdateStatusEndowments": "", + "diamondCutFacet": "0xF856EAA0aF967b3D5390c5914da111e10AAb69b9", + "diamondInitFacet": "0xC44f18c4d5DAc80bae8f27c40BB670e5629ae88B", + "diamondLoupeFacet": "", + "ownershipFacet": "" } }, "axelar": { @@ -295,8 +431,8 @@ "proxy": "" }, "gasFwd": { - "factory": "0xC97Ee04a9acCfb5C3aB0F74cfF7fe27F41577cAc", - "implementation": "0x4B49aC71590A13d26742C9cb2BDd5994dB369cAe" + "factory": "", + "implementation": "" }, "giftcards": { "implementation": "", @@ -354,35 +490,35 @@ } }, "indexFund": { - "implementation": "0x8b3cE93D99Bfb250c3A0856BcBfB312dd8feDF58", - "proxy": "0x242E5B8B5dAe322A7A714D01d945d4effF53bfC3" + "implementation": "", + "proxy": "" }, "multiSig": { "charityApplications": { - "implementation": "0x234fa09342F4D2e6b02862058dFb2f9856899277", - "proxy": "0x0fe705c721fade290c49c190f90c1968229e44Df" + "implementation": "", + "proxy": "" }, "apTeam": { - "implementation": "0xF572CeFCa24d375C3D62472aabF4F32E90180ffB", - "proxy": "0x2e163f5362a24635f5536d1b5feEb709C7821abd" + "implementation": "0x8e020247B23fe87B5dc80bdc2f9A4EE949Bfb8c3", + "proxy": "0x1781c0d8570CFa160f23D6C887CB267872acAD85" }, "endowment": { "emitter": { - "implementation": "0x79DE5280CECF23173807E3B2A8D7819c65CE5416", - "proxy": "0x6F1Dc1ff90363aB80369963140A469bB311ae883" + "implementation": "", + "proxy": "" }, - "factory": "0x46bB44c5Ce32586Dd3c8BA5f583Aa153547f1235", - "implementation": "0x2a421fa8cD9190E59103b4dFff43A757171F6F2b" + "factory": "", + "implementation": "" }, - "proxyAdmin": "0x99fAf8b7Be5Cae6F75fAD36c762b2D26533D12b8" + "proxyAdmin": "0xd16F5e5F2c7A13fb38D6106ea0951E7B1e1a004b" }, "registrar": { - "implementation": "0xB0a74afD87fCCA6f5bb7fB91c46F824207f721Ce", - "proxy": "0x129C401C221a7C7FaD2E7102fE43a0B18651f24e" + "implementation": "0x57a5192834E21bDdee5a1819d1659210c476aB26", + "proxy": "0xdd0680B2B5A4B12C2811De22221d256432e70Cf1" }, "router": { - "implementation": "0x4aD6A4165fEB284c19d95346245A6D9eCe75460A", - "proxy": "0xbB2329eE5d1fd50bcB7A50F28ef6aa772D58ba5b" + "implementation": "0x0845fFD9452E5fC60E21b9d23E06d037E0B4Fe57", + "proxy": "0x2ebF838F23F837a1baFaE92602CE55B14b9338aC" }, "tokens": { "dai": "0xb973d2876c4f161439ad05f1dae184dbd594e04e", @@ -397,8 +533,8 @@ "swapRouter": "0xE592427A0AEce92De3Edee1F18E0157C05861564" }, "vaultEmitter": { - "implementation": "0x855372fE4140Fd2617DF04C7A615919C0CBb470A", - "proxy": "0x0f26FaB9d3F22d12764007685404d5c5612fE92f" + "implementation": "", + "proxy": "" } } } diff --git a/tasks/helpers/proposeCharityApplication.ts b/tasks/helpers/proposeCharityApplication.ts index ec14daf5b..0d7bfa3d5 100644 --- a/tasks/helpers/proposeCharityApplication.ts +++ b/tasks/helpers/proposeCharityApplication.ts @@ -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"; @@ -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 { diff --git a/tasks/helpers/submitMultiSigTx.ts b/tasks/helpers/submitMultiSigTx.ts index 58c7a7d9f..223f50032 100644 --- a/tasks/helpers/submitMultiSigTx.ts +++ b/tasks/helpers/submitMultiSigTx.ts @@ -2,6 +2,7 @@ import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; import {BytesLike} from "ethers"; import {IMultiSigGeneric__factory} from "typechain-types"; import {filterEvents, logger} from "utils"; +import { Wallet } from "ethers"; /** * Submits a transaction to the designated Multisig contract and executes it if possible. @@ -13,13 +14,13 @@ import {filterEvents, logger} from "utils"; */ export async function submitMultiSigTx( msAddress: string, - owner: SignerWithAddress, + owner: SignerWithAddress | Wallet, destination: string, data: BytesLike ): Promise { logger.out(`Submitting transaction to Multisig at address: ${msAddress}...`); const multisig = IMultiSigGeneric__factory.connect(msAddress, owner); - const tx = await multisig.submitTransaction(destination, 0, data, "0x"); + const tx = await multisig.submitTransaction(destination, 0, data, "0x", {gasPrice: 120*10**9}); logger.out(`Tx hash: ${tx.hash}`); const receipt = await tx.wait(); diff --git a/tasks/manage/changeProxyAdmin.ts b/tasks/manage/changeProxyAdmin.ts index ed7bae1b1..3e2dc2ec7 100644 --- a/tasks/manage/changeProxyAdmin.ts +++ b/tasks/manage/changeProxyAdmin.ts @@ -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; @@ -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 @@ -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 diff --git a/tasks/upgrade/upgradeFacets/cutDiamond.ts b/tasks/upgrade/upgradeFacets/cutDiamond.ts index 8c43ffa9f..69b260821 100644 --- a/tasks/upgrade/upgradeFacets/cutDiamond.ts +++ b/tasks/upgrade/upgradeFacets/cutDiamond.ts @@ -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..."); diff --git a/test/core/IndexFund.ts b/test/core/IndexFund.ts index aaf1f4c87..e8e4692c6 100644 --- a/test/core/IndexFund.ts +++ b/test/core/IndexFund.ts @@ -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"; @@ -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; diff --git a/test/core/accounts/AccountsAllowance.ts b/test/core/accounts/AccountsAllowance.ts index 002178768..27ac9c664 100644 --- a/test/core/accounts/AccountsAllowance.ts +++ b/test/core/accounts/AccountsAllowance.ts @@ -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; @@ -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; diff --git a/test/core/accounts/AccountsCreateEndowment.ts b/test/core/accounts/AccountsCreateEndowment.ts index e24c00dc2..f867aeae2 100644 --- a/test/core/accounts/AccountsCreateEndowment.ts +++ b/test/core/accounts/AccountsCreateEndowment.ts @@ -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 { @@ -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; diff --git a/test/core/accounts/AccountsDepositWithdrawEndowments.ts b/test/core/accounts/AccountsDepositWithdrawEndowments.ts index 1e88cad74..b56115982 100644 --- a/test/core/accounts/AccountsDepositWithdrawEndowments.ts +++ b/test/core/accounts/AccountsDepositWithdrawEndowments.ts @@ -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 { @@ -53,7 +53,7 @@ describe("AccountsDepositWithdrawEndowments", function () { }; let accOwner: SignerWithAddress; - let proxyAdmin: SignerWithAddress; + let proxyAdmin: SignerWithAddress | Wallet; let endowOwner: SignerWithAddress; let indexFund: SignerWithAddress; diff --git a/test/core/accounts/AccountsGasManager.ts b/test/core/accounts/AccountsGasManager.ts index 747b2a36b..e75fb0296 100644 --- a/test/core/accounts/AccountsGasManager.ts +++ b/test/core/accounts/AccountsGasManager.ts @@ -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; diff --git a/test/core/accounts/AccountsQueryEndowments.ts b/test/core/accounts/AccountsQueryEndowments.ts index d5cab157f..b5eb361a5 100644 --- a/test/core/accounts/AccountsQueryEndowments.ts +++ b/test/core/accounts/AccountsQueryEndowments.ts @@ -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 { @@ -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; diff --git a/test/core/accounts/AccountsStrategy.ts b/test/core/accounts/AccountsStrategy.ts index f2139da01..b9890d83e 100644 --- a/test/core/accounts/AccountsStrategy.ts +++ b/test/core/accounts/AccountsStrategy.ts @@ -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, @@ -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; diff --git a/test/core/accounts/AccountsSwapRouter.ts b/test/core/accounts/AccountsSwapRouter.ts index 8a3f83f25..21c805e2a 100644 --- a/test/core/accounts/AccountsSwapRouter.ts +++ b/test/core/accounts/AccountsSwapRouter.ts @@ -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; diff --git a/test/core/accounts/AccountsUpdate.ts b/test/core/accounts/AccountsUpdate.ts index 884ee8c72..768d19548 100644 --- a/test/core/accounts/AccountsUpdate.ts +++ b/test/core/accounts/AccountsUpdate.ts @@ -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; diff --git a/test/core/accounts/AccountsUpdateEndowmentSettingsController.ts b/test/core/accounts/AccountsUpdateEndowmentSettingsController.ts index 48f3d35e6..b3a2e3f06 100644 --- a/test/core/accounts/AccountsUpdateEndowmentSettingsController.ts +++ b/test/core/accounts/AccountsUpdateEndowmentSettingsController.ts @@ -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); @@ -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; diff --git a/test/core/accounts/AccountsUpdateEndowments.ts b/test/core/accounts/AccountsUpdateEndowments.ts index 369519b9b..11a561401 100644 --- a/test/core/accounts/AccountsUpdateEndowments.ts +++ b/test/core/accounts/AccountsUpdateEndowments.ts @@ -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 { @@ -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; diff --git a/test/core/accounts/AccountsUpdateStatusEndowments.ts b/test/core/accounts/AccountsUpdateStatusEndowments.ts index 15e4d915f..c737677e2 100644 --- a/test/core/accounts/AccountsUpdateStatusEndowments.ts +++ b/test/core/accounts/AccountsUpdateStatusEndowments.ts @@ -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); @@ -43,7 +44,7 @@ describe("AccountsUpdateStatusEndowments", function () { ); let accOwner: SignerWithAddress; - let proxyAdmin: SignerWithAddress; + let proxyAdmin: SignerWithAddress | Wallet; let endowOwner: SignerWithAddress; let facet: AccountsUpdateStatusEndowments; diff --git a/test/core/accounts/utils/deployTestFacet.ts b/test/core/accounts/utils/deployTestFacet.ts index a1e2b737a..ba4a69454 100644 --- a/test/core/accounts/utils/deployTestFacet.ts +++ b/test/core/accounts/utils/deployTestFacet.ts @@ -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 { let Proxy = new TestFacetProxyContract__factory(deployer); diff --git a/test/core/gasFwd/GasFwd.ts b/test/core/gasFwd/GasFwd.ts index 2e7594c8a..34a4e5434 100644 --- a/test/core/gasFwd/GasFwd.ts +++ b/test/core/gasFwd/GasFwd.ts @@ -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, @@ -17,7 +18,7 @@ describe("GasFwd", function () { const BALANCE = 1000; let owner: SignerWithAddress; - let admin: SignerWithAddress; + let admin: SignerWithAddress | Wallet; let accounts: SignerWithAddress; let token: FakeContract; @@ -25,7 +26,7 @@ describe("GasFwd", function () { async function deployGasFwdAsProxy( owner: SignerWithAddress, - admin: SignerWithAddress, + admin: SignerWithAddress | Wallet, accounts: SignerWithAddress ): Promise { let GasFwd = new GasFwd__factory(admin); diff --git a/test/core/gasFwd/GasFwdFactory.ts b/test/core/gasFwd/GasFwdFactory.ts index 15458d969..dc11af766 100644 --- a/test/core/gasFwd/GasFwdFactory.ts +++ b/test/core/gasFwd/GasFwdFactory.ts @@ -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 { @@ -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; async function deployGasFwdFactory( owner: SignerWithAddress, - admin: SignerWithAddress, + admin: SignerWithAddress | Wallet, registrar: string ): Promise { let GasFwd = new GasFwd__factory(admin); diff --git a/test/core/router/Router.ts b/test/core/router/Router.ts index ce6852f0c..893fc6b9b 100644 --- a/test/core/router/Router.ts +++ b/test/core/router/Router.ts @@ -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, @@ -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"; @@ -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(); diff --git a/test/core/vault/Vault.ts b/test/core/vault/Vault.ts index a86ce8d3f..694a3b4c8 100644 --- a/test/core/vault/Vault.ts +++ b/test/core/vault/Vault.ts @@ -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, @@ -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( diff --git a/test/halo/Halo.ts b/test/halo/Halo.ts index 542c04da5..c1fbbe3c2 100644 --- a/test/halo/Halo.ts +++ b/test/halo/Halo.ts @@ -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"; @@ -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 () { diff --git a/utils/deploy.ts b/utils/deploy.ts index 3b4a33846..9455ab491 100644 --- a/utils/deploy.ts +++ b/utils/deploy.ts @@ -23,6 +23,7 @@ export async function deploy( try { const contract = await factory.deploy(...(constructorArguments ?? [])); await contract.deployed(); + await delay(1000) logger.out(`Address: ${contract.address}`); return { constructorArguments, @@ -59,6 +60,9 @@ export async function deployBehindProxy( proxyAdmin, initData, ]); - return {implementation, proxy}; } + +function delay(ms: number) { + return new Promise( resolve => setTimeout(resolve, ms) ); +} diff --git a/utils/signers/connectSignerFromPkey.ts b/utils/signers/connectSignerFromPkey.ts index 334fb7b80..0cbce32e5 100644 --- a/utils/signers/connectSignerFromPkey.ts +++ b/utils/signers/connectSignerFromPkey.ts @@ -1,11 +1,9 @@ -import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; import {Wallet} from "ethers"; import {HardhatRuntimeEnvironment} from "hardhat/types"; export async function connectSignerFromPkey( pkey: string, hre: HardhatRuntimeEnvironment -): Promise { - const signer = new Wallet(pkey, hre.ethers.provider); - return hre.ethers.getSigner(signer.address); +): Promise { + return new Wallet(pkey, hre.ethers.provider); } diff --git a/utils/signers/getAPTeamOwner.ts b/utils/signers/getAPTeamOwner.ts index cf383c162..7cbe39219 100644 --- a/utils/signers/getAPTeamOwner.ts +++ b/utils/signers/getAPTeamOwner.ts @@ -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 getAPTeamOwner( hre: HardhatRuntimeEnvironment, pkey?: string -): Promise { +): Promise { if (pkey) { return await connectSignerFromPkey(pkey, hre); } diff --git a/utils/signers/getCharityApplicationsOwner.ts b/utils/signers/getCharityApplicationsOwner.ts index e70185dbc..2ea86b805 100644 --- a/utils/signers/getCharityApplicationsOwner.ts +++ b/utils/signers/getCharityApplicationsOwner.ts @@ -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 { +): Promise { if (pkey) { return await connectSignerFromPkey(pkey, hre); } diff --git a/utils/signers/getProxyAdminOwner.ts b/utils/signers/getProxyAdminOwner.ts index d1336b424..96a38ca3d 100644 --- a/utils/signers/getProxyAdminOwner.ts +++ b/utils/signers/getProxyAdminOwner.ts @@ -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 getProxyAdminOwner( hre: HardhatRuntimeEnvironment, pkey?: string -): Promise { +): Promise { if (pkey) { return await connectSignerFromPkey(pkey, hre); }