Skip to content

Commit

Permalink
update tests to support changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Da-Colon committed Oct 9, 2024
1 parent bf80360 commit 216e1e0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/DecentAutonomousAdmin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 18 additions & 0 deletions test/DecentHats_0_2_0.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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: "",
Expand Down Expand Up @@ -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: "",
Expand Down Expand Up @@ -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: "",
Expand Down Expand Up @@ -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: "",
Expand Down

0 comments on commit 216e1e0

Please sign in to comment.