Skip to content

Commit d90165c

Browse files
authored
[TD-1326] Restructure trading tests to match trading contracts directory layout (#190)
1 parent e64fee8 commit d90165c

15 files changed

+13
-12
lines changed

test/seaport/immutableseaport.test.ts renamed to test/trading/seaport/immutableseaport.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { ethers, network } from "hardhat";
33
import { randomBytes } from "crypto";
44

5-
import type { ImmutableSeaport, ImmutableSignedZone, TestERC721 } from "../../typechain-types";
5+
import type { ImmutableSeaport, ImmutableSignedZone, TestERC721 } from "../../../typechain-types";
66
import { constants } from "ethers";
77
import type { Wallet, BigNumber, BigNumberish } from "ethers";
88
import { deployImmutableContracts } from "./utils/deploy-immutable-contracts";

test/seaport/utils/deploy-immutable-contracts.ts renamed to test/trading/seaport/utils/deploy-immutable-contracts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import hre from "hardhat";
2-
import { ImmutableSeaport, ImmutableSignedZone } from "../../../typechain-types";
2+
import { ImmutableSeaport, ImmutableSignedZone } from "../../../../typechain-types";
33

44
// Deploy the Immutable ecosystem contracts, returning the contract
55
// references

test/seaport/utils/erc721.ts renamed to test/trading/seaport/utils/erc721.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import hre from "hardhat";
33

44
import { getOfferOrConsiderationItem, randomBN } from "./encoding";
55

6-
import type { TestERC721 } from "../../../typechain-types";
6+
import type { TestERC721 } from "../../../../typechain-types";
77
import type { BigNumberish, BigNumber, Contract, Wallet } from "ethers";
88

99
export async function deployERC721(): Promise<TestERC721> {
1010
const erc721Factory = await hre.ethers.getContractFactory("TestERC721");
11-
const erc721 = await erc721Factory.deploy();
11+
const erc721 = (await erc721Factory.deploy()) as TestERC721;
1212
return erc721.deployed();
1313
}
1414

File renamed without changes.

test/seaport/utils/order.ts renamed to test/trading/seaport/utils/order.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { calculateOrderHash, convertSignatureToEIP2098, randomHex, toBN } from "
77

88
import type { ConsiderationItem, OfferItem, OrderComponents } from "./types";
99
import type { Contract, Wallet } from "ethers";
10-
import { ImmutableSeaport, TestZone } from "../../../typechain-types";
10+
import { ImmutableSeaport, TestZone } from "../../../../typechain-types";
1111
import { getBulkOrderTree } from "./eip712/bulk-orders";
12-
import { ReceivedItemStruct } from "../../../typechain-types/contracts/ImmutableSeaport";
12+
import { ReceivedItemStruct } from "../../../../typechain-types/contracts/trading/seaport/ImmutableSeaport";
1313
import { CONSIDERATION_EIP712_TYPE, EIP712_DOMAIN, SIGNED_ORDER_EIP712_TYPE, getCurrentTimeStamp } from "./signedZone";
1414

1515
const orderType = {
File renamed without changes.

test/seaport/immutablesignedzone.test.ts renamed to test/trading/seaport/zones/immutablesignedzone.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Wallet, constants } from "ethers";
55
import { keccak256 } from "ethers/lib/utils";
66
import { ethers } from "hardhat";
77

8-
import { ImmutableSignedZone__factory } from "../../typechain-types";
8+
import { ImmutableSignedZone__factory } from "../../../../typechain-types";
99

1010
import {
1111
CONSIDERATION_EIP712_TYPE,
@@ -15,13 +15,13 @@ import {
1515
autoMining,
1616
convertSignatureToEIP2098,
1717
getCurrentTimeStamp,
18-
} from "./utils/signedZone";
18+
} from "../utils/signedZone";
1919

20-
import type { ImmutableSignedZone } from "../../typechain-types";
20+
import type { ImmutableSignedZone } from "../../../../typechain-types";
2121
import type { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
2222
import type { BytesLike } from "ethers";
23-
import { ReceivedItemStruct } from "../../typechain-types/contracts/trading/seaport/ImmutableSeaport";
24-
import { ZoneParametersStruct } from "../../typechain-types/contracts/trading/seaport/zones/ImmutableSignedZone";
23+
import { ReceivedItemStruct } from "../../../../typechain-types/contracts/trading/seaport/ImmutableSeaport";
24+
import { ZoneParametersStruct } from "../../../../typechain-types/contracts/trading/seaport/zones/ImmutableSignedZone";
2525

2626
describe("ImmutableSignedZone", function () {
2727
let deployer: SignerWithAddress;

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"resolveJsonModule": true,
1010
"skipLibCheck": true
1111
},
12-
"include": ["./index.ts"]
12+
"include": ["./index.ts", "./test/**/*.ts"],
13+
"files": ["hardhat.config.ts"]
1314
}

0 commit comments

Comments
 (0)