From 216e1e018845065d424449c3a1b56500b9855765 Mon Sep 17 00:00:00 2001 From: David Colon <38386583+Da-Colon@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:32:51 -0400 Subject: [PATCH] update tests to support changes --- test/DecentAutonomousAdmin.test.ts | 2 +- test/DecentHats_0_2_0.test.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/test/DecentAutonomousAdmin.test.ts b/test/DecentAutonomousAdmin.test.ts index 62082fbb..c9d9093f 100644 --- a/test/DecentAutonomousAdmin.test.ts +++ b/test/DecentAutonomousAdmin.test.ts @@ -49,7 +49,7 @@ describe("DecentAutonomousAdminHat", function () { const adminHatId = createAdminTxReceipt?.toJSON().logs[0].args[0] // Deploy DecentAutonomousAdminHat contract with the admin hat ID - adminHat = await new DecentAutonomousAdmin__factory(deployer).deploy(adminHatId) + adminHat = await new DecentAutonomousAdmin__factory(deployer).deploy() const adminHatAddress = await adminHat.getAddress() // Mint the admin hat to adminHatWearer await hatsProtocol.mintHat(adminHatId, adminHatAddress) diff --git a/test/DecentHats_0_2_0.test.ts b/test/DecentHats_0_2_0.test.ts index fb530edb..e12d2f9e 100644 --- a/test/DecentHats_0_2_0.test.ts +++ b/test/DecentHats_0_2_0.test.ts @@ -17,6 +17,10 @@ import { MockERC20, MockHatsModuleFactory__factory, MockHatsElectionEligibility__factory, + ModuleProxyFactory__factory, + ModuleProxyFactory, + DecentAutonomousAdmin__factory, + DecentAutonomousAdmin, } from "../typechain-types" import { SignerWithAddress } from "@nomicfoundation/hardhat-ethers/signers" @@ -96,6 +100,9 @@ describe("DecentHats_0_2_0", () => { let mockHatsElectionEligibilityImplementationAddress: string let mockHatsModuleFactoryAddress: string + let moduleProxyFactory: ModuleProxyFactory + let decentAutonomousAdminMasterCopy: DecentAutonomousAdmin + beforeEach(async () => { const signers = await hre.ethers.getSigners() const [deployer] = signers @@ -116,6 +123,9 @@ describe("DecentHats_0_2_0", () => { decentHats = await new DecentHats_0_2_0__factory(deployer).deploy() decentHatsAddress = await decentHats.getAddress() + moduleProxyFactory = await new ModuleProxyFactory__factory(deployer).deploy() + decentAutonomousAdminMasterCopy = await new DecentAutonomousAdmin__factory(deployer).deploy() + const gnosisSafeProxyFactory = getGnosisSafeProxyFactory() const gnosisSafeL2Singleton = getGnosisSafeL2Singleton() const gnosisSafeL2SingletonAddress = await gnosisSafeL2Singleton.getAddress() @@ -202,6 +212,8 @@ describe("DecentHats_0_2_0", () => { keyValuePairs: await keyValuePairs.getAddress(), topHatDetails: "", topHatImageURI: "", + decentAutonomousAdminMasterCopy: await decentAutonomousAdminMasterCopy.getAddress(), + moduleProxyFactory: await moduleProxyFactory.getAddress(), adminHat: { maxSupply: 1, details: "", @@ -292,6 +304,8 @@ describe("DecentHats_0_2_0", () => { keyValuePairs: await keyValuePairs.getAddress(), topHatDetails: "", topHatImageURI: "", + decentAutonomousAdminMasterCopy: await decentAutonomousAdminMasterCopy.getAddress(), + moduleProxyFactory: await moduleProxyFactory.getAddress(), adminHat: { maxSupply: 1, details: "", @@ -394,6 +408,8 @@ describe("DecentHats_0_2_0", () => { keyValuePairs: await keyValuePairs.getAddress(), topHatDetails: "", topHatImageURI: "", + decentAutonomousAdminMasterCopy: await decentAutonomousAdminMasterCopy.getAddress(), + moduleProxyFactory: await moduleProxyFactory.getAddress(), adminHat: { maxSupply: 1, details: "", @@ -534,6 +550,8 @@ describe("DecentHats_0_2_0", () => { keyValuePairs: await keyValuePairs.getAddress(), topHatDetails: "", topHatImageURI: "", + decentAutonomousAdminMasterCopy: await decentAutonomousAdminMasterCopy.getAddress(), + moduleProxyFactory: await moduleProxyFactory.getAddress(), adminHat: { maxSupply: 1, details: "",