Skip to content

Commit

Permalink
Add file level comment and fix review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tyitang committed Dec 3, 2024
1 parent 4e0ebfd commit 6fa05b1
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ ETHERSCAN_API_KEY = ETHERSCANAPIKEYETHERSCANAPIKEY
DEVNET_URL = http://
DEVNET_CHAINID = 1315
DEVNET_PRIVATEKEY =
DEVNET_USER1 =
DEVNET_USER1 =
DEVNET_ERC721 =
6 changes: 5 additions & 1 deletion test/hardhat/e2e/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// This is the deployed protocol address constants file.

export const AccessController = "0xf709c8001E94e2ca6F98b7fFBCd5BD3943E46D81";
export const CoreMetadataModule = "0x89630Ccf23277417FBdfd3076C702F5248267e78";
export const CoreMetadataViewModule = "0x6839De4A647eE2311bd765f615E09f7bd930ed25";
Expand All @@ -21,4 +23,6 @@ export const ProtocolPauseAdmin = "0x65C6Ec6Cc074eaf7ba3970C540b4379C9BcA8A67";
export const RoyaltyModule = "0xEa6eD700b11DfF703665CCAF55887ca56134Ae3B";
export const RoyaltyPolicyLAP = "0x28b4F70ffE5ba7A26aEF979226f77Eb57fb9Fdb6";
export const RoyaltyPolicyLRP = "0x7D2d9af4E4ab14Afcfd86436BC348928B40963Dd";
export const MockERC721 = "0x7a23aad16b2ac6ad74f76990a814b0f82bec83b8";

// Mock ERC721 contract address
export const MockERC721 = process.env.DEVNET_ERC721 as string;
4 changes: 3 additions & 1 deletion test/hardhat/e2e/grouping/group.ipa.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Test: Group IP Asset

import "../setup"
import { expect } from "chai"
import { EvenSplitGroupPool } from "../constants"
Expand All @@ -19,4 +21,4 @@ describe("Group IPA", function () {
this.groupingModule.registerGroup(nonWhitelistedGroupPool)
).to.be.rejectedWith(Error)
});
});
});
2 changes: 2 additions & 0 deletions test/hardhat/e2e/ipa/ipa.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Test: IP Asset

import "../setup"
import { expect } from "chai"
import { mintNFT } from "../utils/nftHelper"
Expand Down
2 changes: 2 additions & 0 deletions test/hardhat/e2e/licenseTermsTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// This file is used to define the terms of a license that will be used in the tests.

import hre from "hardhat";

export const terms = {
Expand Down
2 changes: 2 additions & 0 deletions test/hardhat/e2e/permission/permission.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Test: Permission

import "../setup"
import { expect } from "chai"
import { mintNFT } from "../utils/nftHelper"
Expand Down
2 changes: 2 additions & 0 deletions test/hardhat/e2e/setup.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// This file is a root hook used to setup preconditions before running the tests.

import hre from "hardhat";
import { network } from "hardhat";
import { GroupingModule, IPAssetRegistry, LicenseRegistry, LicenseToken, LicensingModule, PILicenseTemplate, RoyaltyPolicyLAP, MockERC20, RoyaltyPolicyLRP, AccessController } from "./constants";
Expand Down
2 changes: 2 additions & 0 deletions test/hardhat/e2e/utils/mintNFTAndRegisterIPA.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Purpose: Helper function to mint an NFT and register it as an IP Asset.

import "../setup";
import { mintNFT } from "./nftHelper";
import { MockERC721, IPAssetRegistry } from "../constants";
Expand Down
2 changes: 2 additions & 0 deletions test/hardhat/e2e/utils/nftHelper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Purpose: Helper function to mint a new NFT and return the tokenId

import hre from "hardhat"
import { MockERC721 } from "../constants";
import { ethers } from "ethers";
Expand Down

0 comments on commit 6fa05b1

Please sign in to comment.